From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0047.outbound.protection.outlook.com [104.47.0.47]) by dpdk.org (Postfix) with ESMTP id 0DC854C6F for ; Tue, 14 Aug 2018 11:16:18 +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=p+8VInilrUGd6eZA84+Z0XDeh4qNdYcj4ErYjtBiXfg=; b=BdBNcw/yLCQAMsNkQIb9vpR03nHYzWmTMETkrHYWWB8RAlG0isxvVSBOhTYvU9kRn2i+ctV8H2o/Ov59qGxsrg3dzAxzkK1dk0/4JG4xWJpAo46Grgw/EoeAtahwuTzAebbWWuI7ZxzQt0X0plVcJa8JOacgFlKkTSAQbL99Fjo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jackmin@mellanox.com; Received: from MTBC-JACKMIN.mtl.com (114.86.76.13) by VI1PR0501MB2031.eurprd05.prod.outlook.com (2603:10a6:800:36::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.19; Tue, 14 Aug 2018 09:16:12 +0000 Date: Tue, 14 Aug 2018 17:15:45 +0800 From: Jack MIN To: Rahul Lakkireddy Cc: "dev@dpdk.org" , Shahaf Shuler , "Xueming(Steven) Li" , Thomas Monjalon , Adrien Mazarguil , shaguna@chelsio.com, indranil@chelsio.com, nirranjan@chelsio.com Message-ID: <20180814091545.mnkajravotqodpav@MTBC-JACKMIN.mtl.com> Mail-Followup-To: Rahul Lakkireddy , "dev@dpdk.org" , Shahaf Shuler , "Xueming(Steven) Li" , Thomas Monjalon , Adrien Mazarguil , shaguna@chelsio.com, indranil@chelsio.com, nirranjan@chelsio.com References: <20180813100756.GA20111@chelsio.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180813100756.GA20111@chelsio.com> User-Agent: NeoMutt/20180622 X-Originating-IP: [114.86.76.13] X-ClientProxiedBy: HK0PR03CA0065.apcprd03.prod.outlook.com (2603:1096:203:52::29) To VI1PR0501MB2031.eurprd05.prod.outlook.com (2603:10a6:800:36::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2975e98e-f322-4134-0d4f-08d601c69602 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2031; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2031; 3:zWd8BcMLxyJNnSUMrsto5+Mz3+UNE8omFJi+DYfGM3SsWmgciVLvapJtTdUeL3OQ1PEscKVhO6/upVuptLlFGPC8NYOtJm8Q6gtxpDDLiRfKVGpeRiZ9uQ/fV2w1mZmPaSlhsXsJrIzpBYa6dqQNjZnG+iHUjd/5DBDHTZ/kME9xGw3gB4bzu8RPtmcjNIjEg8EKDoUwG3uLpW9UQiiCZOcJiQeF8ZnnmErxgsNlaqj+v2emP2rKZ+N0V8gNLfFx; 25:pypaHRZmf+rwxQcnSMHkobcjNIU2qj0LXzLCO0yM2/jsogf/4lPd22VxmlDMg/IUsN2NXmYem0mNYQQvy5mQnxCde3/sZG1GcA5SxDCK4md6239qHzAUFpVczZ478aA8NE611nxdqtAoTpROmd7qPHLhid1rPrnMYdD7oSB75NfK6mwkBIeWBWLI28hw/+ZN1MM1kja28kOD23wqdWzfTZhVTeU3NCZd+w/CgF0jcdmEdFst/yU/e+nWX6UPxRSCTW+iydkYz+1pAG5LS8qTWo2NSOHXuvGP8hD1e2qcnyCZRrxRqOwPtVCjlRcpJM44GO9i7WYfxEzyhpRVcljNew==; 31:6+sQorOcg8ZTK4v96HuSrjDIt8Vo4X3FGEq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s7rFDHAfTKhPiFgKT97ULiq7gYIN8/SFj7sYAN3OtA== 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)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:VI1PR0501MB2031; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2031; X-Forefront-PRVS: 0764C4A8CD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(376002)(366004)(346002)(396003)(39860400002)(189003)(199004)(25786009)(9686003)(68736007)(6916009)(53416004)(55016002)(316002)(186003)(47776003)(16526019)(229853002)(106356001)(8936002)(97736004)(105586002)(16586007)(53936002)(58126008)(54906003)(6666003)(478600001)(14444005)(26005)(5660300001)(11346002)(50466002)(86362001)(7736002)(305945005)(4326008)(1076002)(476003)(446003)(76176011)(23726003)(486006)(7696005)(66066001)(52116002)(6116002)(81156014)(386003)(6246003)(3716004)(3846002)(6506007)(8676002)(2906002)(81166006)(956004)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2031; 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; VI1PR0501MB2031; 23:iQ8DhTj408ufS0A38wXRgBNVgfjmWv9zRIDjsMJ?= =?us-ascii?Q?6oGONOn4qiWPjqbVpgkuDt/68JRFdg5Yu9BnmRQhldieycz77huQcU9G5pW/?= =?us-ascii?Q?q5P10U1KulTdMJ2MzlhKz26ZR2SYoedPB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j6+ELYqAgsCL2PxqNeEkSHXlr8R+L6huxw7cWK/YJp5w1oWTy2mDh5RybHFaILUy3411VJp14GQDvbf21OeYd0L7DBmEF7YnN6psRs9X9ai9trCRGyYPEhFgw5H1V0p/E2eIsT1JjkZeornctBtwfeCu050/Gg47fXgvYa5p530aAb1WtrJLOV1jejQ==; 5:AgpUwOxLmiqpBi1idREOVIsou/VICBhq3WtulGdyhrISjDYAysbE2xnoI1ws+Qy4E9wFjOde/+AiWRJM0dCPJUn6Aq5AbhipG7n/e85VvTpQc5uhmdlVfm0GT5PmGPEibv6NarGdIerL66i2dQ+1Y15iSNFXOsG/zDK/biAALjw=; 7:vsEkDOdpk9VZeflKzElTISehfUZtm+b/z+NXJxTKx3Aic0QWIKzDJVtHhVA++VSvrAt6YO4HC7jRDoQy0aKOkv/Ug1kt3xUIcLJ0PTjoqtdiLMx0hX8xKOk/JmEXby2qz1aUyO8DkbAKb5I8EJc9l9IT+k+qoT3SONQlnpZ8frXQJI2hROuelDDOMkfiWgxCELdABz9STSdxmzPF3udLonzzsJEIhY3H9FW+THfwF4u5MZSxfUhPupvHt1ikqlOZ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2018 09:16:12.2622 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2975e98e-f322-4134-0d4f-08d601c69602 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2031 Subject: Re: [dpdk-dev] [RFC] 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: Tue, 14 Aug 2018 09:16:18 -0000 On Mon, Aug 13, 2018 at 03:38:18PM +0530, Rahul Lakkireddy wrote: > On Tuesday, August 08/07/18, 2018 at 14:20:10 +0000, Jack Min wrote: > > There is a need to offload rewrite MAC address for both destination and source > > from the matched flow > > > > The proposed actions could make above easily achieved > > > > +1. > > We're also looking to offload these actions. In addition, we also have > a requirement to offload an action to swap the source and destination > MAC addresses (i.e. source MAC address will get overwritten with the > destination MAC address and vice-versa). > Hey, Just want to know in which specific scenario we need to swap MAC address ? > Could you please add one more action RTE_FLOW_ACTION_TYPE_MAC_SWAP > to achieve this? This action will not take any arguments. Let us > know your thoughts. > > Thanks, > Rahul > > > > > Signed-off-by: Xiaoyu Min > > > --- > > 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..4a51ab2a3 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 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 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 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