DPDK patches and discussions
 help / color / mirror / Atom feed
From: Le Scouarnec Nicolas <Nicolas.LeScouarnec@technicolor.com>
To: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Adrien Mazarguil (adrien.mazarguil@6wind.com)"
	<adrien.mazarguil@6wind.com>
Subject: Re: [dpdk-dev] Issues with ixgbe  and rte_flow
Date: Wed, 8 Mar 2017 09:24:26 +0000	[thread overview]
Message-ID: <CY4PR02MB25525EA5266F955C9FA944D6F62E0@CY4PR02MB2552.namprd02.prod.outlook.com> (raw)
In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B56D514@shsmsx102.ccr.corp.intel.com>

My response is inline bellow, and further comment on the code excerpt also


From: Lu, Wenzhuo <wenzhuo.lu@intel.com>
Sent: Wednesday, March 8, 2017 4:16 AM
To: Le Scouarnec Nicolas; dev@dpdk.org; Adrien Mazarguil (adrien.mazarguil@6wind.com)
Cc: Yigit, Ferruh
Subject: RE: Issues with ixgbe and rte_flow
    
>> I have been using the new API rte_flow to program filtering on an X540 (ixgbe)
>> NIC. My goal is to send packets from different VLANs to different queues
>> (filtering which should be supported by flow director as far as I understand). I
>> enclosed the setup code at the bottom of this email.
>> For reference, here is the setup code I use
>>
>>       vlan_spec.tci = vlan_be;
>>       vlan_spec.tpid = 0;
>>
>>       vlan_mask.tci = rte_cpu_to_be_16(0x0fff);
>>       vlan_mask.tpid =  0;

>To my opinion, this setting is not right. As we know, vlan tag is inserted between MAC source address and Ether type.
>So if we have a MAC+VLAN+IPv4 packet, the vlan_spec.tpid should be 0x8100, the eth_spec.type should be 0x0800.
>+ Adrien, the author. He can correct me if I'm wrong.

Ok, I apologize, you're right. Being more used to the software-side than to the hardware-side, I misunderstood struct rte_flow_item_vlan and though it was the "equivalent" of struct vlan_hdr, in which case the vlan_hdr contains the type of the encapsulated frame.

(  /**
 * Ethernet VLAN Header.
 * Contains the 16-bit VLAN Tag Control Identifier and the Ethernet type
 * of the encapsulated frame.
 */
struct vlan_hdr {
	uint16_t vlan_tci; /**< Priority (3) + CFI (1) + Identifier Code (12) */
	uint16_t eth_proto;/**< Ethernet type of encapsulated frame. */
} __attribute__((__packed__));        )


Best regards,
Nicolas Le Scouarnec

  reply	other threads:[~2017-03-08  9:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07 11:11 Le Scouarnec Nicolas
2017-03-08  3:16 ` Lu, Wenzhuo
2017-03-08  9:24   ` Le Scouarnec Nicolas [this message]
2017-03-08 15:41     ` Adrien Mazarguil
     [not found]       ` <CY4PR02MB2552362D11FE183F45F37596F62E0@CY4PR02MB2552.namprd02.prod.outlook.com>
     [not found]         ` <6A0DE07E22DDAD4C9103DF62FEBC09093B56DC90@shsmsx102.ccr.corp.intel.com>
     [not found]           ` <6A0DE07E22DDAD4C9103DF62FEBC09093B56E40A@shsmsx102.ccr.corp.intel.com>
2017-03-10 11:46             ` [dpdk-dev] FW: " Adrien Mazarguil
2017-03-13  2:33               ` Lu, Wenzhuo
2017-03-15 10:53                 ` Adrien Mazarguil
2017-03-15 14:29                   ` Le Scouarnec Nicolas
2017-03-15 16:01                     ` Adrien Mazarguil
2017-03-16 17:01                       ` Le Scouarnec Nicolas
2017-03-17  9:34                         ` Adrien Mazarguil

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=CY4PR02MB25525EA5266F955C9FA944D6F62E0@CY4PR02MB2552.namprd02.prod.outlook.com \
    --to=nicolas.lescouarnec@technicolor.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=wenzhuo.lu@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;
as well as URLs for NNTP newsgroup(s).