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 E52FCA0093 for ; Tue, 19 May 2020 15:06:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC4851D62D; Tue, 19 May 2020 15:06:16 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 764CB1D62D for ; Tue, 19 May 2020 15:06:15 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id j5so15882507wrq.2 for ; Tue, 19 May 2020 06:06:15 -0700 (PDT) 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=RTpslntqxkD9ip4XPwD+3G/M0C0F8v8XViCXoxTa8+g=; b=AsBvVZk/P/0hlTfUplkw156IY31T4ZJlxg066Dpoun4CfL8Pe/A6mnMAvAAfNzn+tJ ZUhgrQdb2Im31wy9ZkDsGmuqiDu7YGAFS0ra4xxQ08Z2INzfFRVv5AGcmLmluouzyiG6 gVOhFQHaSN215gjxizjczJIJ9GQgbn/Wgtw6QNwQkWw/qVJb0w/Vv6g4baSmMIt+7WJr GavV5QJ0d+DC/pRXe0F3j67Rj9+CdVelrBKGt2xqets6+YUVzUngTRGDpgPjqEFDB69i +1m6CVKX69OZkYD5kKMekmoHuE/doxwwax16E9Flht6GyREugDwUc1v7VgIRPfl2XJ/R gR3g== 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=RTpslntqxkD9ip4XPwD+3G/M0C0F8v8XViCXoxTa8+g=; b=rFwZfwTCm2H/CvxRwjR0LyU6yuD+x2ZQiVfMxFS+oNt9GUXzRQlwLh1eM53u6bdE3M DpyGAQlG6BZ4cjYCS6AvFzpHiKuba/fMT2uREWAbzXmxARtT5DAVupN1HuS3zRaed17b wypqK3AQXmgVXwZLhLneApHyk4ttaChsDi9aFd7v+TYK4Ol2N1mh0gsyhCgCFYtF62mD xRfNVh0Q+3jD7RNh1yqpB5s02UJuB9N7U3SBW3nbIWtsbezFep/FMzQ5SoHeunh0SQ4x dcMaB3j8bXhqy0O28PtXX3kY0vmkV6L+/VKCV98WqrUwEymiU0IvuI+eNOL6ffAzFWAv Jtqg== X-Gm-Message-State: AOAM5318NZ1nqQDhRsP5vWwCF7Sw/89EKl/Rwh9qv64R7qEhhRyguEiA Rm92r77Lh8E9RGouf7rNiVs= X-Google-Smtp-Source: ABdhPJyEpuVjjHKNdY0nExRpr98aFyRBKeOoQBWtyyPy6mxHBndEbTdY8f8fI8mjXEdVPxOyO7qx2A== X-Received: by 2002:adf:b786:: with SMTP id s6mr25060716wre.287.1589893575182; Tue, 19 May 2020 06:06:15 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id n128sm3895506wmb.47.2020.05.19.06.06.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:06:14 -0700 (PDT) From: luca.boccassi@gmail.com To: "Min Hu (Connor)" Cc: Wei Hu , dpdk stable Date: Tue, 19 May 2020 14:02:22 +0100 Message-Id: <20200519130549.112823-7-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: fix configuring illegal VLAN PVID' has been queued to stable release 19.11.3 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/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 3f9c9bdcb51baa5bc253195bb71582d6b5a169ee Mon Sep 17 00:00:00 2001 From: "Min Hu (Connor)" Date: Tue, 17 Mar 2020 17:12:05 +0800 Subject: [PATCH] net/hns3: fix configuring illegal VLAN PVID [ upstream commit d33fb7f939e6fb9c7882b57e9c3c0fab68c16874 ] The VLAN pvid ranges from 0 to 4095. The hns3 PMD driver does not support this situation that the VLAN pvid is larger than Maximum VLAN ID(4095). Fixes: 411d23b9eafb ("net/hns3: support VLAN") Signed-off-by: Min Hu (Connor) Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 9dc96fff5a..688227e0eb 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -868,6 +868,12 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on) struct hns3_hw *hw = &hns->hw; int ret; + if (pvid > RTE_ETHER_MAX_VLAN_ID) { + hns3_err(hw, "Invalid vlan_id = %u > %d", pvid, + RTE_ETHER_MAX_VLAN_ID); + return -EINVAL; + } + rte_spinlock_lock(&hw->lock); ret = hns3_vlan_pvid_configure(hns, pvid, on); rte_spinlock_unlock(&hw->lock); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:44.875820818 +0100 +++ 0007-net-hns3-fix-configuring-illegal-VLAN-PVID.patch 2020-05-19 14:04:44.056645472 +0100 @@ -1,14 +1,15 @@ -From d33fb7f939e6fb9c7882b57e9c3c0fab68c16874 Mon Sep 17 00:00:00 2001 +From 3f9c9bdcb51baa5bc253195bb71582d6b5a169ee Mon Sep 17 00:00:00 2001 From: "Min Hu (Connor)" Date: Tue, 17 Mar 2020 17:12:05 +0800 Subject: [PATCH] net/hns3: fix configuring illegal VLAN PVID +[ upstream commit d33fb7f939e6fb9c7882b57e9c3c0fab68c16874 ] + The VLAN pvid ranges from 0 to 4095. The hns3 PMD driver does not support this situation that the VLAN pvid is larger than Maximum VLAN ID(4095). Fixes: 411d23b9eafb ("net/hns3: support VLAN") -Cc: stable@dpdk.org Signed-off-by: Min Hu (Connor) Signed-off-by: Wei Hu (Xavier) @@ -17,10 +18,10 @@ 1 file changed, 6 insertions(+) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c -index fe6b21fd12..a715354573 100644 +index 9dc96fff5a..688227e0eb 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c -@@ -873,6 +873,12 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on) +@@ -868,6 +868,12 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on) struct hns3_hw *hw = &hns->hw; int ret;