netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Sunil Kovvuri <sunil.kovvuri@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>, Jakub Kicinski <kuba@kernel.org>,
	Linux Netdev List <netdev@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	George Cherian <gcherian@marvell.com>,
	Subbaraya Sundeep <sbhatta@marvell.com>,
	Sunil Goutham <sgoutham@marvell.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Alex Marginean <alexandru.marginean@nxp.com>
Subject: Re: Query on new ethtool RSS hashing options
Date: Sat, 6 Mar 2021 15:18:14 +0200	[thread overview]
Message-ID: <20210306131814.h4u323smlihpf3ds@skbuf> (raw)
In-Reply-To: <CA+sq2CfAsyFHEj=w3=ewTKk-qbF60FcCQNtk9e7_1wxf=tB7QA@mail.gmail.com>

On Sat, Mar 06, 2021 at 06:04:14PM +0530, Sunil Kovvuri wrote:
> On Sat, Mar 6, 2021 at 5:47 AM Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > On Fri, Mar 05, 2021 at 03:07:02PM -0800, Jakub Kicinski wrote:
> > > On Fri, 5 Mar 2021 16:15:51 +0530 Sunil Kovvuri wrote:
> > > > Hi,
> > > >
> > > > We have a requirement where in we want RSS hashing to be done on packet fields
> > > > which are not currently supported by the ethtool.
> > > >
> > > > Current options:
> > > > ehtool -n <dev> rx-flow-hash
> > > > tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r
> > > >
> > > > Specifically our requirement is to calculate hash with DSA tag (which
> > > > is inserted by switch) plus the TCP/UDP 4-tuple as input.
> > >
> > > Can you share the format of the DSA tag? Is there a driver for it
> > > upstream? Do we need to represent it in union ethtool_flow_union?
> >
> > Sorry, i missed the original question, there was no hint in the
> > subject line that DSA was involved.
> >
> > Why do you want to include DSA tag in the hash? What normally happens
> > with DSA tag drivers is we detect the frame has been received from a
> > switch, and modify where the core flow dissect code looks in the frame
> > to skip over the DSA header and parse the IP header etc as normal.
>
> I understand your point.
> The requirement to add DSA tag into RSS hashing is coming from one of
> our customer.
>
> >
> > Take a look at net/core/flow_dissect.c:__skb_flow_dissect()
> >
> > This fits with the core ideas of the network stack and offloads. Hide
> > the fact an offload is being used, it should just look like a normal
> > interface.
> >
> >         Andrew
>
> Yes, the pkt will look like a normal packet itself.
> In our case HW strips the DSA tag from the packet and forwards it to a VF.

DSA-aware SR-IOV on master, very interesting. I expect that the reverse
is true as well: on xmit, the VF will automatically insert a FWD tag
into the packet too, which encodes a 'virtual' source port and switch id.

What Marvell controller is this? How is the SR-IOV implemented in the
kernel, is it modeled as switchdev, with host representors for the VFs?
Does it support VEPA mode or VEB too? If it supports VEB, does it learn
(more like 'steal') addresses from the DSA switch's FDB? Does it also
push addresses into the DSA switch's FDB?

To your question: why stop at hashing? What about flow steering?
What does your hardware actually support? It is obvious that it has deep
parsing of Marvell DSA tags specifically, so the generic 'masked u32 key'
matching may not be the best way to model this. Can your DSA master even
perform masked matching on generic u32 keys, or are you planning to just
look for the particular pattern of a Marvell DSA tag in the ethtool
rxnfc callbacks, and reject anything that doesn't match?

  reply	other threads:[~2021-03-06 13:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 10:45 Query on new ethtool RSS hashing options Sunil Kovvuri
2021-03-05 23:07 ` Jakub Kicinski
2021-03-06  0:17   ` Andrew Lunn
2021-03-06 12:34     ` Sunil Kovvuri
2021-03-06 13:18       ` Vladimir Oltean [this message]
2021-03-08 13:25         ` Sunil Kovvuri
2021-03-08 13:42           ` Andrew Lunn
2021-03-06 14:32       ` Andrew Lunn
2021-03-08 13:19         ` Sunil Kovvuri
2021-03-06 12:08   ` Sunil Kovvuri
2021-03-06 12:54     ` Vladimir Oltean
2021-03-06 21:16       ` Tobias Waldekranz
2021-03-08 13:20         ` Sunil Kovvuri
2021-03-08 13:26 ` Sunil Kovvuri

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=20210306131814.h4u323smlihpf3ds@skbuf \
    --to=olteanv@gmail.com \
    --cc=alexandru.marginean@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=gcherian@marvell.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=sunil.kovvuri@gmail.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).