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 23BA8A0520; Thu, 2 Jul 2020 17:03:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 905C91D921; Thu, 2 Jul 2020 17:03:35 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00086.outbound.protection.outlook.com [40.107.0.86]) by dpdk.org (Postfix) with ESMTP id 6774F1D91B for ; Thu, 2 Jul 2020 17:03:33 +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=1j7AGNzJm48rzSddG6waWyNfdKk338xQdFMznXpIii8=; b=7iOd7rg129znJtInrbnG/oGACtpCR4FgxyPQFTXbvZTWJw2GFbeVLjMMyqsbj16vrBm2Bs0hKR0VGru+0NPZIHUTpJeTnCzN+xjEI+xatjEQYlrQrSwVSTHv/lzI2qAwK0bEV/GB4gABSHxk5fQzqX1mQCnqB+zS008eI1b+3Mk= Received: from DB6PR0201CA0023.eurprd02.prod.outlook.com (2603:10a6:4:3f::33) by VI1PR08MB3680.eurprd08.prod.outlook.com (2603:10a6:803:79::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21; Thu, 2 Jul 2020 15:03:31 +0000 Received: from DB5EUR03FT028.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3f:cafe::54) by DB6PR0201CA0023.outlook.office365.com (2603:10a6:4:3f::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Thu, 2 Jul 2020 15:03:31 +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 DB5EUR03FT028.mail.protection.outlook.com (10.152.20.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Thu, 2 Jul 2020 15:03:31 +0000 Received: ("Tessian outbound f7489b7e84a7:v62"); Thu, 02 Jul 2020 15:03:31 +0000 X-CR-MTA-TID: 64aa7808 Received: from c8707245afdc.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0D58FFE7-6C19-4D95-A526-04F28FB98078.1; Thu, 02 Jul 2020 15:03:26 +0000 Received: from FRA01-MR2-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c8707245afdc.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 02 Jul 2020 15:03:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QQG0mPya31cke3ssMTm73UrZi7QjlaOm2qBVhWPlgU/ytISK+Lm8SA5Sc5aqxWkvfFAFHizoW5R/RUkLqwcRI4rNz1QegLgu3vitl3ebEjWq7wrg8BEp1GRTc2xGSVc3j4bqNsYzSY5F4H1TM0vMeztKCqJYGmiGt1ctCmIi084g5CW7c3ZU+7Nut4tXOkPA5Pf6tIvAOSIa4gSlm/yhWTVEwiL5sdYkuHZn6i9UvC932rx82v4+OL1960+mbI9cgmZwHMmzV2frviuBPSVJgJx+uQr/KrY7EDVivTU65a1FyP7vkwdwNFKRq5dbjWaohENLeqkJnmWcl0k3IgiqWw== 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=1j7AGNzJm48rzSddG6waWyNfdKk338xQdFMznXpIii8=; b=UDEH2mHf6QwXiwgQsEdZpzxwgxuMJVPsMZYsTIMCwQf0MJnMPbaQDWqv6yf6F14G9Ae7U5D9cZZXAQBv6zJHq0DuO7QnAJTb53RybYv1XqzXD2uVPRG3QssjZKVUgB3ses4p9Y2uPiek2I84eMGkfQkCFB/Y7vSSdZr0Z2YjMcyY9IXnwcvQJDB+Tcrm2h+3l/bdt/IST2UNt2udvbhMDIar3zDhHfCYXwWDxfZ4jYQk/zjrygdRL4ZU55tl62zifpNxUSy9/pjup2m7ml+JI4sr0vlquWdSkHUKVN6sgyA4eVtQwIcc3bNniCFsLIvy/p6Lqx//7Br4k3tgW2vQpw== 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=1j7AGNzJm48rzSddG6waWyNfdKk338xQdFMznXpIii8=; b=7iOd7rg129znJtInrbnG/oGACtpCR4FgxyPQFTXbvZTWJw2GFbeVLjMMyqsbj16vrBm2Bs0hKR0VGru+0NPZIHUTpJeTnCzN+xjEI+xatjEQYlrQrSwVSTHv/lzI2qAwK0bEV/GB4gABSHxk5fQzqX1mQCnqB+zS008eI1b+3Mk= Received: from PR2PR08MB4635.eurprd08.prod.outlook.com (2603:10a6:101:18::23) by PR2PR08MB4923.eurprd08.prod.outlook.com (2603:10a6:101:24::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23; Thu, 2 Jul 2020 15:03:24 +0000 Received: from PR2PR08MB4635.eurprd08.prod.outlook.com ([fe80::893:518:bade:fb79]) by PR2PR08MB4635.eurprd08.prod.outlook.com ([fe80::893:518:bade:fb79%3]) with mapi id 15.20.3153.024; Thu, 2 Jul 2020 15:03:24 +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" Thread-Topic: [dpdk-dev] [PATCH v2] app/testpmd: fix missing set for current forward engine Thread-Index: AQHWT3uejlAgiKiy2UCpKk75B4dp1qj0WMPQ Date: Thu, 2 Jul 2020 15:03:24 +0000 Message-ID: References: <1593589406-12868-1-git-send-email-oulijun@huawei.com> In-Reply-To: <1593589406-12868-1-git-send-email-oulijun@huawei.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: c0368d18-d5c8-4b81-ab6e-4a88d3261cd6.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: [180.162.1.103] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 817e3f0e-7720-4a4a-6bae-08d81e991581 x-ms-traffictypediagnostic: PR2PR08MB4923:|VI1PR08MB3680: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:7219;OLM:9508; x-forefront-prvs: 0452022BE1 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: xN8H6fJkJ3IfRx88LRf0NvdYqnvDVUP0SNF6ekafIibuShtyEIYIj0XrTyITYOrgl+KtlrXjiX3iQYV3jeqeKMdj33Fnuz1jS/i0ICYRTiiBdh52lGMT6WbWX59nmkdYsRUAWCzc/tLQ0GLCXsjlI9+71/qzyGm/u/B7oTSh5ABJVhiZQBWzBEwzVre0xqGtNsY522QYw73y6DSpqFPk8jPMU9fd4itucl9WrMHM6B+P+enNuPBAQr1TjhtRm5VmicjnsEBA49s2buy2tZB2W5jWzW9D7UXVi5xdZF7gauXIsUftE7nC/Jz53OMprpCZVrqtQVAABCsMRX4sqqaBTHsxzqAiaclifqBvAHjS2fyujIrqQ7uw3vUK9CPqDxKC X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR2PR08MB4635.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(366004)(376002)(396003)(136003)(39850400004)(54906003)(186003)(55016002)(316002)(71200400001)(110136005)(2906002)(66556008)(478600001)(9686003)(66476007)(66946007)(33656002)(5660300002)(8936002)(76116006)(64756008)(66446008)(6506007)(4326008)(26005)(52536014)(7696005)(53546011)(83380400001)(86362001)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: pNAD+hKvAB/XlJZXGeuFJiXT847iBvbjpoiT99m8+VfufKPhTp0yQDF/LiDQAzHqCQhj55+UPDnjxNAz/AKZq7QmG23MdrTu8+5r6D35cdxAHpOzdSIOIwFs+oAg+lQgEcCTKl70b2rjq4dVLW79H6eoA+aTXFfPCB2k6DP5qaQIxj4Maom5XoirS+34FUx9OCbO3Q8aZBDO/04o6VIQEx1NEDfdqV+OIXH3XYydc8MXBJPS82SLvpSVE0cDVs2SlltQ6er1Y+Ong7ttGuUkNkMS1r4diZo8Tc6ixpcUvqn1Vwml3KXTwo+ZG+YKTd+zfrSb2ujSAFP3z+VMYN6e2TpbL7pSWKTqMonSiQFoNaaE20bcujUt0grz2uofhpc6m0vS3e99DxFFUzr1/jngm+mxzvZhZ1ruPAobWIAjzJ0Ze/KqGNbxlfF4hXoI5c9751gLrkFimgvGdT11lGlf6+rsY5J46TeueEIN/S3CdRM= 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: PR2PR08MB4923 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: DB5EUR03FT028.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)(39860400002)(396003)(346002)(376002)(46966005)(82740400003)(52536014)(26005)(356005)(83380400001)(81166007)(54906003)(55016002)(70206006)(47076004)(5660300002)(70586007)(107886003)(82310400002)(336012)(8936002)(9686003)(86362001)(4326008)(316002)(478600001)(33656002)(6506007)(7696005)(2906002)(110136005)(186003)(53546011)(21314003); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 596a17fb-2235-4069-4dcb-08d81e9911a4 X-Forefront-PRVS: 0452022BE1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V1d1z2edyoT4kGBvZMG+MzYyg/qmqhcX4Gd3lbkt+6c0Fhu1zEmYy5S4IJQyANYI5ak1mzIMV1ieC6WOzqYKJ/Bsuo6zrizXpA8+/R/8M0q+2eLVZRV6tQG5HPq0lt6tl+lW7NR3MSsnvDI5ZhZeOYLh1m/3mYoLY1OciB/VorahepxaSbOpU4ZOzmdLXLdu0695OWZ5I8s5PTOssF27COfo44m8TQ2wo4mW6BChzMsdiZcYeRax8QsY5gcl2BoWYqviEVG4SlGhyUhBNb0dAw5qVqwvzlEsuJ1e6A7X5c1Na6e8JNP2uHXdBFQYTktO6f0XbB9biKEOcxEWGkty5huq/vCdxBmQhFCtYnA75TBBseGQRwfVyuQEQDaA3jAErt1oG4NJU1QyQc5eO2RY4yOXffNJtReIS4bwnHTlJ30= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2020 15:03:31.2488 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 817e3f0e-7720-4a4a-6bae-08d81e991581 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: DB5EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3680 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" Hi Lijun, Some comments inline. > -----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: I think we need to stop the running engine then start the new engine to mak= e the configuration work. The Testpmd can't switch forward engine on runtime. When it is forwarding p= ackets, the standing operating procedures should be: 1. testpmd> set fwd mac 2. testpmd> stop 3. testpmd> start 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. > > 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; When you stop and restart the forwarding engine, it overwrites by the old e= ngine. Thanks, Phil > return; > } > i++; > -- > 2.7.4 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.