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 23ADBA0A0A; Wed, 24 Mar 2021 02:45:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 98CEB40151; Wed, 24 Mar 2021 02:44:59 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 5F7834014F for ; Wed, 24 Mar 2021 02:44:58 +0100 (CET) IronPort-SDR: bww+aLDNIBweFN8Md2a5AFx5+xhacssOXl1+XULHeiaBrRy6lcgm0nfrDosuOEZBSiDdYX7+ao tboxfB4947ZQ== X-IronPort-AV: E=McAfee;i="6000,8403,9932"; a="188286375" X-IronPort-AV: E=Sophos;i="5.81,272,1610438400"; d="scan'208";a="188286375" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2021 18:44:57 -0700 IronPort-SDR: gnoAC4RUVI6MxVJYnMdb3BQipOzMCo3wOmd+vSuSF6xfUR4Og548OjIy2Loj7/LR8xirO38+NF WiidAugVXp1Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,272,1610438400"; d="scan'208";a="408604496" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga008.fm.intel.com with ESMTP; 23 Mar 2021 18:44:57 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) 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.2106.2; Tue, 23 Mar 2021 18:44:57 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 23 Mar 2021 18:44:56 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Tue, 23 Mar 2021 18:44:56 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.54) 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.2106.2; Tue, 23 Mar 2021 18:44:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nqKW/JAPRR/815VQ+9CbgETdlTAATPVR3z84kD/foT8RiXCofPt2/6qAYmrzfRhbqmsqMcZ+IzCeqvUWyCbJYCi8RIFk3Je3qQvsWwIE/PPfRMolbX4/QRK+HOEhcRTquufv4xCzKfaHkUAN+/5KkpqBtVxWjSFmkKNeT4gSoO1uLS1czeU8P5cJef5rWDI5ma87Ekl88zkO2raKZonG9DgvQT5h1cbAmEH87tC4RENoA1LZXu6fWUtYP62NNnDfktJppNiMUoNBCTBAuv89BltKn4sn0FXwXfJfk/+sddTEHCdnJ1Fak3+peoncGoZhHUpPvdVmCIgsFTxm7ATkdQ== 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=gZb7HangGzdyT1+4Gw6HdE/jilPbs9f+vlgNtvAvj4U=; b=eHwM2uHbJL9aH49MPrADQT5D69x+allQ5Tnb929jItpSJnmPL19gGpIu7eUhk/CVZiPeTmwGC3Pdub99ZKm4pYI/vpeeFpr83bhdEJVUXBPvVa4vwM2IQfJ2JrlZD6fCyxs+aVBjHeyu8euPT/ETOgNkZoNWrby8D104S06SyshYd61/Q0v7Uzh2Xbco4yaGfnuIagUMp8O2oCyEhy+9/tBuLvuX+7JgEetiDStTpvDOscg+5MIu86NDpRcMAFe+Rf1sU4HpvNdO/RKD/sZ4wXLFWy7Lx51PPDgUeC1durskIhyVeeQop6tTkAcx2iVQLSFRMT5a5WzGB9CUYyBDig== 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=gZb7HangGzdyT1+4Gw6HdE/jilPbs9f+vlgNtvAvj4U=; b=dftB90QA8dMqJAUgocQOLfYGgI2CZf0HYHY5pES0ZKY+Vyt0GZGm3fr7Ydbk3thYFrafxs63moDsVv61gD2B6A32uXnXXpnxE0gf8DNJfbcrnvs5qPml0VGKhJIaAanfaOSRbj1do/5cR01lAVynolvfQR5tNFjPHi+h6N4N2Qk= Received: from DM4PR11MB5534.namprd11.prod.outlook.com (2603:10b6:5:391::22) by DM6PR11MB4185.namprd11.prod.outlook.com (2603:10b6:5:195::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Wed, 24 Mar 2021 01:44:54 +0000 Received: from DM4PR11MB5534.namprd11.prod.outlook.com ([fe80::79a3:3404:b907:d49c]) by DM4PR11MB5534.namprd11.prod.outlook.com ([fe80::79a3:3404:b907:d49c%6]) with mapi id 15.20.3955.027; Wed, 24 Mar 2021 01:44:54 +0000 From: "Li, Xiaoyun" To: oulijun , "Yigit, Ferruh" CC: "dev@dpdk.org" , "linuxarm@openeuler.org" Thread-Topic: [PATCH 2/3] app/testpmd: remove forwarding config from parsing Rx and Tx Thread-Index: AQHXEaldDfAva4xisEaALSlRIYLxeKqRMteQgAE8B4CAAAufEA== Date: Wed, 24 Mar 2021 01:44:54 +0000 Message-ID: References: <1614939741-63927-1-git-send-email-oulijun@huawei.com> <1614939741-63927-3-git-send-email-oulijun@huawei.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.54] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 925813ef-ea85-4c5e-995a-08d8ee666c6d x-ms-traffictypediagnostic: DM6PR11MB4185: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hWChNxWZBcEfJbvlB6cD5tHpG0NyEcMcfs2snceUwGFjiQYNEmSqezjlBPcDDJt+Lz38qSCzDUj5yqoJVsRn35KINyt9ybhhGGNMJy715BHOB0kOzZfAWFHWmr6kEOxNbj5rvpyQg6ElSeSE1lMLxaXVn2sqvP92+T7R+uqKQC9sMDWmuEX8FWC9Pi9nNmBaUrhqf0/je7POZhR8H/AXhw7bfEMpbNbqxaif9jZaOIOJ87m38nJ1m0Hp0J/gF+MNkvgkKlyMAXJRDOPVFvtpOMXIER8EcMn6SlEy0cQHc3psBgK/WqZf0dgT3qvdA++Pn3yKnx8kHP6rvJN+N3qRmn4GO95vMfUzTS5F4bYykQObM1VmG5MgsMxp+jD/FWnavuqEMXJYxfdT39PTJn+7e134N5fb+cR0nCyq1hZAS2qkPh646cSf10eTBWIvB1dcPEed/60sfI6p24r5HmDRNnwmrLCo2zwd9xHTZ3FxTB3+qL1hSMadP589LPrZSq+rf2gz3iTllGV8UWYZ/e2veXi7whEDRcbITm2GulpaeubBcbJAB306nj/cf21Nd1VBG72Wu6cpwB5ya6071Vh3F1OtgWnlU+LlxyNq4XaUe0zWbK8QIp6j/CDkcVemMZTKUzO1aFPKBGxgO+cBi8MvgqIcNo5OgP26OTtk0oPaF4s= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5534.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(396003)(136003)(39860400002)(346002)(376002)(71200400001)(7696005)(6636002)(64756008)(6506007)(76116006)(110136005)(52536014)(54906003)(66446008)(2906002)(9686003)(66556008)(5660300002)(55016002)(66946007)(26005)(8936002)(66476007)(53546011)(33656002)(478600001)(4326008)(316002)(86362001)(186003)(8676002)(38100700001)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?iso-2022-jp?B?QW5LeGJ2UTJCa0xPTDY2T0lvbEYxSXF6S25mLzRSMGhkM0hNcmhSL1Q1?= =?iso-2022-jp?B?eVBqRHp4eW9lZ251MW80d3dnK2RKc1QzRjIxY0g0Z2QrL1ZMeUFjczRv?= =?iso-2022-jp?B?enM4ajc4SXlsSmN5OGlqY3pONHZ1dkduWlFtVXgzOGYxbFFyK245MllH?= =?iso-2022-jp?B?RCtCY3NLV3VaaWN1UzdGSEV0MFVCK3MyRnAxZnBJTUU1ZGxGTHNndHA5?= =?iso-2022-jp?B?TnJWWG9LaFN4OG1La3Q4cExSakdSVFpOdGlkei9CZ25rbXEwSXhCaUFN?= =?iso-2022-jp?B?aDFkeStWUjdWUHRQaEt3bkRnSFZYQ2lyR29icTRzTENXRHJncTZQQXo0?= =?iso-2022-jp?B?VElNRktOYzM5NUZlckpNRnF4VVlVZ3d4QlBjYkZvVkhmL3lvajB5dnlB?= =?iso-2022-jp?B?SVBLLzdpNlZZalg4b2QwRnNTMUY4U1JHcmRLL2xsOFdMNVhzS3ZHS0dM?= =?iso-2022-jp?B?b1B5OVhqZjVCNE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?= =?iso-2022-jp?B?OTlnSGtHd200MjFyaCtKS3ZZdnl3a2g3TlFLWDJhNEVrQ1hRS1Fta203?= =?iso-2022-jp?B?OVRNcVJncStFK0U4dUN2bzFFaVl1MTUrWTRXWXpHakJtaXJ3UldPTTBM?= =?iso-2022-jp?B?Q3M4SDljWnBtc25INzBwNExBL2hYQTY5V1l0dkVhL3ZEenRIYVF1TXRq?= =?iso-2022-jp?B?YmxBS1VkaFNoZDl2OHBsYTJaSStWalRmS3IvS1hPQVN3d2JpOUZSQzVx?= =?iso-2022-jp?B?QnFzTWFLbldaVnhYK2grNWlZbTI5WGZTUFpzZGphS2JUbTRNY2NndDg3?= =?iso-2022-jp?B?RnVtMkV3Rkh6UXRka2xhVVdxbEdkWTRnejNmK0oxUW9Kc1hVUTF1TGJ6?= =?iso-2022-jp?B?UlB1bnFSUVZqajQ5ZzEzcHU2T1MvTnlqOEZmaGRENmpsK1ZVMW9sV01C?= =?iso-2022-jp?B?ZFU1bGlla3F6aWpieFlGWXBFd3ZacjRyaFdTbUlQSERvek5sMWZDUW02?= =?iso-2022-jp?B?Nmt2dFN0dGhjaTU1T2pLK0xoaFlJPQ==?= Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5534.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 925813ef-ea85-4c5e-995a-08d8ee666c6d X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Mar 2021 01:44:54.3274 (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: QP6ITNN/8+doIrKtlpxrbYvBvpPmz4zkWnO+JPQzjSVwO55kkeenp+PktAqPAVPOaLrUbUdhPmb9NIss3RcaAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4185 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 2/3] app/testpmd: remove forwarding config from parsing Rx and Tx 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 Sender: "dev" > -----Original Message----- > From: oulijun > Sent: Wednesday, March 24, 2021 09:01 > To: Li, Xiaoyun ; Yigit, Ferruh > Cc: dev@dpdk.org; linuxarm@openeuler.org > Subject: Re: [PATCH 2/3] app/testpmd: remove forwarding config from parsi= ng > Rx and Tx >=20 >=20 >=20 > =1B$B:_=1B(B 2021/3/23 15:50, Li, Xiaoyun =1B$B > Hi > > > >> -----Original Message----- > >> From: Lijun Ou > >> Sent: Friday, March 5, 2021 18:22 > >> To: Yigit, Ferruh > >> Cc: Li, Xiaoyun ; dev@dpdk.org; > >> linuxarm@openeuler.org > >> Subject: [PATCH 2/3] app/testpmd: remove forwarding config from > >> parsing Rx and Tx > >> > >> From: Huisong Li > >> > > > > The commit message should be more simple and avoids grammar mistakes. > > > All right, I will simply it. > >> The "fwd_config_setup()" function does release and apply for memory > >> of forwarding flows, and re-establish these streams when rxq/txq or > >> rxd/txd is changed. The function is also called by > >> "start_packet_forwarding()" when user executes "start" cmd. > >> All changes for rxq/txq or rxd/txd can be updated uniformly when this > >> command is executed. Therefore, it is a little redundant in the > "cmd_config_rx_tx_parsed" > >> function. > > > > It's not redundant. This command may configure number of rxq/txq. So th= e > fwd streams map may change. > > Then it's common to check the fwd streams after this command using "sho= w > config fwd". > > If you remove this fwd stream update, users can't get the correct new f= wd > streams until they start the traffic. > > But they may change a lot of things and want to check if the setting is= correct > before they start the traffic. > > > Yes, you are right. It's really unfriendly. > >> > >> In addition, the forwarding stream under one TC is configured based > >> on number of queues allocated to TC. And number of queues allocated > >> to TC is updated after calling "rte_eth_dev_configure" > >> again. If the number of queues is reduced after configuring the DCB, > >> and then, release and apply for stream memory, and reinitialize the > >> forwarding stream under the DCB mode based on the old TC information. > >> As a result, null pointer may be accessed. > > > > I think you should add "rte_eth_dev_configure " into dcb_fwd_config_set= up() > before rte_eth_dev_get_dcb_info(). > > > > And the commit message should be similar like the following: > > Segment fault might happen after configuring queue number to less becau= se > dcb_fwd_config_setup setup dcb based on old dcb info. > > And dcb info can only update after rte_eth_dev_configure(). > > So this patch adds rte_eth_dev_configure() before rte_eth_dev_get_dcb_i= nfo() > to get updated dcb info to fix this issue. > > > Thank you for your advice. But the above adjustments may still not work f= or > some drivers. The mapping between queues and TCs in these drivers is upda= ted > in the dev_start stage. >=20 > I have an idea. We can move fwd_config_setup() to start_port(), which is = called > by main() and after starting ports This not only solves the segment fault= , but also > does not have the problem you mentioned above. I test it and it is ok. >=20 > What do you think, xiaoyun? How can you fix the issue I mentioned? You still need to start port first to see the updated fwd config. And for those drivers, why does the mapping has to be updated in dev_start = stage? What does it need? Can't it be moved to dev_configure? >=20 >=20 > >> > >> Like: > >> set nbcore 4 > >> port stop all > >> port config 0 dcb vt off 4 pfc on > >> port start all > >> port stop all > >> port config all rxq 8 > >> port config all txq 8 > >> > >> At the moment, a segmentation fault occurs. > >> > >> Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") > >> Cc: stable@dpdk.org > >> > >> Signed-off-by: Huisong Li > >> Signed-off-by: Lijun Ou > >> --- > >> V1->V2: > >> - use stream instead of flow > >> --- > >> app/test-pmd/cmdline.c | 2 -- > >> 1 file changed, 2 deletions(-) > >> > >> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > >> 4df0c32..e316f5c 100644 > >> --- a/app/test-pmd/cmdline.c > >> +++ b/app/test-pmd/cmdline.c > >> @@ -1837,8 +1837,6 @@ cmd_config_rx_tx_parsed(void *parsed_result, > >> return; > >> } > >> > >> - fwd_config_setup(); > >> - > >> init_port_config(); > >> > >> cmd_reconfig_device_queue(RTE_PORT_ALL, 1, 1); > >> -- > >> 2.7.4 > > > > . > >