From: Ben Hutchings <bhutchings@solarflare.com>
To: Vladislav Zolotarov <vladz@broadcom.com>
Cc: Dimitris Michailidis <dm@chelsio.com>,
Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>
Subject: Re: (Lack of) specification for RX n-tuple filtering
Date: Wed, 08 Dec 2010 19:02:11 +0000 [thread overview]
Message-ID: <1291834931.2560.42.camel@bwh-desktop> (raw)
In-Reply-To: <1291833578.17102.69.camel@lb-tlvb-vladz>
On Wed, 2010-12-08 at 20:39 +0200, Vladislav Zolotarov wrote:
> > > The
> > > semantics for a specification of the steam is also quite different. For
> > > instance, how do u define a rule to drop all packets with source IP
> > > address 192.168.10.200 by means of RXNFC?
> >
> > Something like this, I think:
> >
> > struct ethtool_rxnfc insert_rule = {
> > .cmd = ETHTOOL_SRXCLSRLINS,
> > .flow_type = IP_USER_SPEC,
> > .fs = {
> > .flow_type = IP_USER_SPEC,
> > .h_u.usr_ip4_spec = {
> > .ip4src = inet_aton("192.168.10.200"),
> > .ip_ver = ETH_RX_NFC_IP4
> > },
> > .m_u.usr_ip4_spec = {
> > .ip4dst = 0xffffffff,
> > .l4_4_bytes = 0xffffffff,
> > .tos = 0xff,
> > .proto = 0xff
> > },
> > .ring_cookie = RX_CLS_FLOW_DISC,
> > .location = 0,
> > }
> > };
> >
>
> Aha. Ok. From the remarks in the upstream ethtool.h I see now that
> ethtool_rxnfc has quite wide configuration possibilities (including the
> above). I missed it before. ;)
>
> Ben, could u, pls., explain me then what's the difference between
> defining the rule as u wrote above on top of -N option (nfc) and
> defining the rule doing the same thing on top on -U (n-tuple) option and
> when I as a user should prefer one option to another? Are they expected
> to be implemented differently from FW/HW perspective?
The -N option modifies the hash function for all flows of a specific
type (using ETHTOOL_SRXFH) whereas the -U option steers a specific flow
or set of flows (using ETHTOOL_SRXNTUPLE). The implementation of the -U
option could potentially be made to fallback to ETHTOOL_SRXCLSRLINS if
vlan_tag and user_def are not specified.
> thanks,
> vlad
>
> P.S. I see that ethtool.h from the 2.6.36 tree already has the
> ethtool_rxnfc that would allow such a filtering definition however from
> the man page of the 2.6.36 version of the ethtool package it's unclear
> what should be a command line for such a configuration. Is it supported
> with the current ethtool version or maybe I'm missing something in a man
> page?
It's not supported. Santwona Behera implemented the kernel side of this
but so far as I know he never sent any patches for ethtool.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2010-12-08 19:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 21:02 (Lack of) specification for RX n-tuple filtering Ben Hutchings
2010-07-22 21:50 ` Dimitris Michailidis
2010-09-07 14:43 ` Ben Hutchings
2010-12-08 16:24 ` Vladislav Zolotarov
2010-12-08 16:39 ` David Miller
2010-12-08 17:29 ` Ben Hutchings
2010-12-08 17:31 ` David Miller
2010-12-09 10:31 ` Vladislav Zolotarov
2010-12-08 17:31 ` Vladislav Zolotarov
2010-12-08 17:22 ` Ben Hutchings
2010-12-08 18:39 ` Vladislav Zolotarov
2010-12-08 19:02 ` Ben Hutchings [this message]
2010-12-08 19:10 ` Vladislav Zolotarov
2010-12-08 19:14 ` Ben Hutchings
2010-12-08 19:39 ` Ben Hutchings
2010-12-08 18:54 ` Dimitris Michailidis
2010-12-08 19:14 ` Ben Hutchings
2010-12-08 19:26 ` Dimitris Michailidis
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=1291834931.2560.42.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=dm@chelsio.com \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=vladz@broadcom.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