From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0060.outbound.protection.outlook.com [104.47.1.60]) by dpdk.org (Postfix) with ESMTP id 00E9D8E5A for ; Tue, 17 Apr 2018 09:35:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ON2bh3JVEeokStwpRJIeitc9rRFZ9s5wKn4V9MPUJWc=; b=nCp0tplDDxG+pPJTnrjcRHFiN6lwj/5qoKiO5Q1qWWQIiLuIXKRxn094pD6r2mIq2s6aQURk24fFoJ4o9EJ/VuoMXi3/x5zQym850cIgpgtNmMmbmp+0wi09Jlou8ILcwOlqiIMIS2xhsU4Xkb/EicyAB3YF4pCi5DfbW78jiZw= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4473.eurprd05.prod.outlook.com (52.134.109.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.14; Tue, 17 Apr 2018 07:34:59 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::808d:386e:26f3:859f]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::808d:386e:26f3:859f%13]) with mapi id 15.20.0675.015; Tue, 17 Apr 2018 07:34:59 +0000 From: Shahaf Shuler To: Qi Zhang , Adrien Mazarguil CC: "dev@dpdk.org" , "declan.doherty@intel.com" , "sugesh.chandran@intel.com" , "michael.j.glynn@intel.com" , "yu.y.liu@intel.com" , "konstantin.ananyev@intel.com" , "bruce.richardson@intel.com" Thread-Topic: [dpdk-dev] [PATCH v3 4/4] ethdev: add VLAN and MPLS pop push action in flow API Thread-Index: AQHT1Um+5FpVl0tCzEiAdn28tBDOAaQEj2tQ Date: Tue, 17 Apr 2018 07:34:59 +0000 Message-ID: References: <1522279780-34842-1-git-send-email-qi.z.zhang@intel.com> <20180416061042.785-1-qi.z.zhang@intel.com> <20180416061042.785-5-qi.z.zhang@intel.com> In-Reply-To: <20180416061042.785-5-qi.z.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4473; 7:IGuRUGC6j688GJzPk+aNBIqt9TCXfuoCfnNiQYIx2ofCphmFo3wQe98mph5sCXtWbz2OglLPYKbje5CQTVDcO5KTNvQSmvAzYKLCtUru+gMhBJhTPeY8c9/g2Akd9a4Y8RG807r6pa70ccXCQAeO8QBfBxPNxSkl6KR8XQeSorecabpvjGRkbx2Snl4604yHJVHqp6NvGj0we8/u5FFH9EH7RgKE+GrTdVXqjBtCmsO+y8PakiLb1rZY/yjfAcUy x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4473; x-ms-traffictypediagnostic: DB7PR05MB4473: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231232)(944501327)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041310)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB7PR05MB4473; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4473; x-forefront-prvs: 0645BEB7AA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(39380400002)(39860400002)(366004)(396003)(346002)(189003)(199004)(54906003)(110136005)(74316002)(59450400001)(81166006)(55016002)(81156014)(5660300001)(76176011)(6116002)(53936002)(86362001)(6506007)(229853002)(9686003)(478600001)(7736002)(25786009)(5250100002)(3280700002)(305945005)(102836004)(105586002)(4326008)(66066001)(14454004)(2900100001)(476003)(2906002)(3660700001)(33656002)(446003)(97736004)(6246003)(26005)(11346002)(316002)(3846002)(106356001)(186003)(68736007)(486006)(6436002)(99286004)(7696005)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4473; H:DB7PR05MB4426.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 1A64g1xpKjdlwNAbj9jj6c2/9F4yVjR+4x4hVNKNtf/XRgHVNvgYtWMFrTYNKCN5fZHJ2rH458WIOlRPauD006Zdy9g0d/W+4nYWV1/gEs0qn7AmL12Zde3oPOgecPU97p3TE9/rSiW0uIdWCLgO5ihTjFLKN3MojfvXfy51FZQ2GsfY8IrHHe8Tmmfp1GVk spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 87eb8e4f-ba2d-4896-bbc9-08d5a435b9a7 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87eb8e4f-ba2d-4896-bbc9-08d5a435b9a7 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2018 07:34:59.6542 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4473 Subject: Re: [dpdk-dev] [PATCH v3 4/4] ethdev: add VLAN and MPLS pop push action in flow API 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: Tue, 17 Apr 2018 07:35:01 -0000 Monday, April 16, 2018 9:11 AM, Qi Zhang: > Subject: [dpdk-dev] [PATCH v3 4/4] ethdev: add VLAN and MPLS pop push > action in flow API >=20 > Add couple Openflow frienldy VLAN/MPLS push/pop actions. >=20 > RTE_FLOW_ACTION_VLAN_POP - pop a VLAN header. > RTE_FLOW_ACTION_VLAN_PUSH - push a VLAN header. > RTE_FLOW_ACTION_MPLS_POP - pop a MPLS header. > RTE_FLOW_ACTION_MPLS_PUSH - push a MPLS header. >=20 > Signed-off-by: Qi Zhang > --- > /** > @@ -1501,6 +1536,42 @@ struct rte_flow_action_ip_ttl_dec { }; >=20 > /** > + * RTE_FLOW_ACTION_TYPE_VLAN_PUSH, > + * > + * Push a new VLAN header onto the packet, Ethertype 0x8100 or 0x88a8 > + * should be used. The value of VLAN ID and VLAN priority for the new > + * header is copied from an exist outermost VLAN header in the packet, > + * they will be set to 0 if no such VLAN header exist. > + */ > +struct rte_flow_action_vlan_push { > + rte_be16_t ether_type; /**< Ethertype for vlan tag. */ }; > + I may have missed this also in the previous discussions. But why limit the VLAN ID and prio to 0 if not exists?=20 Why not to enable the application to define the full VLAN header it wants t= o push? The default, if application hasn't specified any, can be what you s= uggest.=20 > +/** > + * RTE_FLOW_ACTION_TYPE_MPLS_POP, > + * > + * Pop the outer-most MPLS header from the packet, Ethertype is > + * required for the resulting packet if it is not the last MPLS > + * header be popped, Ethertype must be 0x8847 or 0x8848. > + */ > +struct rte_flow_action_mpls_pop { > + rte_be16_t ether_type; /**< Ethertype for MPLS header */ }; > + > +/** > + * RTE_FLOW_ACTION_TYPE_MPLS_PUSH, > + * > + * Push a new MPLS header onto the packet, Ethertype 0x8847 or 0x8848 > + * should be used. The value of MPLS label and traffic class are copied > + * from exist outermost MPLS header, and TTL is copied from exist > +outermost I guess those are derived from OF spec.=20 > + * MPLS or IP header, they will be set to 0, if exist packet does not > + * contain required header. > + */ > +struct rte_flow_action_mpls_push { > + rte_be16_t ether_type; /**< Ethertype for MPLS header */ }; > + Same question as above - why not let the user to specify its MPLS header an= d have what you suggest as default behavior? > +/** > * Definition of a single action. > * > * A list of actions is terminated by a END action. > -- > 2.13.6