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 C9113A0543; Wed, 15 Jul 2020 12:35:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C61221BEC0; Wed, 15 Jul 2020 12:35:58 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50055.outbound.protection.outlook.com [40.107.5.55]) by dpdk.org (Postfix) with ESMTP id 1653D1BEBC for ; Wed, 15 Jul 2020 12:35:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VbhKa1wL+Rs6gAhvp72AyU3gQGF3fOO505+k8NBZRTI=; b=8+YF9bYWnnTyiypKxJR6jNJD0VOKPqgX4ynbh1svVSBrlPPMXbH/yt+ICkObd5ybPw7yJFjmPJ8OfMgiCA3yeJ2xQzfIBADTUlhYnCVSw+WVsyZG4jZRDdPLlwaK/1PI42496HlcdqwKB1vz7aFHWEhKeHIvOyKrNv012f7wqD4= Received: from DB6P193CA0010.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::20) by AM5PR0802MB2481.eurprd08.prod.outlook.com (2603:10a6:203:a0::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.24; Wed, 15 Jul 2020 10:35:56 +0000 Received: from DB5EUR03FT045.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:29:cafe::e2) by DB6P193CA0010.outlook.office365.com (2603:10a6:6:29::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17 via Frontend Transport; Wed, 15 Jul 2020 10:35:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT045.mail.protection.outlook.com (10.152.21.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18 via Frontend Transport; Wed, 15 Jul 2020 10:35:55 +0000 Received: ("Tessian outbound 8f45de5545d6:v62"); Wed, 15 Jul 2020 10:35:55 +0000 X-CR-MTA-TID: 64aa7808 Received: from a8da605389ac.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 719BFE25-598F-4AC4-818A-7EFE11BC63DA.1; Wed, 15 Jul 2020 10:35:50 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a8da605389ac.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 15 Jul 2020 10:35:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cgtn1ZEqixmN2PRgTWq46K/QJxWyJXKvJWF226tIaQ6pLunVwwJwuMwYnx568cxoift7u9bJMlwvhD3cWxQYSMK+v/UtmsvY1r65RcyrWB9WnNS26g9wdszWhuLuopc00N8Y57o1qsCjcyOqsHYsaRnAeNqxFkouTnNoGFzYen/XSZzlwxCvUIdA5YwfwXhhT/Kc9gTL1Hf+uhfkHsWNJJO2WfIkioRpUB9Ze36xmPiQ6aC+uw0lZ+mG1eP5JT1U+MrRgdofmpf2xH+3licmKTN7EkZ1FXYwRr6Iq/GDffso1/Lr/zAp1YtT75N/5upkAEA9sCatq4hYgm/1vzOlMw== 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=VbhKa1wL+Rs6gAhvp72AyU3gQGF3fOO505+k8NBZRTI=; b=gI4WKuADag2NdnYvekrVutdm6i3Eio9TTa6Jx5oNws+LWec03JGwmtwJS5Bin/5QxDOUecGsM+J7cFVfFZxpDRRHGZYpZzFjy4/IEFMvn1ARZxYN+5vAKMLzUboXInfSAgHhk56qAKv8YHxq2DAunqHPkuITUrQQmxejwNc+IZA2Wp8eZ6fwd2N1vielqnM6aCo/fMHneDFkm7RpvtZmSXm/xqWW8uUChMKGxg9uqBDYf53KYtRL6yC7175mgS9MGMuep3Dj8xdncu6k4ZV7pYHgqjjiYI92kI5cPy5fVSzYwHpWU2m3Qyox2gQeUFU91HdgVvu9o3gXMIPumQC3AQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VbhKa1wL+Rs6gAhvp72AyU3gQGF3fOO505+k8NBZRTI=; b=8+YF9bYWnnTyiypKxJR6jNJD0VOKPqgX4ynbh1svVSBrlPPMXbH/yt+ICkObd5ybPw7yJFjmPJ8OfMgiCA3yeJ2xQzfIBADTUlhYnCVSw+WVsyZG4jZRDdPLlwaK/1PI42496HlcdqwKB1vz7aFHWEhKeHIvOyKrNv012f7wqD4= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (2603:10a6:802:b2::11) by VI1PR08MB3455.eurprd08.prod.outlook.com (2603:10a6:803:7c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.23; Wed, 15 Jul 2020 10:35:49 +0000 Received: from VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::c2e:9ccb:a690:6863]) by VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::c2e:9ccb:a690:6863%6]) with mapi id 15.20.3174.026; Wed, 15 Jul 2020 10:35:49 +0000 From: Phil Yang To: Lijun Ou , "wenzhuo.lu@intel.com" , "beilei.xing@intel.com" , "bernard.iremonger@intel.com" , "ferruh.yigit@intel.com" CC: "dev@dpdk.org" , "linuxarm@huawei.com" , nd , Wisam Monther , nd Thread-Topic: [dpdk-dev] [PATCH v2] app/testpmd: fix missing set for current forward engine Thread-Index: AQHWT3uejlAgiKiy2UCpKk75B4dp1qj0WMPQgBQslqA= Date: Wed, 15 Jul 2020 10:35:49 +0000 Message-ID: References: <1593589406-12868-1-git-send-email-oulijun@huawei.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: f16d575a-2b93-45fe-aac4-0488a18cb0aa.0 x-checkrecipientchecked: true Authentication-Results-Original: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [203.126.0.112] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1cea633b-1100-45d7-afe7-08d828aadb2e x-ms-traffictypediagnostic: VI1PR08MB3455:|AM5PR0802MB2481: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 7k9Xo2p337LGm/JJmQOdtsgC0Ys2X2+mkcgp3sNt4sp3jKPP2MxpUmHJDA/8n/1EgyX3f+r7P6EPETyOEGvyEOWdgVEdTyKLIwDBSP7zxyGs37fg9KXDDPeDiKrRf7BbzOu1WJ1144EkV+vQ8DiD6Coz1rgki9TnNavq2l6VlF/ktNdR4aGOjjgj2oxoVTY2BkvgBfXApuAw96tAOYBPVH3nOgKTYMuQ9Iq4XLrPF/BDBq7GB480Lkjpua7RvsCbCPHzb/mNlAZ/G0hiaK01fBQW0530uyLX/n9/Qw+L+QGclDOz9t0jMKZ2kSblKJF7R66lWPW5Tx/xkqRmVtXXcsjN003rbfx+I07l4fn6VG738xVxhXLdVieeXitT/qUy X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4640.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(39860400002)(136003)(346002)(376002)(396003)(64756008)(66556008)(66446008)(6506007)(66946007)(478600001)(2906002)(66476007)(86362001)(76116006)(53546011)(186003)(26005)(7696005)(83380400001)(71200400001)(33656002)(54906003)(52536014)(316002)(55016002)(110136005)(8936002)(4326008)(5660300002)(9686003)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: eyTKRYzDbeDv9FcWbhgT8GQ45kFSgIq7heogDsLSsB2qyHBBSxV0H+fCBP4AtWkCeaROdgttOTMnqqaalSmhh2miU2VQXCq3nAHP3ys0ibAVWtcNBD7yqKrH+29c8rac4C2ovyvLf4BYm6QxeMvdfD8E/ZZGQxR8pF+6di7GdQHmBZ6j+f5P66xY8ZLH4Z1r8XfvedFMyky9M3LGfgbDBGil2stECDUV7klN7Dt/6rP4kXWqt2DxkxvkZ3ofZBSL6yRrFasUkBUfGa1Wn8DvRh4F8R/pLN289DyAZ3GHD3EM0a4lE9opnNV0MiJw84dIsJiHpHSlhwL7hR6XEOBly8qj+E0C05n5hY8brQ7w+3nZwg5FS6OpXGDAoKod34/pgnF6QhNqZ/si5A3qJrWXxT0GUFuF2Xs73OjxZySQNx9KKBZyY6WFy+0Z90gkVQ3DH25feBucNnoikOwVdToYNd0JMnhshHkhpurHqoMq/fg= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3455 Original-Authentication-Results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT045.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(136003)(396003)(346002)(376002)(39860400002)(46966005)(26005)(33656002)(53546011)(4326008)(478600001)(6506007)(47076004)(86362001)(70586007)(70206006)(55016002)(2906002)(9686003)(336012)(82310400002)(7696005)(81166007)(52536014)(356005)(83380400001)(8936002)(186003)(316002)(5660300002)(82740400003)(54906003)(110136005)(21314003); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 232ddd2f-3d62-49c1-bb75-08d828aad725 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bWWr2+WCBOipKLm/rcoE8BSvX6wMBjbS3v16LmHltIIFchwQFDMhHhZtk93OR1urlKWXkNtV3BUiVdKdJUzDNb73o9jhUfqjzmIbAYxHcn1m93Xvmbmu3eeqe1cFqzztOyMmxA3ah9C6sntWR18TkrFFOVxdlzszK6AttuEDuZ3UbN+Py3eQUAxdtAB3sk/nT8JdKc+88tSdlETsVUHUb4EDdBcn0UaKqlXHbyriy676Z4yseEfXNu/Uo3SevJpxupeFQDoTpGI5lREtBShGXhpIbcqawdKaoCwDGHXmTlq9HUFHKMMP/wS/Ujr1p7j3DDgvnMTs06FdMc06wtnY2Tf6jvYgyEMxtVGXJZqDIhzzqHAv56botUY9W1p+AVYNuValuepoN0aR9AjLEYRC4uSMT6v1gfdwfLKtPze0+8o= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2020 10:35:55.9606 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1cea633b-1100-45d7-afe7-08d828aadb2e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT045.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2481 Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix missing set for current forward 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" > > -----Original Message----- > > From: dev On Behalf Of Lijun Ou > > Sent: Wednesday, July 1, 2020 3:43 PM > > To: wenzhuo.lu@intel.com; beilei.xing@intel.com; > > bernard.iremonger@intel.com; ferruh.yigit@intel.com > > Cc: dev@dpdk.org; linuxarm@huawei.com > > Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix missing set for current > > forward engine > > > > When set the forwarding mode of the pkt, it needs to update > > the fwd_eng that it is the member of cur_fwd_config. Otherwise, > > an error will occur when executing the set command and show > > confg fwd. > > the flows as follows: > > 1. ./tespmd -w xxx -l xx -n 4 -- i > > 2. set fwd mac > > testpmd> set fwd mac > > Set mac packet forwarding mode > > > > 3. show config fwd > > testpmd> show config fwd > > io packet forwarding - ports=3D1 - cores=3D1 - streams=3D8 -... > > Logical Core 1 (socket 0) forwards packets on 8 streams: >=20 > I think we need to stop the running engine then start the new engine to > make the configuration work. > The Testpmd can't switch forward engine on runtime. When it is forwarding > packets, the standing operating procedures should be: > 1. testpmd> set fwd mac > 2. testpmd> stop > 3. testpmd> start >=20 > We can add a patch to document this standing operating procedure. > Or we can refactor the set_pkt_forwarding_mode API to support this > feature. I prefer this approach. >=20 > > > > When run the 1 ~ 3 step, it should show the packet forwarding is > > mac. > > > > Fixes: af75078fece3 ("first public release") > > Cc: wenzhuo.lu@intel.com > > Cc: beilei.xing@intel.com > > Cc: bernard.iremonger@intel.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Lijun Ou > > --- > > v2: > > -- fix the title > > -- add fixes and Cc > > --- > > app/test-pmd/config.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > > index a7112c9..ee0e904 100644 > > --- a/app/test-pmd/config.c > > +++ b/app/test-pmd/config.c > > @@ -3158,6 +3158,7 @@ set_pkt_forwarding_mode(const char > > *fwd_mode_name) > > fwd_mode_name, > > retry_enabled =3D=3D 0 ? "" : " with retry"); > > cur_fwd_eng =3D fwd_eng; > > + cur_fwd_config.fwd_eng =3D fwd_eng; >=20 > When you stop and restart the forwarding engine, it overwrites by the old > engine. Please check the code below.=20 - cur_fwd_eng =3D fwd_eng; + if (cur_fwd_config.fwd_eng !=3D cur_fwd_eng) { + cur_fwd_eng =3D fwd_eng; + fwd_config_setup(); + } If people like this fix, I can add a patch for it. > > return; > > } > > i++; > > -- > > 2.7.4