Netdev List
 help / color / mirror / Atom feed
From: "Vladislav Zolotarov" <vladz@broadcom.com>
To: "Ben Hutchings" <bhutchings@solarflare.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, 8 Dec 2010 20:39:38 +0200	[thread overview]
Message-ID: <1291833578.17102.69.camel@lb-tlvb-vladz> (raw)
In-Reply-To: <1291828940.2560.17.camel@bwh-desktop>


> > 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?

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?



  reply	other threads:[~2010-12-08 18:39 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 [this message]
2010-12-08 19:02           ` Ben Hutchings
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=1291833578.17102.69.camel@lb-tlvb-vladz \
    --to=vladz@broadcom.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=dm@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.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