public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Dimitris Michailidis <dm@chelsio•com>
To: Ben Hutchings <bhutchings@solarflare•com>
Cc: Peter Waskiewicz <peter.p.waskiewicz.jr@intel•com>,
	netdev@vger•kernel.org, David Miller <davem@davemloft•net>
Subject: Re: (Lack of) specification for RX n-tuple filtering
Date: Thu, 22 Jul 2010 14:50:18 -0700	[thread overview]
Message-ID: <4C48BD1A.4060409@chelsio.com> (raw)
In-Reply-To: <1279832544.2104.63.camel@achroite.uk.solarflarecom.com>

Ben Hutchings wrote:
> The n-tuple filtering facility is half-baked at present.  There is an
> interface to add filters but none to remove them!  And ETHTOOL_GRXNTUPLE
> is not at all symmetric with ETHTOOL_SRXNTUPLE (which I complained about
> at the time it was added, to no avail).

It's a bit worse than that.  Currently one can only append filters, not 
insert at a given position, as ethtool_rx_ntuple doesn't have an index 
field.  For devices that use TCAMs, where position matters, it's quite an 
obstacle.  It also means one cannot modify an existing filter by specifying 
a new filter for the same index.


> 
> An ETHTOOL_RESET command with flag ETH_RESET_FILTER set could be defined
> to clear all the filters, but that's a big hammer to use, and I think
> that in general drivers should push the same configuration back to the
> hardware after resetting it for whatever reason.
> 
> So far as I can work out, ixgbe clears all the filters when the filter
> table fills up.  Is that true?  Is this really the intended behaviour of
> manually set filters?
> 
> I also see this in the ixgbe implementation:
> 
> 	/*
> 	 * Program the relevant mask registers.  If src/dst_port or src/dst_addr
> 	 * are zero, then assume a full mask for that field.  Also assume that
> 	 * a VLAN of 0 is unspecified, so mask that out as well.  L4type
> 	 * cannot be masked out in this implementation.
> 	 *
> 	 * This also assumes IPv4 only.  IPv6 masking isn't supported at this
> 	 * point in time.
> 	 */
> 
> An IPv4 address of 0 is certainly valid, so this isn't a good rule.  And
> in any case, such a rule should be specified *with the interface*, in
> <linux/ethtool.h>, not the implementation.
> 
> This also implies that 'mask' specifies bits to be ignored, not bits to
> be matched.  That also was not specified.
> 
> Ben.`
> 


  reply	other threads:[~2010-07-22 21:50 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 [this message]
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
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=4C48BD1A.4060409@chelsio.com \
    --to=dm@chelsio$(echo .)com \
    --cc=bhutchings@solarflare$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=peter.p.waskiewicz.jr@intel$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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