[PATCH net-next v5 07/11] net: ti: prueth: Adds support for network filters for traffic control supported by PRU-ICSS

Parvathi Pudi parvathi at couthit.com
Fri Apr 18 05:25:57 PDT 2025


Hi,

> On Mon, Apr 14, 2025 at 06:32:33PM +0530, Parvathi Pudi wrote:
>> From: Roger Quadros <rogerq at ti.com>
>> 
>> Driver updates to enable/disable network filters and traffic control
>> features supported by the firmware running on PRU-ICSS.
>> 
>> Control of the following features are now supported:
>> 1. Promiscuous mode
>> 2. Network Storm prevention
>> 3. Multicast filtering and
>> 4. VLAN filtering
>> 
>> Firmware running on PRU-ICSS will go through all these filter checks
>> prior to sending the rx packets to the host.
>> 
>> Ethtool or dev ioctl can be used to enable/disable these features from
>> the user space.
>> 
>> Signed-off-by: Roger Quadros <rogerq at ti.com>
>> Signed-off-by: Andrew F. Davis <afd at ti.com>
>> Signed-off-by: Basharath Hussain Khaja <basharath at couthit.com>
>> Signed-off-by: Parvathi Pudi <parvathi at couthit.com>
> 
> ...
> 
>> diff --git a/drivers/net/ethernet/ti/icssm/icssm_prueth_dos.c
>> b/drivers/net/ethernet/ti/icssm/icssm_prueth_dos.c
> 
> ...
> 
>> +static int icssm_emac_configure_clsflower(struct prueth_emac *emac,
>> +					  struct flow_cls_offload *cls)
>> +{
>> +	struct flow_rule *rule = flow_cls_offload_flow_rule(cls);
>> +	struct netlink_ext_ack *extack = cls->common.extack;
>> +	const struct flow_action_entry *act;
>> +	int i;
>> +
>> +	flow_action_for_each(i, act, &rule->action) {
>> +		switch (act->id) {
>> +		case FLOW_ACTION_POLICE:
>> +			return icssm_emac_flower_parse_policer
>> +				(emac, extack, cls,
>> +				 act->police.rate_bytes_ps);
>> +		default:
>> +			NL_SET_ERR_MSG_MOD(extack,
>> +					   "Action not supported");
>> +			return -EOPNOTSUPP;
>> +		}
>> +	}
>> +	return -EOPNOTSUPP;
> 
> nit: This line cannot be reached.
>     I think you can just remove it.
> 
>     Flagged by Smatch.
> 

We will cleanup this in the next version.

Thanks and Regards,
Parvathi.




More information about the linux-arm-kernel mailing list