From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0139.outbound.protection.outlook.com [104.47.37.139]) by dpdk.org (Postfix) with ESMTP id 9AE5B108A for ; Wed, 8 Mar 2017 10:24:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=technicolor.onmicrosoft.com; s=selector1-technicolor-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=CycCBj+D0amvbLCbkV+xzz8TtEKimAWAHwSm1OCU+kY=; b=oETAYHygKtQrkZ84rUdzlyWMuv95j1OfkVfVuD6m6y0Nq3JUUDyGJeTCJxpL5ljlJMlmfccgUuVOFehq+ZCObNcqw2WHu/GKTR0GXlFuj673cHnfan6FE5HU+gq/FSjdN24xFYI8KGH2IS49AM2rpAKUX1KgTxfv2RNkqoYLZjM= Received: from CY4PR02MB2552.namprd02.prod.outlook.com (10.173.41.11) by CY4PR02MB2549.namprd02.prod.outlook.com (10.173.41.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Wed, 8 Mar 2017 09:24:26 +0000 Received: from CY4PR02MB2552.namprd02.prod.outlook.com ([10.173.41.11]) by CY4PR02MB2552.namprd02.prod.outlook.com ([10.173.41.11]) with mapi id 15.01.0947.020; Wed, 8 Mar 2017 09:24:26 +0000 From: Le Scouarnec Nicolas To: "Lu, Wenzhuo" , "dev@dpdk.org" , "Adrien Mazarguil (adrien.mazarguil@6wind.com)" Thread-Topic: Issues with ixgbe and rte_flow Thread-Index: AQHSly9VSVacWJmR5EC8Uqr0D2ovhaGKMkmAgAB1ebU= Date: Wed, 8 Mar 2017 09:24:26 +0000 Message-ID: References: , <6A0DE07E22DDAD4C9103DF62FEBC09093B56D514@shsmsx102.ccr.corp.intel.com> In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B56D514@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=technicolor.com; x-originating-ip: [165.225.76.81] x-ms-office365-filtering-correlation-id: 773ba52f-8697-4da1-4998-08d46604ea79 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:CY4PR02MB2549; x-microsoft-exchange-diagnostics: 1; CY4PR02MB2549; 7:E7vD2VgxzZQkPXHm5NO4HDlxjD5e/sxqdzF3ZBSZFcfyY0sLrB+PUaQGbRzdgF5wMDpUf6K8b6jHaRM2XbAMFKooGlACCjb/gnCI7tGHDc2vmWXm4ckOMNOREDpIqRdTRqve+04+nzyJl1BL67wmUmvDy3OYYR18+CZ72RUxQkH6zLY9JuAMILPKR7oYPinStrx0Habj3LrL31mBwrjbqUtlnPe7S90NmHINht/rtPyVreHLPRjhL2t/Sq/xx/gn7yaxrNHiJo9mnWmicvfrYbmt+wIHjJi56Oruw2pxzsudEVq0fOztNvy1dgSWA4pt8TueN/XokaDrtEAL0sTpXg==; 20:90DdT2LL2lq94Eb1mFVR35d5wSCK2afia3ttDjZ+4yIhJphXlU8RXNp3CMWccyzmbbhureTdn9Yphhx99KPEE887aOWOC9LRXJo8mBw6jtcZ+fi/LVXHT+zDi332FWX0SugMHzfaY5UGROdCbA9Joe0/DRnAv+DydueGExolzes= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123558025)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:CY4PR02MB2549; BCL:0; PCL:0; RULEID:; SRVR:CY4PR02MB2549; x-forefront-prvs: 02408926C4 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(39450400003)(39840400002)(39410400002)(39850400002)(377454003)(189998001)(53546006)(86362001)(76176999)(33656002)(50986999)(8676002)(106116001)(6506006)(66066001)(81166006)(54356999)(122556002)(77096006)(2950100002)(229853002)(53936002)(6436002)(6246003)(5660300001)(3280700002)(99286003)(8936002)(74316002)(7696004)(55016002)(3660700001)(25786008)(38730400002)(9686003)(575784001)(305945005)(2501003)(2906002)(7736002)(102836003)(6116002)(3846002)(2900100001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR02MB2549; H:CY4PR02MB2552.namprd02.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: technicolor.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2017 09:24:26.4083 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 036da35c-ba43-4e4a-9bff-72ec0f508621 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR02MB2549 Subject: Re: [dpdk-dev] Issues with ixgbe and rte_flow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2017 09:24:28 -0000 My response is inline bellow, and further comment on the code excerpt also From: Lu, Wenzhuo 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 =A0 =20 >> 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 unders= tand). I >> enclosed the setup code at the bottom of this email. >> For reference, here is the setup code I use >> >>=A0=A0=A0=A0=A0=A0 vlan_spec.tci =3D vlan_be; >>=A0=A0=A0=A0=A0=A0 vlan_spec.tpid =3D 0; >> >>=A0=A0=A0=A0=A0=A0 vlan_mask.tci =3D rte_cpu_to_be_16(0x0fff); >>=A0=A0=A0=A0=A0=A0 vlan_mask.tpid =3D=A0 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 contai= ns 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=