From: Ben Hutchings <ben@decadent.org.uk>
To: Alexander Duyck <alexander.duyck@gmail.com>,
Edward Cree <ecree@solarflare.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: ethtool NFC/ntuple API questions
Date: Wed, 20 Jan 2016 18:07:03 +0000 [thread overview]
Message-ID: <1453313223.3734.63.camel@decadent.org.uk> (raw)
In-Reply-To: <CAKgT0Ud1OprxqjYQC4NrFmRyhrG4x1G2=dWZEKwW866XAyW-eA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3254 bytes --]
On Wed, 2016-01-20 at 09:53 -0800, Alexander Duyck wrote:
> On Wed, Jan 20, 2016 at 9:10 AM, Edward Cree <ecree@solarflare.com> wrote:
> > I'm looking into adding IPv6 support to the ethtool flow steering API. But,
> > I don't know "the unfortunate history of and subtle differences between the
> > RX n-tuple versus RX NFC commands". In particular, would I need to add IPv6
> > support to both of them, or only one? If one would be sufficient, which one
> > is preferred?
>
> I'd say just focus on Rx NFC. The NTUPLE interface is only really
> used for legacy support on ixgbe if I recall correctly.
sfc also supported it for a while.
> The original
> implementation was badly broken, but because it went out we are stuck
> supporting it. Any new features can be added to the Rx NFC since that
> is the interface that has the ability to both set and get filters.
Right. In fact maybe the ntuple stuff could be removed from the UAPI
headers given it's no longer part of the actual UAPI.
> > Also, is it necessary to duplicate the profusion of variants that the IPv4
> > flow specs have (3x struct ethtool_tcpip4_spec, 2x struct
> > ethtool_ah_espip4_spec, and struct ethtool_usrip4_spec), or should I just
> > make one struct that contains all the fields from those (I would say "the
> > union of their fields", but that might be confusing), and rely on flow_type
> > to indicate which fields are meaningful?
>
> I'd say just stick with the approach taken for IPv4 since it makes it
> much more readable. There were only really 4 types in use, but we
> named each to make certain it was clear which one should be used for
> each type. To some extent the approach of relying on the flow_type is
> already in use, it is just made clearer by specifying which union to
> use for each type.
I don't mind one way or the other.
> > And, what exactly are the hdata fields in ethtool_flow_union and the
> > anonymous union in ethtool_rx_ntuple_flow_spec (they're not documented) and
> > why are they different sizes?
>
> The hdata is essentially just padding that defines the entire region
> size. For the user interface we have to reserve some amount of space,
> and in order to make the flow definitions compatible with NTUPLE we
> added extensions so that we could provide the information about the
> VLAN header if needed.
>
> The reason for the sizing difference is that the ethtool_flow_union is
> half of the flow definition, the other half is stored in
> ethtool_flow_ext. We shimmed ethtool_flow_ext into Rx NFC in order to
> work around the limitations of the NTUPLE filters. The structure you
> probably should be looking at for comparison to NTUPLE is
> ethtool_rx_flow_spec, not ethtool_flow_union as that helps to tell the
> whole story.
Right. Further, we can extend ethtool_flow_ext *downwards* so long as
we shrink ethtool_flow_union by the same amount (and add a type flag
for the extension).
I already checked that ethtool_flow_union remained large enough to hold
IPv6 flow specs because I expected sfc would support them some day. :-)
Ben.
--
Ben Hutchings
The program is absolutely right; therefore, the computer must be wrong.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next prev parent reply other threads:[~2016-01-20 18:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-20 17:10 ethtool NFC/ntuple API questions Edward Cree
2016-01-20 17:53 ` Alexander Duyck
2016-01-20 18:07 ` Ben Hutchings [this message]
2016-01-20 19:12 ` Edward Cree
2016-01-20 19:22 ` Ben Hutchings
2016-01-21 19:14 ` [RFC PATCH] ethtool: add IPv6 to the NFC API Edward Cree
2016-01-21 22:48 ` Alexander Duyck
2016-01-22 17:03 ` Edward Cree
2016-01-22 18:04 ` [RFC PATCH v2] " Edward Cree
2016-01-22 18:54 ` Alexander Duyck
2016-01-25 3:34 ` Ben Hutchings
2016-01-25 3:20 ` Ben Hutchings
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=1453313223.3734.63.camel@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=alexander.duyck@gmail.com \
--cc=ecree@solarflare.com \
--cc=netdev@vger.kernel.org \
/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).