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 213F8A0547; Mon, 21 Jun 2021 09:31:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6BFF40040; Mon, 21 Jun 2021 09:31:17 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 1A4754003F for ; Mon, 21 Jun 2021 09:31:15 +0200 (CEST) IronPort-SDR: v2lyjpkgyq6ucZ62NJeET9wgvGDZ3o16sp22EqDAp3uTZ9uMOsfLrVDQ7PdsExdVXXG1YO5yRb R5KOZUAkJXoQ== X-IronPort-AV: E=McAfee;i="6200,9189,10021"; a="267935038" X-IronPort-AV: E=Sophos;i="5.83,289,1616482800"; d="scan'208";a="267935038" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2021 00:31:14 -0700 IronPort-SDR: 9hwGYZB2bu6gAb1GZlVWQR9IemIRkQnbYg4NH3WGnZy647umPCQYBg5uz6yS+Ab1/7dg+Z1b7M RTfTmkk1gt+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,289,1616482800"; d="scan'208";a="486391771" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga001.jf.intel.com with ESMTP; 21 Jun 2021 00:31:14 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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.2242.4; Mon, 21 Jun 2021 00:31:13 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Mon, 21 Jun 2021 00:31:13 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.40) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Mon, 21 Jun 2021 00:31:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SSA0mXCDmXCAs3O+r/cq6ossESMzYSR3pqh/jE1cD21Bc9YLzFMaMaOwXC7ADvtnR0CE8/FUU7TWZopew4NW6ALTQadeRVU0+I9nnjcAqtqJJhWGrjq38sMl0NVpUk6VQCXa9ZviDiiRoeGKMzxmRS0fkns0pNv2foc+jAGP4E8V43bcJhnzaCQnnZ1xsUzV4gdM6RlnaYA9sDKtlvTzBWEM7qzB28WtYNNO5w9jFKU+tt25QMxpKDed2UZOLdi5lHsU/aAOeUAdzBh5tdNGkKCvs31/kokB/IHoSyDWsq8TAUk7IVh4txrcTCQzx1CeFYRg1mVaLYvfLyv570/kaA== 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=lhfxghEVzCxlC6FJ3AQdsghdFNu3J+6r3PIIkJC6nqA=; b=ljzg7CMZbA+v2jVfHLEYqxy5C0AvI++sSQDt5Ou8Km7MVmQobhjdsXnbaTEjbo7vg2tf6q+YY9Tg27b+iUBfzwsOKqL7e4SyQOhRtDsk1BZvr5z9govsII6KqeVQSdX5cyFp0fZBpJs4VWo2FPFXbBs2/lAypnQpdTD04HpYiZ3Z1p4mQdBYcBsAMeyl3Fo+GkmpOd4nWWmEO2gkDYGnxH9ka2EeKtPDMPD/QbdvK+Y7UcG08gzyWHZOjX14esJn7i4abqN+kukZ+PxF4L4QIPBxIYPOE0mQTp+AScZ+88IHbHJZ8nnK0Yhi5c5/CTy05zw79HiKv/fQ1FysGzn5Hw== 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=lhfxghEVzCxlC6FJ3AQdsghdFNu3J+6r3PIIkJC6nqA=; b=ulCJ5pFqpRsPYoMaVvnI6Q3ssnWziUmSwCj2menDngzFHdhgf5Y1llVCOfldMa34tYTocw+grqttgosmy9MfBX/Jkp0kAqBmlpxSQuGNXj3RgJeu4QbWwozvw9vKtpEhyWjY8FJhoVNzFSBO0Fj8Dkd2HD0GW/mF/RkkEwa1ycQ= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN6PR11MB1906.namprd11.prod.outlook.com (2603:10b6:404:104::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.22; Mon, 21 Jun 2021 07:31:09 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::8807:6661:e425:102]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::8807:6661:e425:102%7]) with mapi id 15.20.4242.023; Mon, 21 Jun 2021 07:31:09 +0000 From: "Wang, Haiyue" To: Tengfei Zhang CC: "dev@dpdk.org" , "Zhang, Qi Z" , "Lin, Xueqin" Thread-Topic: [PATCH] net/e1000: fix nic ops function was no initialized in secondary process Thread-Index: AQHXZGerCCGi/mwSuEa+9CHO8xYXTqseFMdg Date: Mon, 21 Jun 2021 07:31:09 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.0.76 authentication-results: outlook.com; dkim=none (message not signed) header.d=none;outlook.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 27ea5b40-cb51-4dff-cb0c-08d934868a1a x-ms-traffictypediagnostic: BN6PR11MB1906: 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:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xVQUaydADvZa7wxzaCc8YjSVwqEwmRzaEGTQuXPK5D0gqKfEB146hLVdMZl6lqWE5zLYh8TwVtu5J0VJ/rATFsMSLNAu8pKHiTtll7n8rXx6u5kxM4NOt/75Hd5PF1wZ9Ky4BkW/Zx3aufxomkvvdDl8KMHPfZ4VOUhLJVCKJm3u+/53ZyX3rImWghodSeneaTEWAqjrgOFMjuPZn0v9X32cjTUGetWWujo+bgkk9zmeRBECMXe8Ih72rE/psxylFkqXKJmpmBnnypxCUoYMyvBSQtaH9MjzuN8CSbHrO1BdBNQvG6Ol3On7rhUpoApXQHNSgPVB3sCx1uhs6+e+WNWRQ+RQwqqkE9PrBSp3rCzja4ySc5iRda4MbHDklVq5tuJ0SvyPBTdhCxwfnngrbW+l7l5o3Vx0FDS5mD4H7xkmuZR/dht2hY2XSXiNO603+Z+eJZ9IrK3ws/ezmRNdhHq7nqrZpryF3QHOBLoiVi94v3IffpjuNhrh6mDeYZ67GSKl/752mOAd5WtMLouQlgk3rbHiJVR8AT2LNgwyW7Kun1cF7drpFJB+vhaPyye/0cWhnWWC/oCuGtZJ1bNVyyfN1aoZFE23J1ar49xKSag= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3795.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(39860400002)(136003)(346002)(376002)(366004)(8936002)(6916009)(8676002)(66446008)(66556008)(33656002)(64756008)(76116006)(66946007)(107886003)(122000001)(66476007)(83380400001)(71200400001)(38100700002)(55016002)(9686003)(2906002)(316002)(4326008)(5660300002)(52536014)(478600001)(26005)(186003)(86362001)(54906003)(7696005)(53546011)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?pkaYJ+6EeL22biKY2dpJwQvFt6ioe909AR3ppTul0bCsModwTLOFlYJkUn4N?= =?us-ascii?Q?tWmkp4R5bfu6gnT92yd5s5vNz4jdzL42D8+oenRN8LTNa5YwD+xtG0QW2+yr?= =?us-ascii?Q?5KBShtodh9p1lB4Y36tYG7Pq0QXHRPSOi1VVJkc56SSFzQ3h+LqB9Brh1JeI?= =?us-ascii?Q?FIJRobzvqzIBHzfP0Y+DO7vTIrVOWKcqvqd5pdgVsun8+pZqcM2qHuxd2CJ9?= =?us-ascii?Q?ysCVfW0EpdZ95E4zGPegMz2RsJtxV6Fsj9w8PkGxWLXVPoNZ0VRa66sKx3y8?= =?us-ascii?Q?6iEJwB+UF81sCIa6cOqgczTqkFqoRDyhYzkIU1+CIuQWM9r4J8qEWT/XYq4B?= =?us-ascii?Q?qJ/WBsJHtXQcRIzsOH9KnWJkM3u6B1v+JR2YHmHp2/IqKi8v0vr/nLUnpTXX?= =?us-ascii?Q?nnFsKkS61R+vCXwU9jEtmP+5Pb3G9mzIRRqGPXTRpnuOlifgku4rNg+goWCH?= =?us-ascii?Q?3b1NkdPCRAubHb9EvbUIiDgErZ+H2lKIll0TBaZ7SNTemdr/h5ugbWczfkKs?= =?us-ascii?Q?eFoxlB4PwDU63zDIkhcRVYd8Qwo3i0x4kWk9/UsVdrEiUU9GF0smY7QZwjDz?= =?us-ascii?Q?4O8pfCfYxPy3d1kJeKLfCsGkzbkUaRTCC25UR3bDdnSOgdDFW8/IUYnywar7?= =?us-ascii?Q?+u3zx4oKGvD/agRtCSC/UFwaScYDkmtg9reGtDpOxNcN5O1Tk82MxbzMbwim?= =?us-ascii?Q?pXfyI5jJ6050V++zNA/E5HzHOPNpWUwDTPli88y+7SvMOj+qmW6A1jOKLz9F?= =?us-ascii?Q?W7fWqFYrs7wPLPTolttOcgwgRzTOEO146z1f/GXMVPa3Fjt6ctgA+NYA50Nu?= =?us-ascii?Q?6JGx//FjRAhP92fYw2YHlC9MAKe5oeOgnL4zvPIiVJwRsmIGxYgF6WuORt8s?= =?us-ascii?Q?uHy9Ex/SRO4w0KEhyflKd1qkJe1pjRPwlSRgTge88jU/93BqGYxYRqzNOM5Y?= =?us-ascii?Q?xR0tLtEhn2U/ZItvBKcf1+I2I73vD/3eCVhwoH7DJC0GcEblpgn2JRQcg75F?= =?us-ascii?Q?0yeyDU+qGtM79TQ/iAombJYPkWDmt38I38WrDTB26Tk5ZED8P0eERf7omst+?= =?us-ascii?Q?Q9fCpcyPVaHB/6TsplzamUhoKhk1B206jFPHtIXlhnLLKh9f9kto4HI70ZnK?= =?us-ascii?Q?K4KNeQOgerckViTVHX7KgPyn5lnzihyAIJe8iuwYc9PPZCM7vabXd1UY9dag?= =?us-ascii?Q?Qjdm18+F9ZgmDscho9LHDxvB3AQ7/uI3TOfCWyTFoDFmGYwUzTEQqkuZ2SkS?= =?us-ascii?Q?do7GxxzUDbsM3x9iSuK8UyWk627Z1ste+6XAi1MDzFOLWtEWJfPWrkyBy0pC?= =?us-ascii?Q?/os=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: BN8PR11MB3795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27ea5b40-cb51-4dff-cb0c-08d934868a1a X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jun 2021 07:31:09.5630 (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: nR7lPDZgqg8+Zm//wcPKeTS0EbnepSubFImE2PT0YqqKzgBS7OZpB0dItxmE9hIbi14B/f3t5BruH9RZoLeH2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1906 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] net/e1000: fix nic ops function was no initialized in secondary process 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: Tengfei Zhang > Sent: Saturday, June 19, 2021 01:27 > To: Wang, Haiyue > Cc: dev@dpdk.org; Tengfei Zhang > Subject: [PATCH] net/e1000: fix nic ops function was no initialized in se= condary process >=20 > 'e1000_setup_init_funcs' was not called in secondary process, > it initialize mac,phy,nvm ops. > when secondary process get link status,it will coredump. Thanks, Tengfei. Since primary / secondary is so complicated, AFAIK, the control path is in primary, the secondary is mainly for rx/tx ops officially, like new Intel ice PMD: if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) { ice_set_rx_function(dev); ice_set_tx_function(dev); return 0; } So you can keep your patch as private for special secondary usage. ;-) >=20 > Signed-off-by: Tengfei Zhang > --- > drivers/net/e1000/em_ethdev.c | 1 + > drivers/net/e1000/igb_ethdev.c | 2 ++ > 2 files changed, 3 insertions(+) >=20 > diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.= c > index a0ca371b02..cd5faa4228 100644 > --- a/drivers/net/e1000/em_ethdev.c > +++ b/drivers/net/e1000/em_ethdev.c > @@ -258,6 +258,7 @@ eth_em_dev_init(struct rte_eth_dev *eth_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){ > + e1000_setup_init_funcs(hw, TRUE); > if (eth_dev->data->scattered_rx) > eth_dev->rx_pkt_burst =3D > (eth_rx_burst_t)ð_em_recv_scattered_pkts; > diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethde= v.c > index 10ee0f3341..7d9d60497d 100644 > --- a/drivers/net/e1000/igb_ethdev.c > +++ b/drivers/net/e1000/igb_ethdev.c > @@ -737,6 +737,7 @@ eth_igb_dev_init(struct rte_eth_dev *eth_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){ > + e1000_setup_init_funcs(hw, TRUE); > if (eth_dev->data->scattered_rx) > eth_dev->rx_pkt_burst =3D ð_igb_recv_scattered_pkts; > return 0; > @@ -931,6 +932,7 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_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){ > + e1000_setup_init_funcs(hw, TRUE); > if (eth_dev->data->scattered_rx) > eth_dev->rx_pkt_burst =3D ð_igb_recv_scattered_pkts; > return 0; > -- > 2.26.2