netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.duyck@gmail.com>
To: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: "Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
	"Cao, Chinh T" <chinh.t.cao@intel.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"Behera, BrijeshX" <brijeshx.behera@intel.com>,
	"Valiquette, Real" <real.valiquette@intel.com>,
	"sassmann@redhat.com" <sassmann@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [net-next v3 05/15] ice: create flow profile
Date: Mon, 23 Nov 2020 17:11:23 -0800	[thread overview]
Message-ID: <CAKgT0UcoYrfONNVrRcTydahgH8zqk=ans+w0RcdqugzRdodsWQ@mail.gmail.com> (raw)
In-Reply-To: <20201123152137.00003075@intel.com>

On Mon, Nov 23, 2020 at 3:21 PM Jesse Brandeburg
<jesse.brandeburg@intel.com> wrote:
>
> Alexander Duyck wrote:
>
> > > > I'm not sure this logic is correct. Can the flow director rules
> > > > handle
> > > > a field that is removed? Last I knew it couldn't. If that is the case
> > > > you should be using ACL for any case in which a full mask is not
> > > > provided. So in your tests below you could probably drop the check
> > > > for
> > > > zero as I don't think that is a valid case in which flow director
> > > > would work.
> > > >
> > >
> > > I'm not sure what you meant by a field that is removed, but Flow
> > > Director can handle reduced input sets. Flow Director is able to handle
> > > 0 mask, full mask, and less than 4 tuples. ACL is needed/used only when
> > > a partial mask rule is requested.
> >
> > So historically speaking with flow director you are only allowed one
> > mask because it determines the inputs used to generate the hash that
> > identifies the flow. So you are only allowed one mask for all flows
> > because changing those inputs would break the hash mapping.
> >
> > Normally this ends up meaning that you have to do like what we did in
> > ixgbe and disable ATR and only allow one mask for all inputs. I
> > believe for i40e they required that you always use a full 4 tuple. I
> > didn't see something like that here. As such you may want to double
> > check that you can have a mix of flow director rules that are using 1
> > tuple, 2 tuples, 3 tuples, and 4 tuples as last I knew you couldn't.
> > Basically if you had fields included they had to be included for all
> > the rules on the port or device depending on how the tables are set
> > up.
>
> The ice driver hardware is quite a bit more capable than the ixgbe or
> i40e hardware, and uses a limited set of ACL rules to support different
> sets of masks. We have some limits on the number of masks and the
> number of fields that we can simultaneously support, but I think
> that is pretty normal for limited hardware resources.
>
> Let's just say that if the code doesn't work on an E810 card then we
> messed up and we'll have to fix it. :-)
>
> Thanks for the review! Hope this helps...

I gather all that. The issue was the code in ice_is_acl_filter().
Basically if we start dropping fields it will not trigger the rule to
be considered an ACL rule if the field is completely dropped.

So for example I could define 4 rules, one that ignores the IPv4
source, one that ignores the IPv4 destination, one that ignores the
TCP source port, and one that ignores the TCP destination port. With
the current code all 4 of those rules would be considered to be
non-ACL rules because the mask is 0 and not partial. If I do the same
thing and ignore all but one bit then they are all ACL rules. In
addition I don't see anything telling flow director it can ignore
certain inputs over verifying the mask so I am assuming that the
previously mentioned rules that drop entire fields would likely not
work with Flow Director.

Anyway I just wanted to point that out as that would be an issue going
forward and it seems like it would be easy to fix by simply just
rejecting rules where the required flow director fields are not
entirely masked in.

- Alex

  reply	other threads:[~2020-11-24  1:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 21:44 [net-next v3 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2020-11-13 Tony Nguyen
2020-11-13 21:44 ` [net-next v3 01/15] ice: cleanup stack hog Tony Nguyen
2020-11-13 21:44 ` [net-next v3 02/15] ice: rename shared Flow Director functions Tony Nguyen
2020-11-13 21:44 ` [net-next v3 03/15] ice: initialize ACL table Tony Nguyen
2020-11-13 21:44 ` [net-next v3 04/15] ice: initialize ACL scenario Tony Nguyen
2020-11-13 21:44 ` [net-next v3 05/15] ice: create flow profile Tony Nguyen
2020-11-13 23:56   ` Alexander Duyck
2020-11-21  0:42     ` Nguyen, Anthony L
2020-11-21  1:49       ` Alexander Duyck
2020-11-23 23:21         ` Jesse Brandeburg
2020-11-24  1:11           ` Alexander Duyck [this message]
2020-12-08 16:58             ` Nguyen, Anthony L
2020-12-08 19:00               ` Alexander Duyck
2020-12-08 22:01                 ` Nguyen, Anthony L
2020-12-08 22:22                   ` Alexander Duyck
2020-12-09 18:23                     ` Nguyen, Anthony L
2020-11-13 21:44 ` [net-next v3 06/15] ice: create ACL entry Tony Nguyen
2020-11-13 21:44 ` [net-next v3 07/15] ice: program " Tony Nguyen
2020-11-13 21:44 ` [net-next v3 08/15] ice: don't always return an error for Get PHY Abilities AQ command Tony Nguyen
2020-11-14  1:25   ` Alexander Duyck
2020-11-21  0:43     ` Nguyen, Anthony L
2020-11-13 21:44 ` [net-next v3 09/15] ice: Enable Support for FW Override (E82X) Tony Nguyen
2020-11-13 21:44 ` [net-next v3 10/15] ice: Remove gate to OROM init Tony Nguyen
2020-11-13 21:44 ` [net-next v3 11/15] ice: Remove vlan_ena from vsi structure Tony Nguyen
2020-11-13 21:44 ` [net-next v3 12/15] ice: cleanup misleading comment Tony Nguyen
2020-11-13 21:44 ` [net-next v3 13/15] ice: silence static analysis warning Tony Nguyen
2020-11-13 21:44 ` [net-next v3 14/15] ice: join format strings to same line as ice_debug Tony Nguyen
2020-11-13 21:44 ` [net-next v3 15/15] ice: Add space to unknown speed Tony Nguyen

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='CAKgT0UcoYrfONNVrRcTydahgH8zqk=ans+w0RcdqugzRdodsWQ@mail.gmail.com' \
    --to=alexander.duyck@gmail.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=brijeshx.behera@intel.com \
    --cc=chinh.t.cao@intel.com \
    --cc=davem@davemloft.net \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=real.valiquette@intel.com \
    --cc=sassmann@redhat.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).