From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80083.outbound.protection.outlook.com [40.107.8.83]) by dpdk.org (Postfix) with ESMTP id A0B1A4C88 for ; Thu, 30 Aug 2018 08:54:57 +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=CMfRcVtVeRb4Rs+BlZA3EvCeYDwF11AUFdDSxGLTnSg=; b=PByVSGIch7wjp/QaAjUpp4qPUn4wjNwsfz4gfFJF5FmshMp2BKY3qQSaPltO7IF2nzkVeSVoV+uS3emx528pdkC9hv1b8PootJtVpUlalwmkteWsVnefj5JjGBwXJFXXXjtRF/F9Upf/8SAlaDfygtcZOt7moXpfEFD93tLkClQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jackmin@mellanox.com; Received: from dev-r630-08.mtbc.labs.mlnx (118.201.220.138) by VI1PR0501MB2032.eurprd05.prod.outlook.com (2603:10a6:800:36::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.15; Thu, 30 Aug 2018 06:54:53 +0000 From: Xiaoyu 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 Date: Thu, 30 Aug 2018 14:54:12 +0800 Message-Id: <20180830065412.26680-1-jackmin@mellanox.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [118.201.220.138] X-ClientProxiedBy: SG2PR01CA0106.apcprd01.prod.exchangelabs.com (2603:1096:3:15::32) To VI1PR0501MB2032.eurprd05.prod.outlook.com (2603:10a6:800:36::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 705e54fd-eff6-4f6a-7786-08d60e457eee 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:VI1PR0501MB2032; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2032; 3:Q+si4YTaBIyHSAyxajcSD4MWFIR12rJz1y4VzFbk9lb0nOzROidoPWRCDFSl1LVI5GPX9LuWMmnNkFSiRG/H+zSA5OYWgr/9hyFtcSxt+BFsFQOcZV30KWd45HOh0tAgX1vkmwejz2YYPAj2jBsOvDKGh8p5BmFfvMR7HoQLNnRla4zWFrPUkoPpHOELXMhXjMVA5pVvZldRsB9Ws1dt1KzHTrix/M7nlaT4XKyj0GH243irxs6v+Z7WGmxx1SFE; 25:l5/wuexU0zyCjjD7TkOYpEmkxB4YyJBXxU+6HVzskw+zvKN8HtsKAS3BA89f/CNVXfV0LDhuttEiU4PlldOi+XkKrFc6TZU4SHgzif7apjD6Quo5wOqOzYFeoE3zy9LhDF0aH9Pn/6S7ksYyAq9TdlmOnHvrz6g64LbDPXudFdpE0VPmToIztWvZVRuzxIKHNZfoNbk0tZHpjVOTN86Xy+5EbyfOkhk78EAScb9adSuyZrff5Y+iDC6gf12FeHkBtoJES2lnpOqI65JO8ymAo4g3TOM3ZZbBdTNqZ0b91Zpoo4vdVP7HatclIPT3aO8XcaHn7BYnDki/mUawvC1jDA==; 31:Tt0aKs4u7Kl39iFZRai0bq/khihWA7UngTYtqV6/q32aeXvmqiuxZV/b3bnTqf7i1qurIfoThAvjhIhq/d2uriW88pLLdfZTBK7RQtjVTVOpHgkwKwtuSxxIZX/TvYAx4qL7VzMLONsPvjQU4qy2PX7vZRGAxrgfkCZs7YnoG1/nFxC/L2RSXJ7ds6Vl1th4SVeyU4Ri4sxpbSjRRe+Zc8ShPTHV2q1JZ9xnHqPmkQs= X-MS-TrafficTypeDiagnostic: VI1PR0501MB2032: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2032; 20:pOIh4QbtyGlKxOhNSpS1dsYnxb7rntXHFws6GJReP4Y7wQCNpUpuNKiImqYZwy43KiKzh07i5lDp4R9FsuCDNk+xvR8OUm4cHr2PuG+JjyJHXsMI6UAgVTM12jjXHw+z8oO6APgDCRqYedQaV2uJXnRaVxZVT7ZpnyFmxZNWlSBEMdATzysKbuu4z6aN0VcCoiSlio61m0E6U3VopAfi6YYcBLkc5qs2K5t3ITWLaaiDbwYzxSFg+C7YDCAK3x9Mvd4gc0rfvDTe3JChToEqAeWXAbqjW6AC/uWCJgJ0JhM2n9I8GKiRCYwzeaFDdtCzYqaPMWTRIG1UPTpfjGfjUGG3mN31NET1gb9Erpr2KM66N+sMAYe7MofxGIrL9bZJQHI4ayyFx9eJfqLhXs6hyCZqCRwZLGo42chQspTQ7P7Y/acYeOq/yu3O2VpRuY2Ko3CrrxcDPsxbOzHIYtRxrQIyIbspqOYHYdvGrj4VUxrajpnpy1BIMlKJ6gjlgDUC; 4:+3ozmp4HzY4LhtZKhsx89m+joyE4Ao8TIK+CzfmVKDsBlvLrF10OxIr/NFmK/GDdHCAe1SAWXm7BfVmzvvbadxzHDedNjPAhoITUHt8TMW7wPl7tamwcQlTkJNI4y9Hlx+4Dj5l4BI65lWqJoJK3luPJrHk+N09EcpGoLP5VNkSS4dMA/iobFlHAT2l+IjvCGoKuC9Q6l/GpPsAqH/Zc187la1Ld3XP7rzqzLpuqAoBCbx0SxyoChZPnYicEbsdjO+oTN/cYHmn6oZBjtq1sGA== 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)(5005006)(8121501046)(823301075)(3002001)(93006095)(93001095)(10201501046)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201708071742011)(7699016); SRVR:VI1PR0501MB2032; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2032; X-Forefront-PRVS: 07807C55DC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(136003)(366004)(39860400002)(396003)(346002)(189003)(199004)(76176011)(6506007)(2906002)(106356001)(386003)(26005)(5660300001)(478600001)(186003)(25786009)(105586002)(3846002)(52116002)(476003)(16526019)(486006)(51416003)(956004)(2351001)(2361001)(446003)(2616005)(11346002)(4326008)(8936002)(6512007)(6916009)(305945005)(6666003)(66066001)(53936002)(81166006)(8676002)(81156014)(16586007)(47776003)(7736002)(97736004)(50226002)(14444005)(6486002)(86362001)(48376002)(50466002)(316002)(36756003)(6116002)(1076002)(68736007)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2032; H:dev-r630-08.mtbc.labs.mlnx; 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; VI1PR0501MB2032; 23:GFQQLcUv6JJ0gmzKAPYEdwa3R5fcEp/FUrI68KZ?= =?us-ascii?Q?IKF570wSG9dG48qmhtRmLe78tChOPIfWs5totutvY/FUuxXOU7cUu0cervHO?= =?us-ascii?Q?+Z481CNF1jxISzhvCx7qJYWVtfpt5I7Wr+K4spT4QYzpZIgX7r+KqWYVOqbX?= =?us-ascii?Q?KCkoOFR81T8z39Yu+hhsMK0nQNB1f1UeL2ovhJZoNcOjprUAUrfDqG8Yv1st?= =?us-ascii?Q?TXA/EZ2I/+j2fydsyWo/AY8q7WQUlHCdKsRs1/EUfYNArSwQBvYgs4EOwFLB?= =?us-ascii?Q?5fm9HJJ5Onx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okvBHGdSyoLfVE05+jLgTTziuLrNPGq4Oa+C3Kpo+HGi/uAqfqAyyzdO0WoyidVaBUMCtdlT/8kwGx1oYvGl4pjErmsHQ3y6g2ItO89mrTghzeFitPiatwaBn7YY9GsLo=; 7:LsqF4fZZvaV2yhYINM+hmCbSitxNyt8zmnFdRk/OcAiZ6iPtpSQYvqqmnCRSJoFPwQ/073kpA34DdKG9p0HHNHaJ1PZkVoXTzAfLmpqVH9xtBZU87zoPwCJEw1aJF6B2I1s6EhB2fejG9NGx9xIoMYQBrLF2Z4BhgneIfYO6mYsX3NpXpceuYPIJzDeYFs+74vg2BOmnXoFJ2+n3OR7jJPXdPnK4GBMU2PjgFhPUnjk0MMoM5dKXVsmJaNqyyKZG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 06:54:53.9436 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 705e54fd-eff6-4f6a-7786-08d60e457eee X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2032 Subject: [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 06:54:57 -0000 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