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 DD0AFA051C for ; Tue, 11 Feb 2020 12:29:05 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D5F782B9C; Tue, 11 Feb 2020 12:29:05 +0100 (CET) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id C368C1BDAE for ; Tue, 11 Feb 2020 12:29:04 +0100 (CET) Received: by mail-wr1-f65.google.com with SMTP id w15so11904670wru.4 for ; Tue, 11 Feb 2020 03:29:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P4+1sUaz9aoxo9K8LC2D6IUYfGnDHVbHCzgBieWZU8U=; b=ni5hW/AUBBzXREpfe8mm6jaxBijACEa5du/h4PFkPzzlxoOEaNaGsu1n8amdEmuMCe 0PR2vzDiLzrP96V9fw5eZefrrY06MA0vpc+J7Vk8qbwKg4PaiBaMOBs+thwgp8jpmWMt EnhoXdaULDPA1FPAtWwBOuvJBgletFyHf3jjKgoMde46WHIQ0f/EcrpNhwgC1kg25Cyc tG7K/U4eODCI1VfInkep8JjgUEnyM3HBy572ohbTOeSZMnoghiypfPpFXCN5O6ogrvN3 42OQ4aZyXQi8X4CaLi/5dVa/2RCMI424gUdRhQao7qaxjmYvgqo7KRIsZmN+EqGvLCk+ tJQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P4+1sUaz9aoxo9K8LC2D6IUYfGnDHVbHCzgBieWZU8U=; b=HIv2Va5dK2Ax0cIyR3tqc+XUYvuHzfeVOLtDWmXp72gV5e7EGyMCmp22HGTS6TWxWi KOeqc/uGT60fpOn14e4BsyhZEBlG9wqDfuYk9Lrf+007riG3K7VFygPcW7+/1gAFwp8Y zJZVEfKWkK61z/3D1lQxXZNODZXowZiysC1GxcI3QtFa+AFp/NHCZvS7YLJZERJPj4qR 6TxEcAESU7673sr3kz39h/B/auLdogEDNSWbs3FFfWQB5W5toR5PJLMca09X+Q79Ag2n WPYBa5KRUTsmxLoWsaSHn89MVJPb0VzgG+UGUnY4r7TqLmlWTemh+v40amqnNBT/8GxU rOBg== X-Gm-Message-State: APjAAAV/KddyLFKhOYTq9f8dave/lNBiuJMWBKE2tfUSN1gUq192cyyL qCqPr0cuAyXEFYuuBnObf6s= X-Google-Smtp-Source: APXvYqySIb+agkpGoKulIy7v2antHe3183M6tzKCNUnUXJ8y+faEoJEualRkxjeyxijMvptfqHQlJA== X-Received: by 2002:adf:f28c:: with SMTP id k12mr8441800wro.360.1581420544344; Tue, 11 Feb 2020 03:29:04 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id s8sm3505699wmf.45.2020.02.11.03.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:29:03 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: dpdk stable Date: Tue, 11 Feb 2020 11:20:33 +0000 Message-Id: <20200211112216.3929-87-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/netvsc: fix crash in secondary process' has been queued to stable release 19.11.1 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 stable release 19.11.1 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 rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From afd3472fc2d7bb5c02d6f6f5e4809cb8cd7dfcc6 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 | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index 159116f7f6..c79f924379 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -257,15 +257,16 @@ static int hn_dev_info_get(struct rte_eth_dev *dev, dev_info->max_rx_queues = hv->max_queues; dev_info->max_tx_queues = hv->max_queues; + if (rte_eal_process_type() != RTE_PROC_PRIMARY) + return 0; + + /* fills in rx and tx offload capability */ rc = hn_rndis_get_offload(hv, dev_info); if (rc != 0) return rc; - rc = hn_vf_info_get(hv, dev_info); - if (rc != 0) - return rc; - - return 0; + /* merges the offload and queues of vf */ + return hn_vf_info_get(hv, dev_info); } static int hn_rss_reta_update(struct rte_eth_dev *dev, @@ -929,16 +930,16 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev) eth_dev->tx_pkt_burst = &hn_xmit_pkts; eth_dev->rx_pkt_burst = &hn_recv_pkts; - /* - * for secondary processes, we don't initialize any further as primary - * has already done this work. - */ - if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return 0; - /* Since Hyper-V only supports one MAC address, just use local data */ eth_dev->data->mac_addrs = &hv->mac_addr; + /* + * for secondary processes, we don't initialize any further as primary + * has already done this work. + */ + if (rte_eal_process_type() != RTE_PROC_PRIMARY) + return 0; + hv->vmbus = vmbus; hv->rxbuf_res = &vmbus->resource[HV_RECV_BUF_MAP]; hv->chim_res = &vmbus->resource[HV_SEND_BUF_MAP]; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:41.955721636 +0000 +++ 0087-net-netvsc-fix-crash-in-secondary-process.patch 2020-02-11 11:17:38.528003740 +0000 @@ -1,14 +1,15 @@ -From f8279f47dd89c026d760ebce99452393d1270849 Mon Sep 17 00:00:00 2001 +From afd3472fc2d7bb5c02d6f6f5e4809cb8cd7dfcc6 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") -Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger ---