From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9AA14A0548; Thu, 11 Nov 2021 14:00:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88FB74116E; Thu, 11 Nov 2021 14:00:25 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 143EC40E03 for ; Thu, 11 Nov 2021 03:29:44 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10164"; a="212864035" X-IronPort-AV: E=Sophos;i="5.87,225,1631602800"; d="scan'208";a="212864035" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2021 18:29:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,225,1631602800"; d="scan'208";a="492367298" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga007.jf.intel.com with ESMTP; 10 Nov 2021 18:29:43 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 10 Nov 2021 18:29:43 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 10 Nov 2021 18:29:42 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 10 Nov 2021 18:29:42 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.171) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 10 Nov 2021 18:29:40 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=flkxONLTokyEB/b2m5zcdVXtWMAypI7x6NJ5vWLsQ9Qxc+4R71gdYzkC3rWfKZ96Wj9am5B/vsI0dPAEtgDX/AVJhQzsdzSev1wpHmCHeblM+EWt49iqR0nislQPR/9uuayCThsI2VR+qZqBL1r0imjyOA60/7EJIBVWRmh9X2LZKZIOrERsH10HOIAMYsIJpZYm9TQRDIlC1gJy7rFRzDI0q0x3o0SGA6D6E2/0qu9jHUBKSuTuLLkWuYU+fc8ymYX0C/mPn1vJThaZPrOKniqjgf8uiuhyHhbeqmkXU3TQ+XZcD8eba7DfeYj3G2q7NDkfzaZykLTpWeToU+ujhg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=j1qXmxjVWzthc7UZtZKJlCWal4UZmWlMkZP0D2Dy+Dk=; b=GdxvRKmmx1XudBqAu3EeN5TdedeVrOzCeq7aFwCOj5I0lbBkg68fk01FCBkAZRy8vzM9ONbsWhmsQNpjuM5Lz93zu/Z5bn9Fewqd/j/vs+9ry3Xyv5P4WIYGpLqNsnySAsqjlyjXREcA+OEnBxBtb7ewFgLoZeIJ9L2pz+uRkgv1CIm83gneukJOIBNWyQnVENFyui3LsQRSZClcWbrc1EqKcEBCS218iHJe4x5as9wKpSQ8YkekDF2272Q3ScVwuhyDI7QNC+BNpxuzRWQJyy/Cdq0YzMQtlq+uACkDKDYho6n2MfhnUqL8A3qvjQq/cppk1dmExfBzj3IUFvHCjw== 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=j1qXmxjVWzthc7UZtZKJlCWal4UZmWlMkZP0D2Dy+Dk=; b=TYCxZ9vwbqcnxN2jBKmMyzlREow7aELaUYYlGaHi8qCn+Vw0fqp47rUf2/lN9wDlFWfmtThWjkBt8zO5bcfcZP26doDfSkk3Cw9yzpB6kKaBZrTYCVhWkvibJQPaDMwXyq+Yn+E83njURYkBSnxl/4eL64qGW9/pZFXL2/SEWIw= Received: from PH0PR11MB5159.namprd11.prod.outlook.com (2603:10b6:510:3c::20) by PH0PR11MB5784.namprd11.prod.outlook.com (2603:10b6:510:129::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Thu, 11 Nov 2021 02:29:38 +0000 Received: from PH0PR11MB5159.namprd11.prod.outlook.com ([fe80::892d:1e06:1026:6760]) by PH0PR11MB5159.namprd11.prod.outlook.com ([fe80::892d:1e06:1026:6760%8]) with mapi id 15.20.4669.016; Thu, 11 Nov 2021 02:29:38 +0000 From: "Xu, Wei1" To: "Lu, Wenzhuo" , "Wu, Jingjing" , "Iremonger, Bernard" , "dev@dpdk.org" Subject: [PATCH V2] app/testpmd: fix parameters order when calling rte_ether_addr_copy() Thread-Topic: [PATCH V2] app/testpmd: fix parameters order when calling rte_ether_addr_copy() Thread-Index: AdfWo0rVQMMwst4lR1KI4Xsb7uCiBQ== Date: Thu, 11 Nov 2021 02:29:38 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 93726185-b8dd-4122-8a30-08d9a4bb1bd1 x-ms-traffictypediagnostic: PH0PR11MB5784: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: b6MIzn9H+WmoCpdQdDZZNs0oOQEo+xnJ6WwXFjrjJE2crpUYbvq8+8UnCFZvnXqM6d9Shjx2TSzYLNgF7ZFH2Td9+P3BPKYQsTprqEA1IVkpU1JkGiaQ7Fge3oR9J0baSNBkDxHwRgl3bQIu8YF0L4tBP3hXo/Uqb3XjmoKrVH1KZKZjx5scOIVqbsknVImpVLMY0Uc5GG1zutHNZRkBdbanuJFiuZVcutnYhIJWLo39CJGP3HCgMQEsHvaU2BlwTBIN+oNRRR7tgDzGoNJE1PMhr/4v/N/eotN3bTaZ3eSm8aKYgMRUmGIjHA5X0FVXE+JfmI9CfGdK6DxlyI7o1TRNQj/mPRc4bVle0aRo/WVvZvS6YvmKFlmikh4r8clX9E/4AOhhPPz3dp2nsV6tNfO66szHxfdPaI3+4sOAS4BhSYYvG4KobgfrX5Bwb5lOXMmchK8dCSkYIB8a9FXrl2W6YjksQuo73+HFNqYymvzvH4krUZf9TkZog/xgSuShsLPjmtqQ7bJDUoBpkb108Ws5bABmMqU2drY0UizsuNQFmhvaLFK+xlZKz2RK56zCD69AVFNHhyND2FWJiY3/Ef64lMKG8So2PJXP2jytikrEo1RWieDaifqBbokWs+cIp5FrQc+AB3IG7HwDNs/LQZGJgXPnlauXu/s1AZWVR9MrlnjtCOvVXpXTr6JZRbFAjKjbEdZPhzyrQtwYzQfs4A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5159.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(508600001)(82960400001)(76116006)(66946007)(33656002)(38100700002)(6506007)(110136005)(186003)(86362001)(38070700005)(26005)(5660300002)(2906002)(122000001)(66476007)(64756008)(316002)(66556008)(8936002)(66446008)(71200400001)(7696005)(55016002)(8676002)(83380400001)(9686003)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?AVval+hdtWi7PEySDJ6usUgpKWsU2/Zish2/tJr7SyiRlj8n+e8H190PkuTv?= =?us-ascii?Q?gjU6pfs3G9LrXfcKcefAubwY5T9fIL2CN2Q2us1gFeokr2u0G1XUhw9okNh5?= =?us-ascii?Q?7xnhMZvDxfz5oY4uy3mbSi13yWGvdzn+AsUubNa2OjSiMPpUsjZA4WvRt1Mm?= =?us-ascii?Q?+jLDnadRQBWa81jaqq1Z/NGPvZY4IFixDrdcM97CQzLX5ngSufHZfveQuu3l?= =?us-ascii?Q?wFXaJmxMkBOXI81EBKCRmAIKDwutMIu6WZkLALcNvqIWSZpx1XftyV4NnXmn?= =?us-ascii?Q?k+y8LI+409au09ct1KaShoHHY/k0qfUQ0FRVuoKIt4cCzjpNrcVrdSPIgJmv?= =?us-ascii?Q?2l5DzGnRzu/d3g3j8UMMbyvbrn6tZQO26cqZo3P67d2d+YsHbMSCTjpz3r7e?= =?us-ascii?Q?TWeiv/lAwR4l7ovBre9boz/1cZbJ7RuHQ0huqFC/m1lCuJl7j+CX7UlapMWm?= =?us-ascii?Q?TjmI8+ROoeKpqj3MWUiJ6h5dScx2TGUI8HsXEWTR/k4dwzuPsVnuVd50D57L?= =?us-ascii?Q?GrcNgY2suZjGTNVxTEdnru+F/jfXefCV+QKSBSFMqM3sZsveg1Qn6ksL4Rp+?= =?us-ascii?Q?WWzk5vNLvskUi55r+Oa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q?U/FEneSa+aarNa557rCDihaumqnAkbCyrZGj4wIVPeNjJh7tCLmNSVSPXhuG?= =?us-ascii?Q?/lIQ3dDfUBzVT/770CMCIWJr3mR4RJeQLW1FTTxaf/5Hl1rRsS2R1TcQaxOU?= =?us-ascii?Q?aGgtXcRFWztY8A9REZSo8Ng=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5159.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93726185-b8dd-4122-8a30-08d9a4bb1bd1 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Nov 2021 02:29:38.1157 (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: +nVddHlbb2LUQFhmQGv0kkZYnEUjVqeR7/SEc6s/MVjVlCuG7O6Z6NfsrGIJmEGeg0/m+H28ECZTw5ACbvv5OA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5784 X-OriginatorOrg: intel.com X-Mailman-Approved-At: Thu, 11 Nov 2021 14:00:24 +0100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Running in 'csum' mode, the 'from' and 'to' parameters are not in the correct order when calling rte_ether_addr_copy() which means the 'src/dst' mac addresses in the mbuf will be overwriten. As a result, the packets will not be recognized and received by the receiver(s). Test CLI: ./app/dpdk-testpmd -n 1 -l 1-2 -a 09:00.0 -- -i --forward-mode=3Dcsum Fixes: 10f4620(app/testpmd: modify mac in csum forwarding) v2: - fixed indentation and long line warnings. Signed-off-by: Wei Xu --- app/test-pmd/csumonly.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 8526d9158a..08484fcda2 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -872,10 +872,10 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) * and inner headers */ =20 eth_hdr =3D rte_pktmbuf_mtod(m, struct rte_ether_hdr *); - rte_ether_addr_copy(&peer_eth_addrs[fs->peer_addr], - ð_hdr->dst_addr); - rte_ether_addr_copy(&ports[fs->tx_port].eth_addr, - ð_hdr->src_addr); + rte_ether_addr_copy(ð_hdr->dst_addr, + &peer_eth_addrs[fs->peer_addr]); + rte_ether_addr_copy(ð_hdr->src_addr, + &ports[fs->tx_port].eth_addr); parse_ethernet(eth_hdr, &info); l3_hdr =3D (char *)eth_hdr + info.l2_len; =20 --=20 2.27.0