[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 Nov 2019 19:16:10 -0800
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Rahul Lakkireddy <rahul.lakkireddy@...lsio.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, nirranjan@...lsio.com,
vishal@...lsio.com, dt@...lsio.com
Subject: Re: [PATCH net-next 2/2] cxgb4: add TC-MATCHALL classifier ingress
offload
On Wed, 13 Nov 2019 20:09:21 +0530, Rahul Lakkireddy wrote:
> +static int cxgb4_matchall_alloc_filter(struct net_device *dev,
> + struct tc_cls_matchall_offload *cls)
> +{
> + struct cxgb4_tc_port_matchall *tc_port_matchall;
> + struct port_info *pi = netdev2pinfo(dev);
> + struct adapter *adap = netdev2adap(dev);
> + struct ch_filter_specification *fs;
> + int ret, fidx;
> +
> + /* Since the rules with lower indices have higher priority, place
> + * MATCHALL rule at the highest free index of the TCAM because
> + * MATCHALL is usually not a high priority filter and is generally
> + * used as a last rule, if all other rules fail.
> + */
The rule ordering in HW must match the ordering in the kernel.
> + fidx = cxgb4_get_last_free_ftid(dev);
> + if (fidx < 0)
> + return -ENOMEM;
Powered by blists - more mailing lists