From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 549D4A0542 for ; Fri, 7 Feb 2020 16:14:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4C0491BF8E; Fri, 7 Feb 2020 16:14:24 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id D7D901BF8E for ; Fri, 7 Feb 2020 16:14:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581088462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P8yMFHWi/vGh2lWvznlCGp1AmxwvMcHptu+O+r4BFrg=; b=FVi4Xt8UDImaVBJNFF7oi3oI3rcBXQlIgIdWstov6qosSuxkZZmQL+16jytBY3XPNAx53O sPRuBUx/+AFiU09fMN76cskgkd8bcdWgfMpGZaXZ945VnctazRR5Z12ViiRIaae2b72UR5 ZEUtek7uk6vKlk0bJCoNlmhmhSU/1ts= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-CMak2-MjPCiDigbqNFMbTw-1; Fri, 07 Feb 2020 10:14:04 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BABAC10054E3; Fri, 7 Feb 2020 15:14:03 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id E038B1001B28; Fri, 7 Feb 2020 15:14:02 +0000 (UTC) From: Kevin Traynor To: Stephen Hemminger Cc: dpdk stable Date: Fri, 7 Feb 2020 15:12:45 +0000 Message-Id: <20200207151248.29804-33-ktraynor@redhat.com> In-Reply-To: <20200207151248.29804-1-ktraynor@redhat.com> References: <20200207151248.29804-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: CMak2-MjPCiDigbqNFMbTw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/netvsc: fix crash in secondary process' has been queued to LTS release 18.11.7 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/65a6abfcd80d67e1c0= 483274d3460c4aec767fe8 Thanks. Kevin. --- >From 65a6abfcd80d67e1c0483274d3460c4aec767fe8 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 13 Jan 2020 11:12:38 -0800 Subject: [PATCH] net/netvsc: fix crash in secondary process [ upstream commit f8279f47dd89c026d760ebce99452393d1270849 ] The secondary process would crash trying to get the offload capability of the device. Since the device capabilities were already set by the primary process this was unnecessary. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Signed-off-by: Stephen Hemminger --- drivers/net/netvsc/hn_ethdev.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.= c index c2cf0afc84..085a3f6350 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -241,4 +241,7 @@ static void hn_dev_info_get(struct rte_eth_dev *dev, =09dev_info->max_tx_queues =3D hv->max_queues; =20 +=09if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) +=09=09return; + =09hn_rndis_get_offload(hv, dev_info); =09hn_vf_info_get(hv, dev_info); @@ -722,14 +725,14 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev) =09eth_dev->rx_pkt_burst =3D &hn_recv_pkts; =20 -=09/* -=09 * for secondary processes, we don't initialize any further as primary -=09 * has already done this work. -=09 */ -=09if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) -=09=09return 0; - =09/* Since Hyper-V only supports one MAC address, just use local data */ =09eth_dev->data->mac_addrs =3D &hv->mac_addr; =20 +=09/* +=09 * for secondary processes, we don't initialize any further as primary +=09 * has already done this work. +=09 */ +=09if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) +=09=09return 0; + =09hv->vmbus =3D vmbus; =09hv->rxbuf_res =3D &vmbus->resource[HV_RECV_BUF_MAP]; --=20 2.21.1 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092020-02-07 15:08:19.244531833 +0000 +++ 0033-net-netvsc-fix-crash-in-secondary-process.patch=092020-02-07 15:08= :17.569062219 +0000 @@ -1 +1 @@ -From f8279f47dd89c026d760ebce99452393d1270849 Mon Sep 17 00:00:00 2001 +From 65a6abfcd80d67e1c0483274d3460c4aec767fe8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f8279f47dd89c026d760ebce99452393d1270849 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -15,2 +16,2 @@ - drivers/net/netvsc/hn_ethdev.c | 25 +++++++++++++------------ - 1 file changed, 13 insertions(+), 12 deletions(-) + drivers/net/netvsc/hn_ethdev.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) @@ -19 +20 @@ -index 159116f7f6..c79f924379 100644 +index c2cf0afc84..085a3f6350 100644 @@ -22 +23 @@ -@@ -258,13 +258,14 @@ static int hn_dev_info_get(struct rte_eth_dev *dev, +@@ -241,4 +241,7 @@ static void hn_dev_info_get(struct rte_eth_dev *dev, @@ -26 +27 @@ -+=09=09return 0; ++=09=09return; @@ -28,15 +29,3 @@ -+=09/* fills in rx and tx offload capability */ - =09rc =3D hn_rndis_get_offload(hv, dev_info); - =09if (rc !=3D 0) - =09=09return rc; -=20 --=09rc =3D hn_vf_info_get(hv, dev_info); --=09if (rc !=3D 0) --=09=09return rc; -- --=09return 0; -+=09/* merges the offload and queues of vf */ -+=09return hn_vf_info_get(hv, dev_info); - } -=20 -@@ -930,14 +931,14 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev) + =09hn_rndis_get_offload(hv, dev_info); + =09hn_vf_info_get(hv, dev_info); +@@ -722,14 +725,14 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)