From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D46E1A0598; Tue, 21 Apr 2020 17:47:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4EE661D445; Tue, 21 Apr 2020 17:47:21 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 466591D440 for ; Tue, 21 Apr 2020 17:47:18 +0200 (CEST) IronPort-SDR: KX7CXFwVyKUHCjplZ/T2Rw6C9Frm6cSJhkVZaEuOGB4WJ0UYmtEpntUPYd6ARHi96aJbNZGHgi DJiGHqsE6clw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2020 08:47:17 -0700 IronPort-SDR: 0aZ6bUa/w7IByzS/WlhBpL7t5oAy1M3X6q4FYAxRsTLceHSCplbR4QkNypJA5ZDzYM1UhAAllU eAX7B1X8QPKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,410,1580803200"; d="scan'208";a="279684718" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by fmsmga004.fm.intel.com with ESMTP; 21 Apr 2020 08:47:16 -0700 Received: from orsmsx114.amr.corp.intel.com (10.22.240.10) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Apr 2020 08:47:16 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX114.amr.corp.intel.com (10.22.240.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Apr 2020 08:47:16 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.105) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 21 Apr 2020 08:47:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bARxNUq3kOVmO1O/QyMkhyJbi5gxD9hY1tQB7XZsk8iJ+OucKsefO/Z5QepXZB1iCwUZbyOzi33PA/Sfi6+lBCexO7lGeB4Fu9ha8RRTSph89LuKO//7NSI7YyAVp+mrzvswy7yutyxz774EuBEVz1az6SqeMI25QGKNnqEfFWk13yFQ2cxkNvWPNK7d2qrhO6XaoVIsGv/wHp1EKwB2qr/1/dMjxqM5Sf+lnqzbKn4r/bf3Im6cHbi39PZWxxsJY4BLjqGTi9auCw+g0ymxkIGw+16gBdJIGMvDHcrT1BkJAIodPVxctm1vxhWhcQC5hih8A4Kt6znl5nyzxXajmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yCSwMqnU6gQFoGk3HdAHXHTd8eqKMZcafPFanqJw73w=; b=KYk2oi2SoJLAKZKtnT2brMhs5WjcBjN8saYcBFMGOrKl+l0TPR1aAa+u8eBFifDoFGofs4X7NangNL6Bgv6L4+1GXPxhSxoLCiIt5S7ZzI0W7PCSxJzzHQ6pwVgijPdA3tDLnZB4A3BmUHP03xHv6WOygEF2Rh31i1C7xkpNvwVlDdKtTEM32i6NBWczPVObX433aXpvhZtvj8oQX+T2LWhBFDK/prOQ6aTVHsZVIvlxfW8XpOTiSX1LypeT81PfXnoZsyHY+8HymP491zSHytGMFaddxaqPd/lHInzloIHmhYmazyuVjgKlOB+Jb/zm9REoG1e/aApBH3Xwt+IQdw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yCSwMqnU6gQFoGk3HdAHXHTd8eqKMZcafPFanqJw73w=; b=wDFfTlIR8OT4SgwpaxkpT2mES6OR6qR7cV1fpQf759SlF4A7PhId2KtrOXovFSvjcTin9v5Q98TavY6uBA3eWQK9R0F1WGh0IIfu0fl/D/20N0DOge7YgdFaRKahuVk5Hf1zql/9Cs4CP7H6hrl/uMLCjBB4f56n+y9lOxVcoIo= Received: from DM6PR11MB2537.namprd11.prod.outlook.com (2603:10b6:5:cd::16) by DM6PR11MB4059.namprd11.prod.outlook.com (2603:10b6:5:4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.28; Tue, 21 Apr 2020 15:47:13 +0000 Received: from DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::7c08:b4ae:e9c2:a4fa]) by DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::7c08:b4ae:e9c2:a4fa%6]) with mapi id 15.20.2921.030; Tue, 21 Apr 2020 15:47:13 +0000 From: "Iremonger, Bernard" To: Xiaoyu Min , "thomas@monjalon.net" , "asafp@mellanox.com" , "Lu, Wenzhuo" , "Wu, Jingjing" , "Mcnamara, John" , "Kovacevic, Marko" CC: "dev@dpdk.org" Thread-Topic: [RFC] app/testpmd: add generic swap forwarding engine Thread-Index: AQHWEyy0hTVBjZShRUuCNicFaa977qiDwOZQ Date: Tue, 21 Apr 2020 15:47:12 +0000 Message-ID: References: <47cf5b417fb3c74c04e5a020dba700c5d748383d.1586958002.git.jackmin@mellanox.com> In-Reply-To: <47cf5b417fb3c74c04e5a020dba700c5d748383d.1586958002.git.jackmin@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=bernard.iremonger@intel.com; x-originating-ip: [192.198.151.179] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e432f5b1-38cd-4f73-8b6d-08d7e60b4283 x-ms-traffictypediagnostic: DM6PR11MB4059: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 038002787A x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2537.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(366004)(8936002)(53546011)(26005)(8676002)(81156014)(110136005)(76116006)(66946007)(7696005)(66446008)(64756008)(66476007)(6636002)(55016002)(9686003)(52536014)(6506007)(86362001)(4326008)(5660300002)(33656002)(66556008)(498600001)(186003)(71200400001)(2906002)(41533002)(921003); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9G33ey5ZwbOMlp/pcN8+v+vcgZWZSwzkkhb2su1H7Qge2alGPqUXzr+GjTzv/ykgPMbZv23onx4qPV9NG8M9QBcHWe8DalVYrHzRMZBl/P3++3+Q5taAUirUE93RDJzEXUGWP5kS4I0vY3NB/yX+JNYPOFZuX5GMSlmqG/m9tkHiRS48Q/fAHrvvAE6D9MRFikKRbJhbXzpczgBUdafpdnPaKYOinjfOPwdY5sH7SUYGeI2cMX8FIpC+d6HonqP9JOAzv6f7mdGX0lotB3F+rJpvT7TWgcIP5QKnQlHC0DAMg5S/Gc6/3w6/v1nH+Og3QBl3//nEKvdy7Z+zSpoZdvHQ4/xspVqhLn/8gEK7ZNnBIApgTHKBSZi+bvMe2cy6aqKBkwUYWARUjwh9gvEdQ+5vZqyxWHsaI9pz5L6/iqWoA4QjL2sIKw+VLpZX8KH2vNXZEglnuLZw9ZJcCIWsiOi5sIQh9yA6IM2znZtE8q96j7Tmc9f+kfTYAG8ArPj6 x-ms-exchange-antispam-messagedata: BSrLrIgSmT8QIpkTl34h6o0HIs0JrpfR9BYiGGj7m3Ju82YD1qIuNESqLpOZGPtq7hMlk9O6oHklhanpP/TuG18w8rx+x7OSvL2ias5gWD+2N2qapkI/64CsDjJu24Cyi0kpfby7l4ITV9sjfBkHxQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e432f5b1-38cd-4f73-8b6d-08d7e60b4283 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2020 15:47:12.9481 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1XVJ2wfp4bWQe3UpR35Qr1yW8IeAE+mxKsmmF50B0fV8uZGfWvMmYjzeOua1XXCu2gDayNplqZ7RFypZkJflzOpYOjwGlVdG3H+Xsk+RziU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4059 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [RFC] app/testpmd: add generic swap forwarding engine 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Xiaoyu, > -----Original Message----- > From: Xiaoyu Min > Sent: Wednesday, April 15, 2020 2:49 PM > To: thomas@monjalon.net; asafp@mellanox.com; Lu, Wenzhuo > ; Wu, Jingjing ; Iremonger, > Bernard ; Mcnamara, John > ; Kovacevic, Marko > > Cc: dev@dpdk.org > Subject: [RFC] app/testpmd: add generic swap forwarding engine >=20 > This RFC propose a generic `swap` forwarding engine, which could be seen = as > an extension of existing `macswap` but provide more flexibility. >=20 > With this generic `swap` forwarding engine, we can `swap` the source and > destination of L2/L3 address as well as the source and destination port o= f L4 > according to the user inputs. >=20 > This will be very helpful for developer/tester in some test scenarios. > For example, connection tracking functinality in OVS, which needs to swap > UDP ports in addition to L2/L3 addresses in order to complete one > connection. >=20 > Signed-off-by: Xiaoyu Min > --- > app/test-pmd/parameters.c | 2 ++ > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 15 ++++++++++++++- > 2 files changed, 16 insertions(+), 1 deletion(-) >=20 > diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index > 404dba2b20..5c9aecd6cb 100644 > --- a/app/test-pmd/parameters.c > +++ b/app/test-pmd/parameters.c > @@ -147,6 +147,8 @@ usage(char* progname) > "is default).\n"); > printf(" --forward-mode=3DN: set forwarding mode (N: %s).\n", > list_pkt_forwarding_modes()); > + printf(" --forward-mode=3Dswap[:TYPE[,TYPE]]: set forwarding mode > to swap " > + "(TYPE: auto (default) or mac or ip or tp).\n"); > printf(" --rss-ip: set RSS functions to IPv4/IPv6 only .\n"); > printf(" --rss-udp: set RSS functions to IPv4/IPv6 + UDP.\n"); > printf(" --rxq=3DN: set the number of RX queues per port to N.\n"); > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index dcee5de455..27f0600493 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -298,7 +298,7 @@ set fwd > Set the packet forwarding mode:: >=20 > testpmd> set fwd (io|mac|macswap|flowgen| \ > - rxonly|txonly|csum|icmpecho|noisy) (""|retry) > + rxonly|txonly|csum|icmpecho|noisy|swap) (""|retry) >=20 > ``retry`` can be specified for forwarding engines except ``rx_only``. >=20 > @@ -336,6 +336,19 @@ The available information categories are: > Simulate more realistic behavior of a guest machine engaged in receivi= ng > and sending packets performing Virtual Network Function (VNF). >=20 > +* ``swap[:TYPE[,TYPE]*]``: Generic swap forwarding mode. > + > + Swap the source and destination address or/and source and destination > port of packet according to ``TYPE`` before forwarding them. > + ``TYPE`` could be: > + > + - ``auto``: swaps all supported fields (L2 to L4) if available, defaul= t. > + > + - ``mac``: swaps the source address and destination address of Etherne= t, as > same as ``macswap``. > + > + - ``ip``: swaps the source address and destination address of IP (v4 a= nd v6). > + > + - ``tp``: swaps the source port and destination port of transport laye= r (TCP > and UDP). > + > Example:: >=20 > testpmd> set fwd rxonly > -- > 2.26.0 This patch is giving the following checkpatch errors: root@silpixa00399470:~/dpdk-next-net# /root/dpdk-next-net/devtools/checkpat= ches.sh /home/bairemon/patches_20_05_patchwork/RFC-app-testpmd-add-generic-= swap-forwarding-engine .patch ### [dpdk-dev] [RFC] app/testpmd: add generic swap forwarding engine ERROR:TRAILING_WHITESPACE: trailing whitespace #97: FILE: doc/guides/testpmd_app_ug/testpmd_funcs.rst:340: + $ ERROR:TRAILING_WHITESPACE: trailing whitespace #102: FILE: doc/guides/testpmd_app_ug/testpmd_funcs.rst:345: + $ ERROR:TRAILING_WHITESPACE: trailing whitespace #104: FILE: doc/guides/testpmd_app_ug/testpmd_funcs.rst:347: + $ ERROR:TRAILING_WHITESPACE: trailing whitespace #106: FILE: doc/guides/testpmd_app_ug/testpmd_funcs.rst:349: + $ total: 4 errors, 0 warnings, 35 lines checked This seems to be just a documentation patch. I don't see any code to implement the new forwarding feature. Regards, Bernard.