From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40058.outbound.protection.outlook.com [40.107.4.58]) by dpdk.org (Postfix) with ESMTP id 8FF5B4CA2 for ; Tue, 18 Sep 2018 11:29:35 +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=sSxzliz5/noILNZBfd/Begm+LnUC5EVC2rnVf8paU5k=; b=nAqlJm5oSy6uqkIo82skElptcjqsnvUalLae5aObNUr7Pp2LYLueygN+EuqKI7ZOXGjsiPRkFPCcgUYkm3lZlpCvyFG8ODg7yDMoERFxw7TefUjSmqg9JhFc6j3MvUH163cDPPLyOPDkWiVj7uNpwWeBBTEXcHaQb/y4e1JM/3o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jackmin@mellanox.com; Received: from MTBC-JACKMIN.mtl.com (61.173.0.173) by DB6PR0501MB2023.eurprd05.prod.outlook.com (2603:10a6:4:6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.15; Tue, 18 Sep 2018 09:29:27 +0000 Date: Tue, 18 Sep 2018 17:29:10 +0800 From: Xiaoyu Min To: rahul.lakkireddy@chelsio.com Cc: dev@dpdk.org Message-ID: <20180918092910.igibtq2ahsllizx5@MTBC-JACKMIN.mtl.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <88ca7476616ac1a339eb7c6494b93f627b335b93.1534166371.git.rahul.lakkireddy@chelsio.com> User-Agent: NeoMutt/20180716 X-Originating-IP: [61.173.0.173] X-ClientProxiedBy: HK0PR03CA0037.apcprd03.prod.outlook.com (2603:1096:203:2f::25) To DB6PR0501MB2023.eurprd05.prod.outlook.com (2603:10a6:4:6::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4689db7e-c9d5-46d4-8cce-08d61d493bc7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB6PR0501MB2023; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2023; 3:O0f+zRW3cGfwt7mEHheC2k0SDbSXubopaTRe/5UIIXe0xCOcXGijQC9rzmN1H0eJDLV/agjWBIeZjJP9RG7yvPccMSHvoSUO3t1832G5cgABQPPOLczM5L+reF+Trfzfg5NtKlMuxILLmgilJayesUachjlOnK52CR+eBxDR1Hw6B87ZZTwYxDGaDum+WegMOpseatgE6hDPumMJHWfJVA2zwnPIHXAhcWste5lzhgK6Voh0YXDm35y43ffUrVRn; 25:Ejnoc46WmcR/p9OiY0YSQ6W1qOF/BDrq+5XP6hpjukoGxVBppN+9qT1s8N7i2LvlBXLV96COeDkK1EQsRRy2x15JEXTWwoOx0Eq6BBnUG6X+UfPA7i9x71lqit6sZrsrW2wvjOjNNCHwI31umS5gZEmGX4Hz9WYeSqYNCgC6zZZUQyCN/erFUCMZOQumZbCb6N7laQKmpSsPmTtR4Q4ZTYjgW/uLNYhvrL3AbwCH+xBYiG8DtI3YzLmDOSoiP+MV+aNNiJ+X9chzZg9u4ZY0UpKIQqIUz4iM0so/DsVyw8acig20hXRngyWdhC7tIheiGOAot8sLM1UIbiOwLWXrBg==; 31:nsee3g4lbGYi76bnv3DOUSsUkAhP2Ec4qy3Idc+4AmEwCQyHvI2ojqZeGSNKWnCXIsQBlV1v47cSYG+saVGwJupT7ypqa+ItLwp+XHaLqTcmT2DY6XArVutwE9Ax2DVr4AgZW+fOVCIYeOzH/TcJc3z4/ECpN0e545KXgcoGvtNrHYnZ4+OnPmgYA/aHwVwauDxudrU7ATx+xmPq3ifszWNLmGm7AgW7mEdfypM7xbY= X-MS-TrafficTypeDiagnostic: DB6PR0501MB2023: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2023; 20:VjUKvqkoNg3x8TBmFpQI4mtgP35jWscEvzQzEj2UkgjbWXdTz1tlhEDMg98cIYY9iUCLanNVyJwDIrkJn8zhL+y+8bGfegLkk/Jn1VtqTYyV0WEj6DvZ0BymwmcPpxFlwVDsLmLscMM0ce1hFYU5ArkIgx+2id3QTSj/D/LunOfyWQvwuV2QbYC+dlYaXebLUyqsvqUECTv9ufJfqo1vx46Eggapwl4kxJZ+D91cGl1x1XPx4Fd+89t73upS7HRA2yiTQFw5fdHw52kCVprpnQWvgog7n9XjqwyKqmVyM/hz92Tl/z5YbnUVORhsM9GtHI3gh20ana+ZVbUw9MsHnyDssxLs+DDfwHD2MD/i0xEg4gVKAqSUWZfPoHJbXERs5KWlnGWn5TSCQtNK+s5xwwrr+7JFWFw7vKOIY9Txtp0porrYGot/189TbdgPkEIMy/xyS5jbJxD2ortOfmPKnbC05Fo+eqjw3QaFNmigDiExvX9389GOTUak0sbrCDee; 4:DkL22r4iGwYjenhPiAhYx+yhLiUTDbmPuwUNvy0DAwiULDzKRPrO1Bs6B3+/G/MW7W7U4RDdH4GWozGlY4709GJ7wlMQjHjtlhYS2FyNQQH5QfCB+/PMkilkr+UDhZ32iYS2zfymGOCR9CzKNTwitIFNM+s8TyodzQmX6zBMxkSmdeoTZw8AFDic8pygt135WOj8Aqa64LJkUbpjeVGb7P8/uM9RvXv/WjILNuqd3DOzrfmz0KxoiGDjIZa7HcY/RzSFI/UotuXCG+0fC/MWxQ== 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)(3231355)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(201708071742011)(7699050); SRVR:DB6PR0501MB2023; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2023; X-Forefront-PRVS: 0799B1B2D7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(376002)(136003)(346002)(39860400002)(396003)(189003)(199004)(66066001)(7696005)(53416004)(2351001)(6246003)(6916009)(229853002)(81166006)(105586002)(6666003)(55016002)(68736007)(9686003)(5660300001)(4326008)(53936002)(47776003)(81156014)(52116002)(106356001)(305945005)(7736002)(58126008)(8676002)(316002)(25786009)(16586007)(478600001)(26005)(186003)(2906002)(97736004)(8936002)(50466002)(23726003)(16526019)(11346002)(2361001)(6116002)(476003)(3846002)(956004)(86362001)(1076002)(6506007)(386003)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2023; 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; DB6PR0501MB2023; 23:jSzh2dxmEfbMYDFOXkHrlK2zMZ0LbOBBaKnteio?= =?us-ascii?Q?gp/v7gHwvHMvru7am9pjHcAcaLcly6HwEDhVT6SzlzFbYJwqT1J2bJ7uRd11?= =?us-ascii?Q?Tc7h11KlsMxxgl9u7vXd44FxsEKtUcJOqXoA15u/QKhI0rzxSmTDIodTHIvT?= =?us-ascii?Q?yq59qAkIcwWYuYmQ2N3/5Q5gwp0aK14jLwdyko7mcTL7A6v0SVSNaZTLTLok?= =?us-ascii?Q?rKMStn/vx2BSdHsv8aOjP9NRmy/ZaK7HMClPBVeJKc7U2ADY9rnHbsKGsvWH?= =?us-ascii?Q?Mw3ZaupI+1q+6ePCWly1Vhn4TLk/qMvaZYyMHV1UMlRagfTxjTp3SVD6cwR/?= =?us-ascii?Q?/UBAfukzf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YYjGypMRalpWXDEf0WqPKhSXAcNQQWwMiPDvCVfqgVrf84c/UsqQToyz7ocST2kot9Tgl9SZDu0AqRj9m/MOdTcVnGTYysK2qux4QAT0eAlAXawv2MPFL/BY2mUyTDxV23PnHIZ3TSF7IWLtEe+U7ZJI10WgTomD2Bb/0x2q+mFE0E4VOfdiemHnIzAs8av8eO8Bo0ARYxex6qgPqjmpHu/aqy6PKWsm5n8SzW2oSIfbdvS8PXWf+XHjV SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2018 09:29:27.9442 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4689db7e-c9d5-46d4-8cce-08d61d493bc7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2023 Subject: Re: [dpdk-dev] [RFC v2 2/3] ethdev: add flow api actions to modify TCP/UDP port numbers 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, 18 Sep 2018 09:29:35 -0000 > > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 638331c17..f60be0862 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -3713,6 +3713,14 @@ This section lists supported actions and their > attributes, if any. > > - ``ipv6_addr``: New IPv6 destination address. > > +- ``of_set_tp_src``: Set a new TCP/UDP source port number. should be set_tp_src :-) > + > + - ``port``: New TCP/UDP source port number. > + > +- ``of_set_tp_dst``: Set a new TCP/UDP destination port number. set_tp_dst > + - ``port``: New TCP/UDP destination port number. > + > Destroying flow rules > ~~~~~~~~~~~~~~~~~~~~~ > > static int > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h > index 48c3c606e..c80771b25 100644 > --- a/lib/librte_ethdev/rte_flow.h > +++ b/lib/librte_ethdev/rte_flow.h > @@ -1533,6 +1533,20 @@ enum rte_flow_action_type { > * See struct rte_flow_action_set_ipv6. > */ > RTE_FLOW_ACTION_TYPE_SET_IPV6_DST, > + > + /** > + * Modify source port in TCP/UDP packets. > + * > + * See struct rte_flow_action_set_tp. > + */ > + RTE_FLOW_ACTION_TYPE_SET_TP_SRC, > + > + /** > + * Modify destination port in TCP/UDP packets. > + * > + * See struct rte_flow_action_set_tp. > + */ > + RTE_FLOW_ACTION_TYPE_SET_TP_DST, > }; > We need to state the corresponding RTE_FLOW_ITEM_TYPE_(UDP|TCP) should be in pattern -Jack