From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10047.outbound.protection.outlook.com [40.107.1.47]) by dpdk.org (Postfix) with ESMTP id 28A002BA3 for ; Thu, 30 Aug 2018 09:40:37 +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:X-MS-Exchange-SenderADCheck; bh=2sjQk13gtXx8fxvFePTTjYLJmOVWRU3zl5Ckh5o98pU=; b=lKi88WET66aHLECdqfe6MLe3z3cC9c/ZaVHGTyPsXdzBj8VlebHtVr1X6/b+/vMZ8KhsLsRVvVES5HJDCdhswvhcjQLqAX+AXs/nrgwBUCXO2/tNRQ08TBCraGo7prxUsRmatQHYYV6DpC5QyWk03RFRkOQljX1RYl311ChPzTk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jackmin@mellanox.com; Received: from MTBC-JACKMIN.mtl.com (114.91.159.248) by DB6PR0501MB2024.eurprd05.prod.outlook.com (2603:10a6:4:6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Thu, 30 Aug 2018 07:40:31 +0000 Date: Thu, 30 Aug 2018 15:40:04 +0800 From: Jack MIN To: dev@dpdk.org Cc: shahafs@mellanox.com, adrien.mazarguil@6wind.com, xuemingl@mellanox.com, thomas@monjalon.net, ferruh.yigit@intel.com, arybchenko@solarflare.com Message-ID: <20180830074004.swb53jxheg5ez36h@MTBC-JACKMIN.mtl.com> References: <20180830065412.26680-1-jackmin@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180830065412.26680-1-jackmin@mellanox.com> User-Agent: NeoMutt/20180716 X-Originating-IP: [114.91.159.248] X-ClientProxiedBy: HK0PR01CA0009.apcprd01.prod.exchangelabs.com (2603:1096:203:92::21) To DB6PR0501MB2024.eurprd05.prod.outlook.com (2603:10a6:4:6::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df35dfbf-bf54-4458-6dcc-08d60e4bdebb X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB6PR0501MB2024; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2024; 3:4ReNsHEgrG7b409AEJGyoLSu9e2WDax3/+HwJPhL43p3kSq7CnzvXfaMq0HyCVv/iz1rSHcqK/K4qmncVazAt7xCGS+KYfS7nz9ck1yNxS9pPJCVnmbLGAGf+7S4PLPUTG5vOXaxuOLHyuyvOJylBkoPu9JG6zJKNe368Tn0r/VH+Bw8A9tZhYuti59xLxWMM/vmLe52bzXXPNoSEwWAqZNc6jrm6r/tHD8vau2pw/ephWxfn5lrlSKvgRZc5PjQ; 25:g02R8Q624z8cMJKSD+oAxkpEXrF0BumqXhCPGljmFFs3eaLYOIXHN2DvzI5a1NbAqDK3o3Cz4f83EzfhR765/X8eUDlmTRHsXwyp6E3a6wZMoGXuWUO/dSn8Sv9Xkh7qfZGtqwb6rDiggq1mXbaTXVMMCBX8wnPRYzvzqODUOmtI3kk5Z9hTLwdKHkEIUO4hH3ETuAtKAlzjk2m9VzFFLSkI9wI3fFZYh4Yqbj+oyFMVROenN4aSCqyaD4TDZFsCNyL0OSuV/HFi/BTmRLARMAnWBCGPS3Pi4WW70Xn6GY2bERP3T4Bgt+nFbtHD4FaP8ammRu4kX/di3QaWd/7KkA==; 31:S2tmLxbUYRxdbOAN0gI3vLmjN1+bDnTjVx0jkWmO9K6Xm7mySXT2I7TxAIwhsFOVK8E0p97OiBC1JKdshpmfPShkHwO8NGZFTv7amQ47Snu7kd1y2/edx2lKjhQkBUQ+tX4+fvLji+p9Crtcjtv25ASO93B0mIAqfNkIC4XZKDN5nrgGHl+pZ8VLRM5cqZ5FSeBbccdzSpKgQY1nYcWv7wZaMS92sF/aqXb1+TCJ7ts= X-MS-TrafficTypeDiagnostic: DB6PR0501MB2024: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2024; 20:USpHX+o0HKFdoK0jrReEwZmMyNuagJmNG5mefOL3eqDYFrjWix/OTs5cFn7O1+lX87L4YcD2UrWQQxRYEoxMv/sbsLfbJ3txY1gNURcNhc+3Lm4xTDrFiWpOxEKKukmkh6jaLUNPyfP6wQSjEYghfJij6KoPW5u1qT6RCS9Cj6iq6l5eveXzlSad9GKhEdZ7LqYuZ88qpKtqCZqbctkt+6Wbwwmzlt3FL9Dejn4mIyFEChiMHgWjOXVnDL1K1qe81LkeEK7p9VMn4b5M2uZY2CqhZ0LALQPDQCJc8fHitOOwRQiDKx9dysTopRUT1r7ylAu208xi8BYk2FsnCkzid3zcPZq/jC4y6EPMavV5V001HKHwDWsxTDVoF7lq+L5pWZ12SrolnfBP16en24BN/AkviXshKl7EHqUMYx+7ZaPgjL+OhTbKADPjjmob7p7UyjwM+azWIzemZUTXTTNZQuZI+aA43ZGzWuSJhN3CT8s0YgWNgvPDnFinfgkMOAIi; 4:wlsLxwYICyQb2I5HFnTKinF3TneP/l/X4kf0yc8q0WciXNSYexqZRQH7BP0WHJzdRqD5k5gdZllbHfNKQ942+O5TuNG5JnWKIMPNgWLUmW1VVgX/63uvbdWxbkDDBqaRHd0QJ3VaihyOdpDB82neGmySkcZeIILqcID5BnQvFc19utRzqs6e37CrkVKptUA2FYryMhnZmlzKAy127uSZj21AhwTXC5bwDkU2Cl797RfF4N3wHf8CPGNMVqvUAYI4BOvtQHQYFhnEQHwc8YaN2Q== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823301075)(93006095)(93001095)(10201501046)(3002001)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699016); SRVR:DB6PR0501MB2024; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2024; X-Forefront-PRVS: 07807C55DC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(396003)(136003)(366004)(39860400002)(189003)(199004)(3846002)(86362001)(6116002)(66066001)(47776003)(81156014)(81166006)(2906002)(6246003)(2351001)(1076002)(23726003)(4326008)(25786009)(97736004)(16586007)(316002)(2361001)(58126008)(7696005)(52116002)(6666003)(6916009)(5660300001)(26005)(16526019)(956004)(186003)(476003)(11346002)(446003)(486006)(14444005)(76176011)(50466002)(6506007)(386003)(53936002)(55016002)(9686003)(106356001)(105586002)(478600001)(53416004)(8676002)(229853002)(8936002)(7736002)(305945005)(68736007)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2024; H:MTBC-JACKMIN.mtl.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-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0501MB2024; 23:IIM6WWcE7DcMsu3WoTp4eW4dKZ1j5z6FdzdBNng?= =?us-ascii?Q?KOEFNTEJ7s74rOCzLYuIqyf2ZbK5f0E3JO3BdDxZajlt/KIAmywjyltwYlOp?= =?us-ascii?Q?Pu4CJWpjQ8d+pQIS9mhgzdAU6lk1i9dvP0lnQxE/Qo2cfCSMsCNQYZNXOz9I?= =?us-ascii?Q?aM7di34T06NG6gjzxURywA4yFQFvWdcqwQdgQp+aG1WKf3H6Zdy775LUbuZt?= =?us-ascii?Q?SsTouQhputJ+yb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SKKV9TMRfw4IdMUUpiZGOzeiI5A5igurY8uVt0dsh6y/B0hnb+2jA9Kg==; 5:ELlQQZILZVfSY8c9WuEkfHvii8DD+J9ktgFMlk4uQ8Mag89Q8CFORwPGmdoM6Ru7II15O5eLwXXb+WiKK7tqHsARliQ4o+b/bHrSGIuzbJIahXGNUVhHP1/cvJhiOhb4i+S4r15vQ9037ROKS+f8YFVtyGLGYjYF4yb1OSC1XS4=; 7:U8oN/vzklCT5rQ7l+o0OeCrvefB+cJHb9mciTNV27kjRZARBo8nOjNSHrQzrc23tuoiKvFnxbpP2fwxLxW6Vw/h/io2kvyl98uih9WMu0NrHMGiSMzbNLpoGj2etfubp23oonbrtTgdbU4zmbI4nof037WpDL48O/hVabRSYIVFn7DFyKexWE9bAeuIhZb2sh1WzO/SBQ+A4egxy/wHAtPDgqJeLpZXDnH6IOEx3suQN8jXbZKgMT+KsU0yAvQta SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 07:40:31.1819 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: df35dfbf-bf54-4458-6dcc-08d60e4bdebb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2024 Subject: Re: [dpdk-dev] [PATCH v2] ethdev: add generic MAC address rewrite actions 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: Thu, 30 Aug 2018 07:40:38 -0000 Sorry, A wrong title. Please ignore this one. -Jack On Thu, Aug 30, 2018 at 02:54:12PM +0800, Xiaoyu Min wrote: > There is a need to offload rewrite outermost MAC address for both > destination and source from the matched flow > > The proposed actions could make above easily achieved > > Signed-off-by: Xiaoyu Min > --- > v2: > - Updated description about the MAC address is the outermost one > > lib/librte_ethdev/rte_flow.h | 32 ++++++++++++++++++++++++++++++++ > 1 file changed, 32 insertions(+) > > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h > index f8ba71cdb..c9cce1049 100644 > --- a/lib/librte_ethdev/rte_flow.h > +++ b/lib/librte_ethdev/rte_flow.h > @@ -1505,6 +1505,26 @@ enum rte_flow_action_type { > * error. > */ > RTE_FLOW_ACTION_TYPE_NVGRE_DECAP, > + > + /** > + * Set outermost source MAC address from matched flow. > + * > + * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_ETH, > + * the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION error. > + * > + * See struct rte_flow_action_set_mac. > + */ > + RTE_FLOW_ACTION_TYPE_SET_MAC_SRC, > + > + /** > + * Set outermost destination MAC address from matched flow. > + * > + * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_ETH, > + * the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION error. > + * > + * See struct rte_flow_action_set_mac. > + */ > + RTE_FLOW_ACTION_TYPE_SET_MAC_DST, > }; > > /** > @@ -1868,6 +1888,18 @@ struct rte_flow_action_nvgre_encap { > struct rte_flow_item *definition; > }; > > +/** > + * @warning > + * @b EXPERIMENTAL: this structure may change without prior notice > + * > + * RTE_FLOW_ACTION_TYPE_SET_MAC > + * > + * Set outermost MAC address from the matched flow > + */ > +struct rte_flow_action_set_mac { > + uint8_t mac_addr[ETHER_ADDR_LEN]; > +}; > + > /* > * Definition of a single action. > * > -- > 2.17.1 >