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 ECFADA0C42; Fri, 18 Jun 2021 19:28:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7118A40150; Fri, 18 Jun 2021 19:28:32 +0200 (CEST) Received: from AUS01-SY4-obe.outbound.protection.outlook.com (mail-sy4aus01olkn2166.outbound.protection.outlook.com [40.92.62.166]) by mails.dpdk.org (Postfix) with ESMTP id 0274B40142 for ; Fri, 18 Jun 2021 19:28:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RXy92UpJFGYmZw3QYwi0w6o+R/K5VWoAg7nY62pVqLkfz08eR54uainAGr3H//s5XSDH7UcQjXTc0CSc/xd6c3I7t7YE625C+xaTVS5R3kmYwQ28FS0MSjWCD1Xs0jbWFlD6R5XkzHFY+7v2gujz4yvQ6Y43P0hUZ61DVd8l1zHPFaQyGlFtMQ1A7Zb8cY50uA/4rIj9avJgr7I3zWxPcxNwnIiJZZJCJUX1uXszEOrT4lDnYISN5/FXL0WOih/QGrhU3uOA9Ikr9GQGY1dq7a1KcRFlbq1R8+tqIVN4mxpNWSxBQS1taJDzFdFOo1mbIZkeGR2fXfBMSiDfjgr3fg== 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=7t8CAkg9c6ORpftp2A+k+ZnvVyakeXjCCmKX+QFjLEY=; b=gGdo9wImyFha6NSzdccWT4fETanDDZiuTfvQGhAUy87B65bN8IPxTNonIAQwuM4Nv1QyUB7f8E/LLvNI+Fvs7X+dSXJmlshiyF71SeVQhf5qnCn2ty4Q5vRN+q/JGYuhcZpGFY6dNozyqy2hQ1hH2DZrU9nb8IpCWluoWhyQHDm/6+dAnaCm/FdYasiAhridRHzbArSkqoJivDQEEjm1FtGNb52xeM8VlrCWGNAX1DD9o6i5a3WtNlbeOOE24SxFQhfTe0pQcNlBH3c9BbUBhssgKz3Im6nuZr8aanOHWTutyJff4A8qRryqcLWSu/To280hIbw5R1UrwC1vr9UFlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7t8CAkg9c6ORpftp2A+k+ZnvVyakeXjCCmKX+QFjLEY=; b=nmpbL0yFVtlcK+sWLyPhmVFMDny7Ep/LJwnTndLM4FnMZMuKdFxhdkncn5wXEYb2jTVtEbBoFUuGsJeQTsrBHuCDkEZQJ97Jm6SC2+XilGhJNj1QRKFHmgOhfVPw43JxBNSBcS257Z92x5HkccrUpUqMYFXlo9j2Lf5oZnBAdUM41/dEw1z0Qm/cwDiEZg/zxAvJ9XkvtK1FVQ8340So8cUSy3XOMX03dA/LXC17uynIbHsD/uYk/1G66tltoX1uAR9QgTLVLjvTqYE8nYIQkyqMbvKacA4o0J/eXvtXF3ta49ihHU6ueu7xtFNEdsCLVkbLSWtHaRph/XlZm48G8w== Received: from ME3P282MB1668.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:a5::11) by ME2P282MB1412.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:5e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.21; Fri, 18 Jun 2021 17:28:27 +0000 Received: from ME3P282MB1668.AUSP282.PROD.OUTLOOK.COM ([fe80::a5ea:6127:5368:d8b8]) by ME3P282MB1668.AUSP282.PROD.OUTLOOK.COM ([fe80::a5ea:6127:5368:d8b8%7]) with mapi id 15.20.4242.022; Fri, 18 Jun 2021 17:28:27 +0000 From: Tengfei Zhang To: Haiyue Wang Cc: dev@dpdk.org, Tengfei Zhang Date: Sat, 19 Jun 2021 01:26:36 +0800 Message-ID: X-Mailer: git-send-email 2.26.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [TAA5NvLzLdVnthohOomh7kElNeQEryyV] X-ClientProxiedBy: HK2PR06CA0006.apcprd06.prod.outlook.com (2603:1096:202:2e::18) To ME3P282MB1668.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:a5::11) X-Microsoft-Original-Message-ID: <20210618172637.1443-1-zypscode@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from LAPTOP-0Q478N9O.localdomain (121.225.194.51) by HK2PR06CA0006.apcprd06.prod.outlook.com (2603:1096:202:2e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Fri, 18 Jun 2021 17:28:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 05b40ebc-fa3e-44bc-9d2b-08d9327e7ad0 X-MS-Exchange-SLBlob-MailProps: zswcL9HXbeWHziI4W2rgnG11HsMX0HHkBNiCEWlELtU8FlRs0C9wiBs4SgZ7o/18WeF6u7C3vLlSCsrSFe3AcVjVV2OVGAD1vyf4WypkHlBKigDg8Waiz//MpRZGlFee7VovKdku24PgVewcr21B+1/BEvH8fKMg3d361mm1RrIB8VV2gSDBKZj37aRPeyCPqaim/yus1J2JISe1rEobFbmrfQHvHnC9WuoHdKdwFSRzMG3YBe9YXb/zMxnCzEowzjFRlENaQnZ7Xc5Rsc/TjdEJ6N4pShe3lkDq734sJrdnoOx+3oAGx/vyHnl7Ht08Gi8Ffi5SUJRQytimnpmRKkHFYk4CdL8xwwlyLJV9/uZNH6/Ltvap4pN8qtUsG6xb1bftGJQXySEJOUlXbskE+2DC90VPD1916fe2VOYYkgQsxNqPPUbzTFM0XLfsWDQakYyivdRKquHc5fbp67zoGli15+U5yeUpjn4L+qlPevHsIGLyRHTf8JAEbDpqR+7xoge+J+JYgS8V4GpmymjOAnVycURZvoASENoSmAiRyUqJpj85nfryjmC/qOrlPGAao+TyEAcSXUc//U/UevcQ4CY4VojWaxYsvli48E8VcDbvq5PkQG2kT9P6h6DNQv9onolHiOU53XnMc71EwRKjDvtPM284UXItfL4ebIQgtSSSPPC2Sbj7wMdxZwBU3HlXut4sCw+taRRJJgvmlUm2Sm1Af4+0bHHSeTSfV9Sh7L0BLMMFlHYen3nuhchPXzrq X-MS-TrafficTypeDiagnostic: ME2P282MB1412: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 69HC7MLfUvxp/l2eEMjkOaDfud2vqweoc0IUF9HBx+Nhy41MDqeVYKnX+BTGDYApx0w0A9LX3KwZvGJRQlKmc9WYl+7edygm5dQa0xF/U12auPjD7AV6hu/chheCN9K5uYM8nLGoOJ3Zq6b8FGgPrtCSJL0sdxG8zkiV440YLWpswtctyPcwP589NAc4TqITQzDKDHQ/CfoEx4WrJrA/cE99KhTVo/XY5dRZo88gZcrqgD6krs2V3zjIxafml9sFGwlnYpTAh98lp+a3AGe+/83NT22PdRWByNQs+iXAZrUfrhB55p7jCPYJemiVr1WgBUg5yDa29Wj6CG1TIlnkT2BmKp3NLXWSD0iQbNcdQHovNtQqOupuJ29Z2WkmyN5NdtFavHnhVrqjEejqd4hmEQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GJzt+p+HvaqIYobFPzUH7TdgCxhpCgoEYKn1OQWP76HCcvBx0cx+nW+NlBQjxvCB0358wTVlBioJh88ptH/ePY6Wl83ITEuunhHlR5i0BYMrH41o/ZJxWuPzeSOwKt9hk+jakFKqzabKK44ObvqUbA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05b40ebc-fa3e-44bc-9d2b-08d9327e7ad0 X-MS-Exchange-CrossTenant-AuthSource: ME3P282MB1668.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2021 17:28:27.4142 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME2P282MB1412 Subject: [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" '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. Signed-off-by: Tengfei Zhang --- drivers/net/e1000/em_ethdev.c | 1 + drivers/net/e1000/igb_ethdev.c | 2 ++ 2 files changed, 3 insertions(+) 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() != RTE_PROC_PRIMARY){ + e1000_setup_init_funcs(hw, TRUE); if (eth_dev->data->scattered_rx) eth_dev->rx_pkt_burst = (eth_rx_burst_t)ð_em_recv_scattered_pkts; diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.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() != RTE_PROC_PRIMARY){ + e1000_setup_init_funcs(hw, TRUE); if (eth_dev->data->scattered_rx) eth_dev->rx_pkt_burst = ð_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() != RTE_PROC_PRIMARY){ + e1000_setup_init_funcs(hw, TRUE); if (eth_dev->data->scattered_rx) eth_dev->rx_pkt_burst = ð_igb_recv_scattered_pkts; return 0; -- 2.26.2