(Lack of) specification for RX n-tuple filtering

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ben Hutchings
Date: Thursday, July 22, 2010 - 2:02 pm

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).

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.`

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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
(Lack of) specification for RX n-tuple filtering, Ben Hutchings, (Thu Jul 22, 2:02 pm)
Re: (Lack of) specification for RX n-tuple filtering, Dimitris Michailidis, (Thu Jul 22, 2:50 pm)
Re: (Lack of) specification for RX n-tuple filtering, Ben Hutchings, (Tue Sep 7, 7:43 am)
Re: (Lack of) specification for RX n-tuple filtering, Vladislav Zolotarov, (Wed Dec 8, 9:24 am)
Re: (Lack of) specification for RX n-tuple filtering, David Miller, (Wed Dec 8, 9:39 am)
Re: (Lack of) specification for RX n-tuple filtering, Ben Hutchings, (Wed Dec 8, 10:22 am)
Re: (Lack of) specification for RX n-tuple filtering, Ben Hutchings, (Wed Dec 8, 10:29 am)
Re: (Lack of) specification for RX n-tuple filtering, David Miller, (Wed Dec 8, 10:31 am)
Re: (Lack of) specification for RX n-tuple filtering, Vladislav Zolotarov, (Wed Dec 8, 10:31 am)
Re: (Lack of) specification for RX n-tuple filtering, Vladislav Zolotarov, (Wed Dec 8, 11:39 am)
Re: (Lack of) specification for RX n-tuple filtering, Dimitris Michailidis, (Wed Dec 8, 11:54 am)
Re: (Lack of) specification for RX n-tuple filtering, Ben Hutchings, (Wed Dec 8, 12:02 pm)
Re: (Lack of) specification for RX n-tuple filtering, Vladislav Zolotarov, (Wed Dec 8, 12:10 pm)
Re: (Lack of) specification for RX n-tuple filtering, Ben Hutchings, (Wed Dec 8, 12:14 pm)
Re: (Lack of) specification for RX n-tuple filtering, Ben Hutchings, (Wed Dec 8, 12:14 pm)
Re: (Lack of) specification for RX n-tuple filtering, Dimitris Michailidis, (Wed Dec 8, 12:26 pm)
Re: (Lack of) specification for RX n-tuple filtering, Ben Hutchings, (Wed Dec 8, 12:39 pm)
Re: (Lack of) specification for RX n-tuple filtering, Vladislav Zolotarov, (Thu Dec 9, 3:31 am)