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 D47CCA00C4; Thu, 30 Jun 2022 13:47:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96D2840A80; Thu, 30 Jun 2022 13:47:38 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 2F6BF400EF; Thu, 30 Jun 2022 13:47:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656589656; x=1688125656; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=lVAGBtJ6T8794IMR499KuUUUnKwO92yDqN4/d4IFSXo=; b=VUodPEhPj2TXzY+ZbNnOunzqHUVcfAHlZwR5e7A3dozPc60UZvT+ek60 HAcWIVF8HtKsYN+pgSwsC9HNJ533s5/jny5iultLc8cPj7NtJ11d9QyPM NCeDq9+1uMCSJqC30Jp7gpb5kFf1OJSqvGYaqYxvkcBLz1sU5iRWOx2sC tfBSangDhM6d7g+dtYLkuIYD5M46QKq3N7Qv9lM3YZ277LiJaFNQD9VFv Kq20GcQNGseZv6g3gE+vARNFEcXGPuOjjD067BLmvsnI5K0EZlw7R3t4L 4k33RuIlfsY7IpqyyYl/VdswvQ4/AJR5kGOVC+8IMhEOucIBmKDJc4yqe Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10393"; a="262729262" X-IronPort-AV: E=Sophos;i="5.92,234,1650956400"; d="scan'208";a="262729262" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2022 04:47:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,234,1650956400"; d="scan'208";a="694022477" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga002.fm.intel.com with ESMTP; 30 Jun 2022 04:47:35 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX603.amr.corp.intel.com (10.22.229.16) 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 04:47:34 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx606.amr.corp.intel.com (10.22.229.19) 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 04:47:34 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.49) by edgegateway.intel.com (134.134.137.102) 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 04:47:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LI/ZhkkvIA5xkHBU/1DqARsK5i4CdszuQBlVs2o2ize+pCw8RiB3wNDGm+2WfOb0xLeYJJ1zHlnRftfxJGQIVFPCWEyXKPCQWUBQS9UkQlA0v8+gMQwr8LWXAf+nBgvCEi1LjdsuxLF0GLRBH+nEgeodUVeF+1waLzXv+T24t6hQcTWpnLZP8vEWrGMa+83KagFrnEBfihvKUjzQfkLbsBY2VU0faNLXKGmfUV9RzW40avuffTxItzdb48FiAgNHmUBJjHN7D7Ns11HSHw5YnzNPMW3eMlDGnNcsPsvXzzqFbqXz5ohcCyLtHgKakZn/u+OfDQFHj91Ihkwx/Cor6Q== 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=vsQNLF1OiuwgpnBgpwLRPqnFKyJFcmzyWb+oGh3NmWw=; b=DNQpGSHDFT+aI7xWbOmScu2EMZUKsifR06fhHG643J1BEizh2bkvztUfK70t4zqzKlXIE6NeqlBbAJXeLjUdJFQO9AirM2Flzh3WDFPj9lltjSCJoHmM/uO1P/i9sh8gEPTdVwdD1deBAhDbMYnARwDA6h9GqIeabYqXANGfGUZH5VrLGea0uCOf4Lhz2BGWpxWoBHNqs2xWStVTg3uwctJWfIz4j1nasrHQjBVoa74cEV9ZXhBBZibGSnYrJExCJwu1t5iqdco0GRIelRXOzTK0CLcEOp85/7gJ8eFNWCjkaVNvHe2sgSbiDYOEzHpLeaLbuHb+x3i4gIqQytulzg== 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 DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by MWHPR11MB1743.namprd11.prod.outlook.com (2603:10b6:300:114::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Thu, 30 Jun 2022 11:47:32 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::644f:ecd2:47d0:aa6d]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::644f:ecd2:47d0:aa6d%3]) with mapi id 15.20.5373.018; Thu, 30 Jun 2022 11:47:32 +0000 From: "Zhang, Qi Z" To: "Zeng, ZhichaoX" , "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: AQHYjHESpL0si5Ks5EOZZ+hGSddSqK1n1Syw Date: Thu, 30 Jun 2022 11:47:31 +0000 Message-ID: References: <20220628062052.5397-1-zhichaox.zeng@intel.com> <20220630110330.211655-1-zhichaox.zeng@intel.com> In-Reply-To: <20220630110330.211655-1-zhichaox.zeng@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 dlp-product: dlpe-windows 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: 151e62b6-886b-452c-3898-08da5a8e5129 x-ms-traffictypediagnostic: MWHPR11MB1743:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5vQlKVui31LDr4LgIdvxICmFT2nqDP5kUUXGCZhEMMxy1B0wwG3f6WBeWSEU8PEtnu2rpqkHGuo2un4e1vb5RitrAmb9EEqZBakjZNvKYxgT/Yi0beyu1pepIf4h8sMMLGJ21WaRER5veM7yWsGOrRIgYSMV/Itzw4n1E0Q5uOcZZ5RIdetYr+9w+0InvmrKAjrk/T5O4yp4u8A+mtYpm+mYkh89lbywGWYNSEmtquMpYCa2a4m9C/YWW7tVtVsd2uIQdxZwuTgDW1TflYMYU4SAgewSwj2jEUN8HieJ7dGG1NdjycdEOVOILKlvFeWriHx8rPdkJrZ5eyQy1wNavbJ1LJ1kR5c/rDIHbz+5gsxcPg3Or1KgqdC7hfiF0xOn3G/ronDwxXDtl/vKwYKTGXT7nq1Gn+LFAEDgINDqft70XyJoB7Q7rbAKCdUCc5+nAljod/9XQRhm0RLFeOwbvQ8nbOH35wKlD59xR6y1NdXVWJGPORPg8QfbkgihqokhXkche2hCc0j7E/ZMsG3EOezuIZO538irQS53dd+IvhyjOSKh4Ts3hIjp3t6S0kfUuXlyUTSxvDVFrR1qQ4snfag+rF7SKLJ1dc6j8hot4KAIGgBjOwZAnHcIm9E/U5fJZZJDo8oX9HAqtejdzSWB652pEodYT/rNyCRkuJTiAMjiDBJ/gE5r8/srU6NV3nLNJ2foddvg2rPBg5Eus4cIe5stnWGOsq4bxjpaVJM9lgECjj6T8tpG9oNN53PRsYNP4ky8tW/hOzLeD6OSkXg5x2Lt7EFulPMBInFCvRDW6PH63fS8FgYDlGP4746XvO9+ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(136003)(39860400002)(396003)(376002)(346002)(64756008)(8676002)(66946007)(66556008)(83380400001)(52536014)(4326008)(76116006)(450100002)(66476007)(8936002)(33656002)(26005)(5660300002)(66446008)(110136005)(9686003)(71200400001)(122000001)(82960400001)(41300700001)(38100700002)(2906002)(7696005)(55016003)(86362001)(53546011)(6506007)(316002)(54906003)(38070700005)(186003)(107886003)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?jAwHSELcNZ44KGu6+KqTjMrRk3tqRWJOO+hOHpdL4Ze3JHh2AU73f7VrhT9u?= =?us-ascii?Q?hV+NyO3rqguFDESl9w/q+nf3sBJfD5rQ5xmK6AMTRwzPwSFMgsnx2P9fdqbr?= =?us-ascii?Q?i6ALGxuKQ05R0E/uSpnwfGVffWfzS9Vx661gt4QKw7wS9p6lMvVD0ZGWarC2?= =?us-ascii?Q?o3D27vVuQc7ETmBG+PwOgMJ6pDXlYZKF53pbPUtLIZUcfXNcYc97kr7vqlbH?= =?us-ascii?Q?aSm1g5fyvCK8E5X9piHR9J6Bi+MrtLFAaPs63/FJrJNDuk2kYoRGZEzdfUsB?= =?us-ascii?Q?0K/NNKVQkHCkmlj7bMSZOWhnJsvYKL2W7WsHTxUYjPNUPZtNajYCn9GRpjoi?= =?us-ascii?Q?zvjsjtfN7s3lHkxb7Sx80449tf3nrZ27o5ti+GPwF7AGRx8O9M8Z+FwrcelB?= =?us-ascii?Q?aVBh3jsPlhuHV8UIVi+0G5FPgEMaJoucViEyESqSIwK35/TUty7fUq3ej2Ip?= =?us-ascii?Q?raqmfXrWSXqMK5y+c81Xbdeepy+gGbovL70WTsZvryid/nC2z5bWHjZ68bOF?= =?us-ascii?Q?thg3e3Y/6mABSu0aQfrjvYxfGDm2s+n4Z7GJRgIudlQwNDs9aGKVjwawBmA6?= =?us-ascii?Q?DXBhpneq8u87xifx0+Ykc3bircWKkZCS1GAJenZQ56dyg94arlOjNQZJExir?= =?us-ascii?Q?pYeCOTAPQqdOWmKq2pvSCXaTw8mPngm0LU7Un0h0F5KyOhysoTScMBeUrqQf?= =?us-ascii?Q?uQ9j/A/Gj70lNfwyV4CabY6jSmrHQVjSE2TSasYX0uBw5F+vN3bnJ8UvNNnL?= =?us-ascii?Q?l9dbP5TuIQro5JuRtH8e7B8Ins+moVGQ8UVdh5PGc2YTB1oq6v3qNCj9heNj?= =?us-ascii?Q?YBMNx+vh6828FkoVQYz96M+7oOUNyOInJSem+WPsHjgVdTPh0yfecWJlWRTU?= =?us-ascii?Q?cmJxe6nZA3M6h9KmCwu3n3voakgt0/elifYgyerKsge7dzlwP3odCw7VcJ1k?= =?us-ascii?Q?MfoKROIhCETe6034trtkmF4AxUqR20kDgvhHIuq6kjBn2M2otsR486hILb0H?= =?us-ascii?Q?0/CUQwkzcCCvOOaIP/xfhsfahlr5I2LQIIB1CrgSihggaH4mkXAVkJTGRV9e?= =?us-ascii?Q?MWWTgPQxtbXEwuVV2KK5TGwEGDSluygTbmBBYd75cr+Oy30b6SAxCbSi5uXM?= =?us-ascii?Q?71U0egvlhzBZDrJ/s7gWbxYAJCjkOeLXdcbGR8Jco6WgbK/P5X3sbLN5nJWB?= =?us-ascii?Q?PnuVP+QliBFjeSDxP54P1/iisan/4AqqFKTYb5Alx2qag8Lm02TsRSctjDvc?= =?us-ascii?Q?t53m+Gfl7U9q5v0slIcIxGjyUqUC5dq2h1xl7hXgfhWivWd+ha+HORVztntI?= =?us-ascii?Q?0LFX1TQIdvQHsCcQNk8ZsqkO8LoQan9W3IGrO8dHtlC+L8KL41wqsrLJA02U?= =?us-ascii?Q?3VYOK8otjv5L2JGTXCEYrMALOs82LzWNf+clq6oQXovZGZ8++YPMW2yhg9Ao?= =?us-ascii?Q?gfwTZuWxS96IRu9xXV1DYYlW+LaU74/bWGHjl0zrlckgF8cbVQ2yI/YCmpqR?= =?us-ascii?Q?nw09QF2nPtbmBjE2OYFkbGOOn5tmiEDw9L/gV46lR+sgXMsfdi7jK3wdRMex?= =?us-ascii?Q?cLDQCkAVutJ4EGABbxTTIjr+BuhInGUjj9cOM4rs?= 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: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 151e62b6-886b-452c-3898-08da5a8e5129 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2022 11:47:31.9702 (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: q7yiiQ54Jk48tVMCbfwE8zQI8+ugQZIxrXwhEqHgOau7yFocOE+4QFiok/a3S+6/nkDHYgbSuW0DDWWU3bGc6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1743 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 > -----Original Message----- > From: Zeng, ZhichaoX > Sent: Thursday, June 30, 2022 7:04 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Yang, Qiming ; Zhang, Qi Z > ; Zeng, ZhichaoX ; > alvinx.zhang@intel.com; Guo, Junfeng ; Su, Simei > ; Burakov, Anatoly ; Ferru= h > Yigit > Subject: [PATCH v4] net/igc: add support for secondary processes >=20 > From: Zhichao Zeng >=20 > The RX function was not specified in the secondary process, causing the > secondary process to segfault in a multi-process environment. >=20 > This patch specify RX/TX functions in "dev_init" to support secondary pro= cesses. >=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 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 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