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 18394A00C2; Fri, 1 Jul 2022 05:13:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C32140A7F; Fri, 1 Jul 2022 05:13:22 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 11A8240694; Fri, 1 Jul 2022 05:13:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656645201; x=1688181201; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=biq2iJeuJX/xAeBq3NJM6uI/5BbjiJBWTcoKBSeaUuw=; b=k8FJoKgygcWvdo/ZgUtGXLNM69sl9x75mLKbNYEb2c6r3Or7qcyzscWj c3lfAxSkZ/E7yRQt8gQ260x5aiffL4UE2ZgWRur87WuRou3peEILIRwLm Fxb/xo+clDNb2+X81SqVEjjHVFjMqKqKT6H4/8FrtZABGm1rtca45zME9 a1RYbp2IsnI/A60jCVaAudZEpWHryE5bma4GdtWP+vNM0SVUDLgWLd9ez g6o7wvsn2em6/QGWMoslTylDjCFlCBDxTygBBet/BbU3mVhbljSE3Yqma vq49VVLcwbvWzD/oUw06WyeweZho4K0AMrJy22S9UfJp7oSwKwzIDyFS4 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10394"; a="344225145" X-IronPort-AV: E=Sophos;i="5.92,236,1650956400"; d="scan'208";a="344225145" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2022 20:13:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,236,1650956400"; d="scan'208";a="648163456" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga008.fm.intel.com with ESMTP; 30 Jun 2022 20:13:18 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 30 Jun 2022 20:13:18 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 30 Jun 2022 20:13:18 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 30 Jun 2022 20:13:18 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) 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.2308.27; Thu, 30 Jun 2022 20:13:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=esrLO70s/px6HCmgs2kS6vq+xzb1kmi6a+SqSZroOWODgRUuQjlRTk6mOjcO9IXONkHg/9pGZK0WQTYJF2ufYEZpy4QH5qeu8ZkyoYb6rv8OOLPEQPyq029c/04/3h3p8ttvSGBzri4UWlhA54/4+5JHuzjPEjjyKNho70/HUk5EcgtsEzqz29U706HlFs24LT/C2998fcTatV77TAsupogJhvS6IneWz4XsdEtjRS+sV78MV/jDG33vQadDGEmibP8kh9EDla7WERwyWWrzv1uKiSH5rUJ+o7shOuVuJYPrc6CIOo+XNh0el6CHlyp4Jbcd1hRZynyEEnbGrmZwFA== 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=Sll/1ZOVqeq5f/3v7YRW3Jwp1+TotFfUYyMQnJ1yrlQ=; b=JZs+YOaVbfe+fSsiFGsMGQgn7lkcBAHhiDo+dBpDw6uT2csEtXzv5TL8Kfq6YnKYL7wgcgSwnQlnlq9KI1sdhnt6PQkN8KtwSfuFhggKdsk81YQWxTSpTbKtIbwsvvxCp8baKcAVd1N1FicdvSHDTlFfVTH5PMOWm5SHpa09/CuKWk1uUJlsRyeZeXN9ReaLGUh5sSOwGQFnhOqPEjNmpp8NqD/VYb85Im51uvaqXeYFbU1HacYh0UgwSqK5xeH4VJIaLDruh6GTDS1Qq46uCB/4x6ikJnYmmrkyQ4EBnzo+70+c4zYKhORArkKhm/FaOymzIcUJwGcTxh+Iczvs6w== 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 Received: from CO6PR11MB5602.namprd11.prod.outlook.com (2603:10b6:303:13a::5) by MWHPR11MB1502.namprd11.prod.outlook.com (2603:10b6:301:10::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14; Fri, 1 Jul 2022 03:13:16 +0000 Received: from CO6PR11MB5602.namprd11.prod.outlook.com ([fe80::c4dc:c0e7:a0f2:7a0f]) by CO6PR11MB5602.namprd11.prod.outlook.com ([fe80::c4dc:c0e7:a0f2:7a0f%6]) with mapi id 15.20.5395.014; Fri, 1 Jul 2022 03:13:16 +0000 From: "Zeng, ZhichaoX" To: "Zhang, Qi Z" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Yang, Qiming" , "alvinx.zhang@intel.com" , "Guo, Junfeng" , "Su, Simei" , "Burakov, Anatoly" , Ferruh Yigit Subject: RE: [PATCH v4] net/igc: add support for secondary processes Thread-Topic: [PATCH v4] net/igc: add support for secondary processes Thread-Index: AQHYjHES8L6sUBSCcUer5MDdriVQr61n1XqAgAD8ZLA= Date: Fri, 1 Jul 2022 03:13:15 +0000 Message-ID: References: <20220628062052.5397-1-zhichaox.zeng@intel.com> <20220630110330.211655-1-zhichaox.zeng@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 82da70c5-e0cb-4e55-89d7-08da5b0fa3fd x-ms-traffictypediagnostic: MWHPR11MB1502:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mpOAPiEeqEihowqLjOGv+wZmxoxUWdzMGRF0iMtgZ2/Z/NDwm85SxATKFg+jZsWGnsXPbLgu/nZxKGDUeP4OPU4tLahXEv4TPFZN7DCIGzX9d4JJ78+51Pjm2oOoXp6w4lV94F+zxE4e2jZrDtSbN4x6Vghw3XqTdWj4+vfz/WAEzbXwIjyl+tJr2BYYPoN1K7wIdaAmbB5gwdwuXRRlgb0I+7Oxt7NWNOAHxqZPALqWoXToY0rVtxFRsv3RucMgsvLEsYV7peyLo5lYprQw92TAwKQDZUhFUG85mcI+SRvpSrsWCaP81j2Z7oI7mecwRh/jljftu9vKeR+kcWAKuXquLgPlGdc/8rYYt8khlDV3ec96LT+anvAHbctCXF07lsb+yYhiWQiYNTec7vHnP774vIaHAizPP7laj74WNoICNkjEmdJHdfKpWTEXUcSOM7V1UPRJ4WAw56rnqCG2L13bfmSBmGhF66nhuvwYagcG2c8hTRRyzAAs0HMIHTnvvtXfnxIiYkJ+I/5j8BOYnyjcuCEjz6Bd3EHyLDKeYcms3rdx4Ad2pJkiQJTHE70jTCqnhQrIR+9xCAPnnAzDqvnQ4YVwETlo8Atn1yL3v5TTk92HO36HBt80h3Yh7mLPSzdpAXxrLZfKW3hvl7ngWG5QIm+3mpQFYM+/uf+/WkRr+V8WLfOdS6e+kvrVEGRoOazzWcIE/ZTJxkhdfkwN8LOVLGXIstZTNq+BiAiItrYJH44cDv5yUwB36F4enDQ3zBvCPTsEB9KlF0MXl5uXKltfk++rOQNC7rUnMqBeUBwv//BzRjreMNN3ispGpR4e x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR11MB5602.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(376002)(346002)(39860400002)(366004)(396003)(5660300002)(122000001)(71200400001)(4326008)(64756008)(8936002)(52536014)(33656002)(82960400001)(478600001)(83380400001)(186003)(55016003)(41300700001)(110136005)(107886003)(9686003)(86362001)(26005)(38070700005)(76116006)(38100700002)(54906003)(450100002)(316002)(66476007)(6506007)(66556008)(66446008)(8676002)(2906002)(66946007)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?TEc7F9Oy5N1X0KJvY+PrVDGTwl1zrofmv0+xaDsoZUtnAHZB9VIKqKKEwla+?= =?us-ascii?Q?iG9EUE+O9JkL/63nR9I7aWgQGGiICSNgx4EQyc6a7sylEMtNiL1+0HGxsALZ?= =?us-ascii?Q?z3pDRpGny36mrGR0yNdTuJluYyxCEYqjOX6mE5szzmkla6gNk1jyL0a7Rtwy?= =?us-ascii?Q?Ay64c9ofuIzsPLJConTETFqqimbTGFtflmtU6CT4D3ZBITn/Npys5dfYlQMO?= =?us-ascii?Q?5xuWZ/nmr9JNyI1x+o5ZlIKsJD5YQodmMCkPdobTqN+m8pxdT1rI/9dY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qZ0XdDiBtOodLmHmJJmtcC?= =?us-ascii?Q?2xp+oSUCOrGCr4+vF6cTnpktjeGw7fopeiswtlGeB+9CIasMxRA8uPDUhqt4?= =?us-ascii?Q?6uYb3M38k7K+/J2aTJQ0N4D0Y2D3di/t4Fd/2in8YFlY1dxdHQTHqK6Jy9vK?= =?us-ascii?Q?9RIy8jFNjGfL1uUwiKTys1ZtEZO5cmt294ePH26NZ7eGNAeX8OzuFMiTBpj+?= =?us-ascii?Q?1kd9qoy6zpHCxl9MPVXMbR5NCNfojMCb67mWIsd+xbzhdzqrWcXzNtXXGk3Z?= =?us-ascii?Q?4F1yGuBgUarQgChzNGN4JkJ5EUbbWVSa2Tw7HB9f+/Gps+uCCbRnrP1qQ5Px?= =?us-ascii?Q?ip7OaR+V5x5Uzl5yCmz3tY8JCP10cU7iunexTDhjGW8xTKSkWDXRvY73Gbqh?= =?us-ascii?Q?Di8QiAkYIBvVbzVR3LkGLoWQbAYqWz+IleOEWaW7?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR11MB5602.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82da70c5-e0cb-4e55-89d7-08da5b0fa3fd X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2022 03:13:15.9816 (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: ifKsqJphdAWeZc4Gvf/wjwOsm8tdb2rj9wZn/w3mDBL/nOcnQO3MWkzttRpnGIO3g84nQveb7T+O9eg0tjQXEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1502 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 >> The RX function was not specified in the secondary process, causing=20 >> the secondary process to segfault in a multi-process environment. >>=20 >> This patch specify RX/TX functions in "dev_init" to support secondary pr= ocesses. >>=20 >> Fixes: 66fde1b943eb ("net/igc: add skeleton") >> Cc: alvinx.zhang@intel.com >> Cc: stable@dpdk.org >>=20 >> Signed-off-by: Zhichao Zeng >>=20 >> --- >> v2: >> remove unnecessary parameters, move declaration to relevant header=20 >> file >> --- >> v3: >> remove redundant code, optimize commit log >> --- >> v4: >> rework patch >> --- >> drivers/net/igc/igc_ethdev.c | 9 ++++++++- >> drivers/net/igc/igc_txrx.c | 8 ++++---- >> drivers/net/igc/igc_txrx.h | 6 ++++++ >> 3 files changed, 18 insertions(+), 5 deletions(-) >>=20 >> diff --git a/drivers/net/igc/igc_ethdev.c=20 >> b/drivers/net/igc/igc_ethdev.c index >> b9933b395d..7f221a5d34 100644 >> --- a/drivers/net/igc/igc_ethdev.c >> +++ b/drivers/net/igc/igc_ethdev.c >> @@ -1240,8 +1240,15 @@ eth_igc_dev_init(struct rte_eth_dev *dev) >> * has already done this work. Only check we don't need a different >> * RX function. >> */ >> - if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) >> + if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) { >> + dev->rx_pkt_burst =3D igc_recv_pkts; >> + if (dev->data->scattered_rx) >> + dev->rx_pkt_burst =3D igc_recv_scattered_pkts; > >Please removed the redundant code in igc_rx_init Only the main process will execute "igc_rx_init", and the secondary process= will not execute it. So, the data path of the secondary process is not initialized.=20 The code that this patch adds to initialize the data path in "dev_init" wil= l only be executed in the secondary process. The same code in "igc_rx_init" is not redundant. May I ask if the commit log is confusing, and should I submit new patch to = correct it? Regards Zhichao