All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@intel.com>
To: Dimitrios Michailidis <dm@chelsio.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>,
	Alexander Duyck <alexander.duyck@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [net-next-2.6 PATCH 02/10] ethtool: add ntuple flow specifier to network flow classifier
Date: Fri, 04 Mar 2011 11:30:36 -0800	[thread overview]
Message-ID: <4D713DDC.4060109@intel.com> (raw)
In-Reply-To: <8A71B368A89016469F72CD08050AD334091C1FCF@maui.asicdesigners.com>

On 3/2/2011 12:03 PM, Dimitrios Michailidis wrote:
> Ben Hutchings wrote:
>> On Wed, 2011-03-02 at 11:11 -0800, Dimitrios Michailidis wrote:
>>> Ben Hutchings wrote:
>>>> /**
>>>>   * struct ethtool_flow_ext - flow spec common extension fields
>>>>   * @vlan_etype: EtherType for vlan tagged packet to match
>>>>   * @vlan_tci: VLAN tag to match
>>>>   * @data: Driver-dependent data to match
>>>>   *
>>>>   * Note: Additional fields may be inserted before @vlan_etype in future,
>>>>   * but the offset of the existing fields within the containing structure
>>>>   * (&struct ethtool_rx_flow_spec) will be stable.
>>>>   */
>>>> struct ethtool_flow_ext {
>>>> 	__be16	vlan_etype;
>>>> 	__be16	vlan_tci;
>>>> 	__be32	data[2];
>>>> };
>>>
>>> I am wondering about the semantics of these vlan_* fields.  Is vlan_etype the
>>> Ethertype in the VLAN header or the type after it?
>>
>> It would be the the type in the VLAN tag.  The nested ethertype is
>> normally implied by flow_type to be ETH_P_IP.
>>
>> This does leave the question of what this would mean:
>>
>> struct ethtool_rx_flow_spec fs = {
>> 	.flow_type = ... | FLOW_EXT,
>> 	...
>> 	.h_ext.vlan_tci = htons(0x1234),
>> 	.m_ext.vlan_etype = 0xffff,
>> };
>>
>> This says the TCI must be == 0x1234 but the type can be anything.  But
>> the type surely has to be be one assigned for use in VLAN tags.  Should
>> we leave it to the driver/hardware to determine what those valid types
>> are, or should we reject this as valid?
>
> Right.  Devices have some internal rules for what qualifies as a VLAN frame.
> If users are given the option to specify vlan_etype what do they get?
> At least we need to specify what is expected so drivers can decide if they can support it.

The basic idea I had is similar to what Ben described.  Basically the 
vlan_etype can be used to determine the Ethertype for the VLAN to be 
compared.  The reason for this is specifically the VLAN 0 case since 
without the VLAN Ethertype check VLAN 0 on ixgbe hardware will match an 
untagged frame and that may not be a desired result.  As such we can 
specify the VLAN Ethertype and then we will only match VLAN tagged 
frames without any false hits.

Thanks,

Alex


  reply	other threads:[~2011-03-04 19:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25 23:32 [net-next-2.6 PATCH 00/10] Workarounds and fixes for ntuple filters Alexander Duyck
2011-02-25 23:32 ` [net-next-2.6 PATCH 01/10] ethtool: prevent null pointer dereference with NTUPLE set but no set_rx_ntuple Alexander Duyck
2011-02-26  0:21   ` Ben Hutchings
2011-02-26  0:40     ` Alexander Duyck
2011-02-27  0:07       ` David Miller
2011-02-27  2:16         ` Alexander Duyck
2011-02-25 23:32 ` [net-next-2.6 PATCH 02/10] ethtool: add ntuple flow specifier to network flow classifier Alexander Duyck
2011-02-26  1:00   ` Ben Hutchings
2011-02-26  5:30     ` Alexander Duyck
2011-03-02 18:50       ` Ben Hutchings
2011-03-02 19:11         ` Dimitrios Michailidis
2011-03-02 19:27           ` Ben Hutchings
2011-03-02 20:03             ` Dimitrios Michailidis
2011-03-04 19:30               ` Alexander Duyck [this message]
2011-03-04 21:00         ` Alexander Duyck
2011-02-27  0:05   ` David Miller
2011-02-25 23:32 ` [net-next-2.6 PATCH 03/10] [RFC] ixgbe: remove ntuple filtering Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 04/10] [RFC] ethtool: remove support for ETHTOOL_GRXNTUPLE Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 05/10] [RFC] ixgbe: add support for different Rx packet buffer sizes Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 06/10] [RFC] ixgbe: update perfect filter framework to support retaining filters Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 07/10] [RFC] ixgbe: add basic support for settting and getting nfc controls Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 08/10] [RFC] ixgbe: add support for displaying ntuple filters via the nfc interface Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 09/10] [RFC] ixgbe: add support for nfc addition and removal of filters Alexander Duyck
2011-02-25 23:33 ` [net-next-2.6 PATCH 10/10] [RFC] ixgbe: Add support for using the same fields as ntuple in nfc Alexander Duyck

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=4D713DDC.4060109@intel.com \
    --to=alexander.h.duyck@intel.com \
    --cc=alexander.duyck@gmail.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=dm@chelsio.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.