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 9D747A0C45; Mon, 22 Nov 2021 10:10:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1400E410E8; Mon, 22 Nov 2021 10:10:50 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 9B07D4014E for ; Mon, 22 Nov 2021 10:10:47 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10175"; a="233472354" X-IronPort-AV: E=Sophos;i="5.87,254,1631602800"; d="scan'208";a="233472354" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2021 01:10:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,254,1631602800"; d="scan'208";a="537818439" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga001.jf.intel.com with ESMTP; 22 Nov 2021 01:10:45 -0800 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) 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; Mon, 22 Nov 2021 01:10:44 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Mon, 22 Nov 2021 01:10:44 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.172) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Mon, 22 Nov 2021 01:10:42 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b2kYjWSprl956H5H3OIXBmYf7u0zJIoJSAiqqPACGO3wrV5LbbhZ7RDe/8s4Gf1QuujwfQ5I+JIq9Zi/Wgb9OHKdWsn9UjDKcGYgomXRD7lPrMFidqFQ2q8wiaTk3NTubu05LXgEE2uCvA/YLe+fq/AwtVghHSQ8SyF+OiIqYTd7dWKS67YQpl6Q/i43jnhJA6dY6WZf/JVC8enNUNiV4MDk1V4wXIggw7gTbMKrTWTZ7Jgun60Aj/kqtAca7Z2/tt6OOogJe8XcR5/V3Ya9vyavFPwGhHsfHT48f2Hyb35Nw2HKcgkZUrBNV873brylvHcj3m00aW5JUUwTVq0hPQ== 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=vk4a9axabYDVCjjc/IpUvzN04ehgt/Ns+AY4OxVDubg=; b=afxm8VJZVOB1Dj1ZwJ0qq5kkOyw2Z50RD6mQcg6aKy8+1GiYae7lxshFxEHirnFM3/KNY0lbrCpCyG0SORfIrNCMA2jPnEcCTJvqw0D6i6eGtA9S7pxh5s/JE+gdRSHH+dEJW9CwGc+gknxYXGK/ODz/yg3aF3JnA8D8WRUOwrmJ6ljW3aDGV87TdOlFnIsQsUpA1VAigVsOYXj1VEAmeIWGEfgK00VQ6UPWhhHWb4OiYhEJtlybdVFe/TkawpWOFCSzBfWfNvesxFY/EEkz+v2IHjnmenbZG+aI8YUs6BNXKvb0xkOSkp37n1mLW/nOJKnEFze51qYcw4ScpsRq0Q== 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=vk4a9axabYDVCjjc/IpUvzN04ehgt/Ns+AY4OxVDubg=; b=nb9AN5x0SJRsJz5o3FhKu4r8AkEfdC92aWAp3dplsYsR/U81xkaJYDHTbmGM2sA+jsFkxfhcjv84VDoOSMSHfqCf3Ys+DFa+RcVsQV36tWsXxGwNaXgOMdxioJzTbElTXDKgSUoXgQMsPNs6EPng2dQR/K9wwzv55t72UkR6+uM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5782.namprd11.prod.outlook.com (2603:10b6:510:147::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15; Mon, 22 Nov 2021 09:10:38 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c%5]) with mapi id 15.20.4690.028; Mon, 22 Nov 2021 09:10:38 +0000 Message-ID: <7a48e373-d97e-5b03-6ce8-e52008f51e84@intel.com> Date: Mon, 22 Nov 2021 09:10:32 +0000 Subject: Re: [PATCH V2] app/testpmd: fix parameters order when calling rte_ether_addr_copy() Content-Language: en-US To: "Xu, Wei1" , "Lu, Wenzhuo" , "Wu, Jingjing" , "Iremonger, Bernard" , "dev@dpdk.org" CC: "Zhang, Qi Z" References: From: Ferruh Yigit X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB9PR01CA0009.eurprd01.prod.exchangelabs.com (2603:10a6:10:1d8::14) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB9PR01CA0009.eurprd01.prod.exchangelabs.com (2603:10a6:10:1d8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Mon, 22 Nov 2021 09:10:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 37aa6a8d-0783-4d29-3145-08d9ad97f364 X-MS-TrafficTypeDiagnostic: PH0PR11MB5782: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: htZa2lzSGpTnalLeYFSeyiH8Hyp0jw7HNcJd+FFXu12C5ZK4uvUR9yBcBtJsILWnTsCr31EdSP4p+TnSuVIidygNXfXjThV1APTXzn4nFa9NDD/dmpHzzKfVITIR6vIzypU+i/F2wwN+4p+dnSzgZC55Ir/DAgirdv/B3vJK40A7rb5I5FyaVA7a5cJEWUEzBywV6dT1k+2EZncDxDi5ltDYAJeUEN5cOFG4xkHwAGurHIS2M7wgt4sblVC8xhib5e8vN7aj7c8Up2T7GuxTKjK9ajD3i6vz17gFejlnnaDxCdn9iCtm+g5zReJjJKFwY/cKfJ/Jfk3pkShoEX2clodzWQrG317HHk3UGqIUJ71wa283sGrQOVXU9uM2aOzCx+GNslOfiB/Pxfs7mQ9OY7paR6qBkJfrzMMtBIrT3lA4Dh8h9N3sUMtZjQAWQ8YJm+kTYFYKotp/bZ6dEd6rWwrzvS6V9JggHYbkZpnygjs5+jKTL4K9eT4KrzN2np0bDW5urQkAL24egyI5ZZp79fX2M7OpS2unOEoSMb41IzF3e8eIa7xN33YfG8rpnFBsg7mf2aDpI0A36Iyuhek9gBshCCrDLfUiVz9sd8KTjAom6mIo0oUedv5slJBRzrFx6zeTByxFah4RHjCQEf7fDQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(44832011)(110136005)(956004)(8676002)(66946007)(6486002)(31696002)(66556008)(6666004)(186003)(26005)(66476007)(86362001)(38100700002)(5660300002)(2906002)(82960400001)(36756003)(16576012)(53546011)(8936002)(508600001)(83380400001)(107886003)(2616005)(4326008)(31686004)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Q0c1MHJhT1lsUVV0VW5nZWJmUlFzVzVWMkVJVW5ZYWM1VEp1ajlMS3BLdE8r?= =?utf-8?B?eVRkTUlxK0R4OVpBTFZ6aEFxMDFoSnZRc0Rvc0FYU3JUUW5BemFVSGtCMFky?= =?utf-8?B?SDFvSTRHdWNUQTNSNi9uZ0wrYWVHVTg2K24vdHA4RTZUdlQ4aks5b2pvN2Jw?= =?utf-8?B?bGtnYnZISk53MDB2aDhwZjgwUjlaR0N0dnhMOStCdFdqcXJwbW40bUlHY3VL?= =?utf-8?B?L28zN0oxNUpPN1ZHR1ZmSy9IbmJQUUNXWlQxa3VVQ0VjUjE0dFJ6Smh2SFRp?= =?utf-8?B?VjE4QXNBLzdVU2Nyd3dhZHMwcTR5VU0xcjc4cUtObisvUzgyQU1tSFZRRDRx?= =?utf-8?B?Q1NuMy85WDhUY3JIS1FEM0hOeXBFTUl4UUsydGxDY3U1Z241R01RbXZwTUpW?= =?utf-8?B?OUZqbHFvR3VQL09GaU1PclhjYW1CUm1FVmx2M0JrdlByOWk0Uk9wSzVUcStn?= =?utf-8?B?V3J0SGxRRjk2UXRlc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WZiTUdEZmVqVEJoRFAwaHRubnBpN1I5TUJwdHI0WEVaQjFKZmt0dlB1?= =?utf-8?B?amhLUGNmK1RxWGNub21ta3lTcXVIUVVmWWhTbUM3bGFYQ0ZOSFprK1hDbWRw?= =?utf-8?B?TE9vd1Qwd1pTMzBWVXdCSmxZTU40SmNLQ09PdUpKMC9QUmJYTkswanhKUFV3?= =?utf-8?B?U24xY1pGUXprb3UvUFh6TUZLRE14eTZQaE9tT3JZSGtOdG5XdEJPL0QwSE8r?= =?utf-8?B?QlIwb3pFMHVOdzdCTEVqSDUxNUk1RzBGZU9qTStzQmgvd3Z4OFczaGNjaUFu?= =?utf-8?B?b0NLNDlRcWRvdjcweDRpQ3JmVlFFaktXbWNnbnNIV3VmQnNBdnVmZHJyYWo1?= =?utf-8?B?Q1c3VC9DQUdlQXpYeUQ0M255bytMTlE5bnZTbVJtcmxlYXRSVVFaQVVHa2Zs?= =?utf-8?B?ckdwR0lMcXJiSWUvZTBlVmM0OEpQYUpmK0l5VHVIZDBNUld2YXRycEVrbDRw?= =?utf-8?B?WjJtZGIvWWlHZ0YybEpBeTduY21mczVXKzduS1BlUXVQWkRncVBtcjVBUnBn?= =?utf-8?B?dDVtL1E2YlVHOGR2WDVFUE5uVUE1VHNZdnh5S2IrSXJacFJQODg4ZHJBVEtJ?= =?utf-8?B?Q1JDTWRKQ01mZmtUZ21pZVdaQXpQUzd1YVFORTh6WGQvWDVyNm9Rc0pUN2dy?= =?utf-8?B?WWpMTmtSS01qbkcycGNlVnRlVm9hYVlPVlczZUpadnJXaElzQ0RMNUYzV1RC?= =?utf-8?B?cXhWbHdoMFZQaFBJeVI1aFlacHZFWjhlVCtlR2FOcnlZYWtnY3huL2pCam1W?= =?utf-8?Q?FKSW35VeHI6Jmy7GzLIElrM=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 37aa6a8d-0783-4d29-3145-08d9ad97f364 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2021 09:10:38.7121 (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: yPwEkNVhnkNjK5by7f4jRA4M8SJoHsXfla7hLlqSLEwtbPFZXaZ4jak+7xZ/D0Vt8ZXOQmKp7LTH7K3nr/KdFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5782 X-OriginatorOrg: intel.com 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 On 11/22/2021 4:00 AM, Xu, Wei1 wrote: > Hi Ferruh, > Thanks for your explaining. > > It it by design, maybe a check and only rewrite the mac addresses when they are explicitly set? > What are you trying to fix/achieve exactly? > Thanks, > Wei > > -----Original Message----- > From: Yigit, Ferruh > Sent: Tuesday, November 16, 2021 3:00 AM > To: Xu, Wei1 ; Lu, Wenzhuo ; Wu, Jingjing ; Iremonger, Bernard ; dev@dpdk.org > Cc: Zhang, Qi Z > Subject: Re: [PATCH V2] app/testpmd: fix parameters order when calling rte_ether_addr_copy() > > On 11/11/2021 2:29 AM, Xu, Wei1 wrote: >> 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. >> > > Hi Wei, > > Original code looks good. What are you trying to fix exactly? > > API order is, 'rte_ether_addr_copy(from, to)'. > > I assume your expectation is packet to keep original src & dst MAC address, but it is not working that way, dest addrs is written by user configured 'peer address'. > > With your change for each packet, packet mac address written to testpmd configuration, which doesn't make sense. > >> 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=csum >> >> 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 */ >> >> eth_hdr = 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 = (char *)eth_hdr + info.l2_len; >> >> >