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 9B055A0545; Thu, 23 Jun 2022 05:50:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8582D4069D; Thu, 23 Jun 2022 05:50:45 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 5BECC4069C; Thu, 23 Jun 2022 05:50:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655956243; x=1687492243; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=vCijyzGk0gmG/wqAgGDNn9a/dbi391XXCn0ty9F1rE0=; b=MCPq89+VNq4YBJ/nrXRISj4fSrAJEX61Y4MHmKr0jnGns1rZcVbFIBLF Yy/2D3kR2UHnfX/wSQOaNioroI1F0z+nBKECEsGWTQ+X223gDs8miyUSP EKpMxL8pTvTPx9sa3y8zut39gv4KslW5fa+V6JEmIjpyB4aCY3lpjfnn6 CaUwUwc+4OrdHGEcoOm3fFgsiZtzJ5DPx5gU/wQTjAmyGsz86AqKbe81K SuY0NmA9QwTKRuyE0f6rfyfp1BSV0WEzI5ghSgvenX9oKTucpYtvaSUIW 396PJmSj5BBATLo3eqbXLbiPp6GcR0Ov/QEsnMf9l4VfclmxM6809QGct Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10386"; a="280663366" X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="280663366" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 20:50:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="586001852" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga007.jf.intel.com with ESMTP; 22 Jun 2022 20:50:41 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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.2308.27; Wed, 22 Jun 2022 20:50:41 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) 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; Wed, 22 Jun 2022 20:50:41 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 22 Jun 2022 20:50:41 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.42) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 22 Jun 2022 20:50:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jvLPK8zB9dZTDXM3+g4e7VQmZW0ry0NLeEpJj7ZPd318R9QGgcdYzK5jiazNy3utLQZHPoDCjZfvTirKqm2YCZ+oYFlItrOzkysaAIDuH4rkvVvLDoDuq4VkFgZUxWXxOhC3eGNXtnInzDWw5itYV8uZI+Mqj6d2UlwQMmg0zioqsMWx0zuzMR7zFn3etBRuWK9XERjGYddcS2gzV5N0LMKgE/fHluULKICYRnq/upbDgS75TQYKaCKJ/t9eMakTYxFEdQUEvyMnx4iA2jMPHYTaQL7iol9UTkWBdiZenpKUelt1p0v71oG5BgRe+ZHj2Xv06cPF4jQidzI+qBxgng== 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=ej20xHkgZjwIvMVCzVjOaPzLqK5hIVNyPI43Sh8miSI=; b=d6b9K59Uklu0OF5E9b5JdEQonLkiZOf7WC9bS0o5W9K6qTGMParZ/JgxuDcFs9BLTyfS0WhZwU1jhk8kaNI4ShsC/wd2Zar1qRDCm34FiOV83JIzs+XLr0UFvWvVy/MJld8OSdD3yK5s2MwbCw99YOGYJxmD+UjuZrz960bNCRGf9xmMnKH70Qnrx1NZHvC78xxkHwCAGsV8dqhaI/6eyAmOcSolTmnvBKdS/RVhUP2Roy3BmQi7xV5lIa/Bk8wINBBDjJQnjYZJPeGrrP89VxusVxuOOTfJVZeIYWQ0O4GjQPnPd2M2bmXht5FS8I84OdIyM7Ov4DLW9THRiwfrIw== 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 PH0PR11MB4902.namprd11.prod.outlook.com (2603:10b6:510:37::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Thu, 23 Jun 2022 03:50:37 +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.015; Thu, 23 Jun 2022 03:50:37 +0000 From: "Zhang, Qi Z" To: "Zeng, ZhichaoX" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Yang, Qiming" , "Zeng, ZhichaoX" , "alvinx.zhang@intel.com" , "Guo, Junfeng" , "Su, Simei" , Ferruh Yigit Subject: RE: [PATCH v2] net/igc: fix segmentation fault in secondary dpdk-symmetric_mp Thread-Topic: [PATCH v2] net/igc: fix segmentation fault in secondary dpdk-symmetric_mp Thread-Index: AQHYhiXCxNcfhk97WESqeRN3yzX3za1cXCmw Date: Thu, 23 Jun 2022 03:50:37 +0000 Message-ID: References: <20220615073915.13309-1-zhichaox.zeng@intel.com> <20220622104907.862666-1-zhichaox.zeng@intel.com> In-Reply-To: <20220622104907.862666-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: 847f871a-1b86-49fb-8676-08da54cb88ce x-ms-traffictypediagnostic: PH0PR11MB4902:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CExG9en6QxbRBBNHl/2rP/oKkL8aiHi0uqZ1KtEnuEWBDi48GNUL2n2aYbo0kN1pRS8O7I55/EzeqA1lwLxg/4KsQmgoWD262ezTW4HuDNAtue5ULD0FSCw7HsDQHrv7FwLqTuXxGGnscCEwBlQgjL1D0AzD+4bd7UyGFnUSXHDqQVGA7y5J43Bfz/k3ntpmh+QQP6YAOPSI9Y74hP3xqD2qBwCkgtriwTLL/U2JZBGq+NyXk317GjugkEJlfUXFFGbwOrn4mA0gXiX8mbNfhlp8oc9i2P7DK8GPTYN59wRfhTE/PAWNYpZp8udSwtQ9N42cI8Te2dHnJwAd8iYROsakKMKjDriP5KbP0GA10LmYbAQ+3QjnmDBLLgLQVqOZfdlvLM2wgn5t1mSTVzXUF0WOdm0D2r8NVrsqrrl21gDzE5kvcBz+5kwRiI9Jt4A/52yIrDsoj8UNQijJE5HU2YobFhtg51rtAzSSET8XanSTj8L0YDVPBJ0lm79KJHtzsTLtjNbNVnG5WKL9n6OHOCQsbP2IIoBKNAYU7ZXnDdyOyTP0yjZP1LhO8Fmfj5aIzlCWJTGcio4+1E/Q5WdJJ/cDP1ochOXtmR0xujxcaBvpA7GQI/frMnDDh5cyXdMlgMqz70ZPCUo8530ghG154P0tPmQtKwC+fVuvWd1Mm5eSIgpO9kvHGhmtaf5YEEJ0gl4ETR1Up+59x/L7+jk4AuZe9BFnCObvOU1Shkl/ClpFGS7/6uXskSNegd3jgVGaVun5faPNkETwytI4NOEajA== 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)(346002)(39860400002)(136003)(396003)(376002)(366004)(53546011)(26005)(4326008)(9686003)(86362001)(64756008)(66446008)(66476007)(66556008)(186003)(8676002)(107886003)(41300700001)(66946007)(83380400001)(450100002)(76116006)(2906002)(55016003)(478600001)(122000001)(82960400001)(38100700002)(5660300002)(71200400001)(52536014)(8936002)(7696005)(6506007)(33656002)(54906003)(38070700005)(110136005)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?IXq9D7oQEAMcMWTStdgobkl3Ks20Rzxo6wozJBVoR1by1qHehXZYVDtnhqRX?= =?us-ascii?Q?eyz8nc59c7iswLOeXAmYWhFfbKGLmAkmlnaegJNcYgyfhlXe2MzOQ7w3PL7u?= =?us-ascii?Q?yf+/4/xYsECd0KYZOdVc7e85O8tqprXRw6SbsRRVErVucYTcbESv9rtQqZaO?= =?us-ascii?Q?3tlt/jy4cQunPAT6bNag+6D2UVXHfkhyxTZzarLdakTKEijwuTekKdlzsuX2?= =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gZu/VxoIzIEdsJwgumMWkHKU18c1?= =?us-ascii?Q?4QzglbfvE7vt3zMvAW6iPlfAzHM2Qui3rqKK8xYBssNsHnpRQGKt7XWZYZOa?= =?us-ascii?Q?UTtHPzaq7yA78xePDLyLynjHGT9eYuW7V8lqscbtlJH8BuI/0fcCMy0hrlKY?= =?us-ascii?Q?x0va8OhVUOrqLHe/W59oGGV7D+NqUMwz7lThNJxpWVWooijdOBplyYsA2P9s?= =?us-ascii?Q?UOhwiJUS9YAbvO23aJeujqPT5Nl7vAtfI5mUP1GFzT1cO+LsQ5SMemLSw3n3?= =?us-ascii?Q?4phl0EOg1/rQFH+w5m+Eu81p9JLoojqg+vVayCwJv2RvLcirkt7Q30QjKf4H?= =?us-ascii?Q?wesfFlnyC74qSIZQK2JTsdOqDuhJwGL/qiaAE7zeSBtISiQHEHlgXdnfyJDb?= =?us-ascii?Q?a7g4sIa1jW94fmIxHjQ8NFyA6CEMi2ijqOAe54kSqJEM33sA88qtgm/Y3rEj?= =?us-ascii?Q?5LcR6CzaY9+h7sSHWLRhxGUi7ZveKZysqw2InvjbYHAmKHiSCAuL24K58Qpe?= =?us-ascii?Q?wZRrVB1gpn6KXEzpFqfECcb2hwO3/fnqO+2TEdK3ivsm11+TIcEZxVKKxGro?= =?us-ascii?Q?zvDg/HzFqLRFAc4J6NfJe/lh0HJiH4H85iLmi+WP6NY8MQlmlsTN179eE3MI?= =?us-ascii?Q?ysvkqEQ27Q=3D=3D?= 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: 847f871a-1b86-49fb-8676-08da54cb88ce X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2022 03:50:37.6520 (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: VttKYFlUk5LAFnPz9IKKXUBw7fXhSlY/bnab6zYgfVGYSeJPO6wmDTTB/wD52+TUkkw9JdY1S0W5BOTTiuOFSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4902 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: zhichaox.zeng@intel.com > Sent: Wednesday, June 22, 2022 6:49 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Yang, Qiming ; Zeng, ZhichaoX > ; alvinx.zhang@intel.com; Guo, Junfeng > ; Su, Simei ; Ferruh Yigit > > Subject: [PATCH v2] net/igc: fix segmentation fault in secondary dpdk- > symmetric_mp >=20 > From: Zhichao Zeng >=20 > In the secondary dpdk-symmetric_mp process, the "smp_port_init" was > skipped, which cause some function pointers not to be initialized, and a > segmentation fault occurred when calling these function pointers. >=20 > This patch assigns initial values to rx_pkt_burst, tx_pkt_burst and > tx_pkt_prepare pointers to avoid calling null function pointer. >=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 > --- > drivers/net/igc/igc_ethdev.c | 3 +++ > drivers/net/igc/igc_txrx.c | 6 +++--- > drivers/net/igc/igc_txrx.h | 4 ++++ > 3 files changed, 10 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c = index > b9933b395d..25fb91bfec 100644 > --- a/drivers/net/igc/igc_ethdev.c > +++ b/drivers/net/igc/igc_ethdev.c > @@ -1234,6 +1234,9 @@ eth_igc_dev_init(struct rte_eth_dev *dev) > dev->rx_queue_count =3D eth_igc_rx_queue_count; > dev->rx_descriptor_status =3D eth_igc_rx_descriptor_status; > dev->tx_descriptor_status =3D eth_igc_tx_descriptor_status; > + dev->rx_pkt_burst =3D igc_recv_pkts; > + dev->tx_pkt_burst =3D igc_xmit_pkts; > + dev->tx_pkt_prepare =3D eth_igc_prep_pkts; If you already assign the function point in dev_init, you should remove the= following redundant code.