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 1734FA0032; Mon, 15 Nov 2021 20:00:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CFC6240E01; Mon, 15 Nov 2021 20:00:23 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 53B4740141 for ; Mon, 15 Nov 2021 20:00:21 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10169"; a="319719960" X-IronPort-AV: E=Sophos;i="5.87,237,1631602800"; d="scan'208";a="319719960" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2021 11:00:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,237,1631602800"; d="scan'208";a="735083916" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga005.fm.intel.com with ESMTP; 15 Nov 2021 11:00:21 -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; Mon, 15 Nov 2021 11:00:20 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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 via Frontend Transport; Mon, 15 Nov 2021 11:00:20 -0800 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.43) 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, 15 Nov 2021 11:00:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FS4jtkyVCiVofbvnoJHosnYy2h9q7ViqMjYoz4C3KV7hZDA1jLui8Voh4HLTI1qmzc1yiEK20ab50e2os4YJ8LoZjE+dYqgqec8OGeGAz5YO3UHt/jN1lu6ctChGf3xoimp1pnujPjel0f0937oT0L/MU3JuhgsvcSE9tet1zYnAP4YqtiJA+n5FRpW2MhFxAMOeVDqrgqDBC6PHAQj/WhtOCUISfOBzffhEgHFEt9UlO9fz8p0enBGeu3vA94uv8FIgtrTk0InDiZJSSNJYz8N8LiGfOLrYoVaSoJmvP513ya3yUhykh3XDqQPshkuehFATidoLK+GawVXiaDOfGQ== 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=DCuDwKczQPvZ5DipqIrluo6C11h9aCiNO3QUoTd01Yc=; b=MXsXru3MJQN+D8gVc1u+vRr+No1jXPZv16dZ9ckhCHlWLAmT8D8g5fjqSPerupm7OItJt1yQB2x+BN5YplWmIx/825Z7nw03s5VrLfhA0ZMCXxwwXzYFjOpFOPEGkhLOrsLuH8nIXHXJxXN+2SMXriFFUey5AJMgB7vO2Ekoxfk+gjWZiMU5UDzEGGNa44HGXoLP4NsHjL+ola2dLsDDQZtyqLEZb6ly0W6RyXqEBoxT866qve/C07GOM6mno64CHwHntj6Jk+18lKm0WsnQetHELmnBl9hUYPLQwJG4rOCNQzLalIn59Dq/bJVnFGikBj2LQapyIF+am8WX02qodw== 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=DCuDwKczQPvZ5DipqIrluo6C11h9aCiNO3QUoTd01Yc=; b=HTTNysX89Y+w+1vYUWf5EjkTrNKRGx1/V6jhbQB8zlsKHNYJmb7vAOvSxPk2pihIMuKUUESJ8wTX9SIG6hdl3P1CbHwca/9ESC46wbdY4KvupMInmaNNchAmL6tECcycpkeQZfSZlf8tl9CPrrsXBZrGjscmiu1Vriv6CmuGeDY= 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 PH0PR11MB5877.namprd11.prod.outlook.com (2603:10b6:510:141::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Mon, 15 Nov 2021 19:00:18 +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.027; Mon, 15 Nov 2021 19:00:18 +0000 Message-ID: Date: Mon, 15 Nov 2021 19:00:09 +0000 Content-Language: en-US To: "Xu, Wei1" , "Lu, Wenzhuo" , "Wu, Jingjing" , "Iremonger, Bernard" , "dev@dpdk.org" References: From: Ferruh Yigit CC: Qi Zhang Subject: Re: [PATCH V2] app/testpmd: fix parameters order when calling rte_ether_addr_copy() X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB8PR09CA0009.eurprd09.prod.outlook.com (2603:10a6:10:a0::22) 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 DB8PR09CA0009.eurprd09.prod.outlook.com (2603:10a6:10:a0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Mon, 15 Nov 2021 19:00:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 00f81911-530b-473b-4176-08d9a86a2a41 X-MS-TrafficTypeDiagnostic: PH0PR11MB5877: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GXGHxTBEwuc3MpS693N0VNYRaAm2iNcZTkFj1+Y65RjEQtRgCh+G4WPwap5SzEJbK58O+W3VvcrotZgZRtJWTr+d9nSOrD4XqMwONeHFCW1wdpFRvxvNiotHOiHhMFqEBrFnD6nzm6JMPeh9Q2MY5ytlZmmDWLAZEdz4rrEQGLA155pZYer7We3tQdUgxYfOZPtn2diBP3JFM6Nh5Tn7vd1h3Zh4bEatsRoPw/V5I81wOEAeI29FilSadnxKd5bTAlAXH6WuuvP7Mv2p9V3L+XsMEa9xq4yhHStJbwqWE/LznxRjweVRRREjCxC7Rd0sH0qfMR0v/CYk4t7aJ//d/JUiC5D2xI9JCeV1ZVdngTP0Ift68BfdLf1vXz4vP7YLzqO5UnS8Clscgk0J5YnLKv9iBaxJk3nqokwDrXz/C+85b7I7HAoygWO4mWIVqX56mIOHtM30sH2VXbO1LaEoW48Nbzm5mtDXA2J5AY+61KF1WqE3msX3eqMafo6/x+2+CDfNisQFfCo8gStoK6brFw+IBAGFuVDcz4vL8lVx9R6p1Ib/0cUCQwEwvdujaPYthS5AImNQd/mUY4EEPNyJOVQG8e/PR/vc4D6dG3L8mOsFtxkLeQbWMoedR159AzB6/Eb5mMHJwzglOZuxtsVMDkjh9nopuSRUESCh2CbZ90wZWeH2bH/GFBo8pFY4k9TUab8cgwlRLHypLD/gyQNHXQ== 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)(316002)(110136005)(5660300002)(16576012)(66556008)(66946007)(38100700002)(53546011)(107886003)(36756003)(66476007)(26005)(6666004)(31696002)(6486002)(86362001)(956004)(2616005)(82960400001)(44832011)(4326008)(8936002)(8676002)(186003)(31686004)(2906002)(508600001)(83380400001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VDNFdGFWYXFPY2lhZ2MwdnBnbHYvOEpiR3ZTRVU1YUxPK2JESjF2WURoelU3?= =?utf-8?B?ZUtTRmNDUkt6VFBYSGZlMEhQd29HVVJLampqc3dqY2RoRHZHeFF0RzRkYUFm?= =?utf-8?B?ZHRkODJnQURPdmJ0cCtpSzFRTFJEMkhiY01IY25DaHJkUllzSWk0WWRQNHli?= =?utf-8?B?SVR6WmZpLzJMblJ6YmNDZHMyN3BNS0pKTStYcE5DWmo3NzdoRVBaQ1pOOHQy?= =?utf-8?B?bGppZ1lkeVNYV0s3VHpscUtMQWNXQjJNRlM0NXNSQjliUUJjWGRCZGszVy9E?= =?utf-8?B?czZDc2J1akl3ZXgxekxvVkJRR0FhcFdvQThwNVAxeVN3WFRlWk90RmYzRUJs?= =?utf-8?B?M3NDc3FPWExuZVBnSENCUjNoT2tQYVVYYU5sTW14QmZnVCtTNXJEbm8xSjlK?= =?utf-8?B?eDZFUllrSkhhRmU4VENCUWp0RVFWV3JaTCtsNGwwL1pUZTRKVTNiWk91MXM0?= =?utf-8?B?bUNHM1U2R044NlFDaDcrV3l5V2RnV0puN1d3YzduVVVqd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dW40ZlRsWGMyekVRcWJORlFIRHdTTjEwWjBy?= =?utf-8?B?UFZ5M0FWbkxlQW5BYWlpSkdDTlFHdmYxbUZuWGRHRnQ1ME9xcjZKdEh1WXhp?= =?utf-8?B?SXVBU0QyR2oyMDBrTTBpNEdWRk1JVDM0MDJENHJ5MnpValZGd2FzNVN1NkRV?= =?utf-8?B?b0lJVm80dEM3WFlXSm9vUm1SK3RVS3pZNTZmNjZHTWtpZklzUzlRK3BmUGVT?= =?utf-8?B?MDFHQmdici8yMmZQVE9xaVB3Sy8rOTJ6dkNXTUVBSU5ZbFM4QXZKRmlIOWxs?= =?utf-8?B?SXVRdmZ2djN2cUVyL0pSUzFZNjd1MWRKU0FybVV4bld6RHFzQnQzSmpHM2w5?= =?utf-8?B?cFV5ZkVtK0N1TjZYNlkwQXptTjV2ell0SHZyN0l1d21LaEplR1pib0FwNEg0?= =?utf-8?B?RldLRkRsVlBFL21qTU04Qm5xdnVLOHV4eU8vKzdSa3pBdHo3ZGkxcGdhdWE1?= =?utf-8?B?bjVIVThFZnZQZkk1VzlEdzlxSS8yUk5ITWgxRzVrR0NUaWlNOVNmcTlSemRO?= =?utf-8?B?Vyt3Q2lTQ0huTEt0RXZFVnRXMTRuTVQ5cHVZaDJKbXZKSDdDSEhiY3RYTXUz?= =?utf-8?B?NTdYd1BtY0ljelVGWnNLYXR0ZTFCSEhmeC80YUNES3hLOHhDNmp3ZlF4d2hn?= =?utf-8?B?THpXN2tkRWI4RXJPQjVyOVh2dUJ2aFNrQ0VHWnhJaTRtSmZEcE1CRnI4M2JZ?= =?utf-8?B?OUowTUFNb2tFTVR2czd2cXZiMm0zclNCQVhKWEN6RkRNZEZnL1VGL2dNaU9z?= =?utf-8?Q?5fDGQQxES7+uykNPPTcsDN4=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 00f81911-530b-473b-4176-08d9a86a2a41 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2021 19:00:18.1253 (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: aMBMpTWNCNhxbwGxpuq7QWDpbAevIbkFtJ+YVGQIlZa7V2K5A7CFU6+Ch3iGlrxwxrQnQfaor0gwZAOOYqc7RA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5877 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/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; > >