netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	nirranjan@chelsio.com, vishal@chelsio.com, dt@chelsio.com
Subject: Re: [PATCH net-next 2/2] cxgb4: add TC-MATCHALL classifier ingress offload
Date: Wed, 13 Nov 2019 19:16:10 -0800	[thread overview]
Message-ID: <20191113191610.0974298f@cakuba> (raw)
In-Reply-To: <cbbe1b8e3d4062e329bb17f8521a6fa6de543091.1573656040.git.rahul.lakkireddy@chelsio.com>

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;


  reply	other threads:[~2019-11-14  3:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 14:39 [PATCH net-next 0/2] cxgb4: add TC-MATCHALL classifier offload Rahul Lakkireddy
2019-11-13 14:39 ` [PATCH net-next 1/2] cxgb4: add TC-MATCHALL classifier egress offload Rahul Lakkireddy
2019-11-14  3:14   ` Jakub Kicinski
2019-11-14 13:20     ` Rahul Lakkireddy
2019-11-13 14:39 ` [PATCH net-next 2/2] cxgb4: add TC-MATCHALL classifier ingress offload Rahul Lakkireddy
2019-11-14  3:16   ` Jakub Kicinski [this message]
2019-11-14 13:21     ` Rahul Lakkireddy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191113191610.0974298f@cakuba \
    --to=jakub.kicinski@netronome.com \
    --cc=davem@davemloft.net \
    --cc=dt@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=nirranjan@chelsio.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=vishal@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).