From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id DD6341B1B6 for ; Wed, 24 Jan 2018 16:38:34 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8D82F2269A; Wed, 24 Jan 2018 10:38:34 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:38:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=3pwJV5PPzattNCrEC w1i+97gxy7WzCWAisTojje7PB0=; b=deOlDXIUASrAZd9O485S2+IPYiJXk9WiJ H5QnnAGyn2mHvPP7P39KVJYCXcHghqH+4/LZaQzL0MUdkmpb3McEaGPGQvtsvJ2+ a4Q3KfMK97VaRCz8jf/dU4CeAKU+FGyD2EZL2IVW/vLPZhspgKvH/JLGvQhi3YZQ 8QdKb8V5jo9DKt5+bEQZRiO8DBRnHP5b87PiGG7EzxX+PE+eVYRNvptsRRdkfVDT Fn7z7tqwSNTBS8QqWPflJ5QcBbgoGKVA/0Ez5UBT6rGayC9RE8XcCPvKDV5zN0dq Au9JVQLk31hY9FBik0gz8WGfYqTUZTZJxDEH0D6Npe/+RFKgIju4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=3pwJV5PPzattNCrECw1i+97gxy7WzCWAisTojje7PB0=; b=NGlqaNGr lWXEkSKqij7f/mKjjx8V4p6hqlnFrkLyywr2btMLInM7T8TOg5g7bzNhXoho9Shd RM8/Na6nPuj+fgdFyvxm2H/OW0ghS1YGq13C38DRHgxPPG+jh0YTv1zYz+Fwhker 8MpLGcujOXpA+QR1y2f+Z5zgwmt0UZrw24hn/ssebuaiw060MLuBVrneAcP+vTDb sfsUBKptlV8p73VKGqArxJd5M4pNHy6QpUoU3dEHAa1y0lNgR5MNdEPBTG2N/NUJ 5enGQ6EEevre/6R3NAEEj5yivE9irsCAa1ZN2ORql5JpubdYX5ss4NF37c6h7mrp ne7E/EwN/9Q8vg== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 581A87E3D4; Wed, 24 Jan 2018 10:38:31 -0500 (EST) From: Yuanhan Liu To: Beilei Xing Cc: Jingjing Wu , dpdk stable Date: Wed, 24 Jan 2018 23:32:09 +0800 Message-Id: <1516808026-25523-61-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/i40e: fix VLAN offload setting issue' has been queued to LTS release 17.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: , X-List-Received-Date: Wed, 24 Jan 2018 15:38:35 -0000 Hi, FYI, your patch has been queued to LTS release 17.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 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 8cfbfabc75c1963d94e25da84617539a0b05b6fa Mon Sep 17 00:00:00 2001 From: Beilei Xing Date: Fri, 8 Dec 2017 15:40:33 +0800 Subject: [PATCH] net/i40e: fix VLAN offload setting issue [ upstream commit 54f19c9c3b251fd0e229c5a7ebb570eed5afe68c ] When using kernel PF + DPDK VF, if setting VLAN strip on or off in VF side after setting PVID for VF with ethtool in PF side, it will cause VF Tx error. The root cause is that Rx VLAN offload is not permitted after setting PVID for VF in kernel PF side. This patch fixes the issue by check VLAN offload capability when setting VLAN offload. Fixes: 5f0b95d59a98 ("net/i40e: support VLAN stripping for VF") Signed-off-by: Beilei Xing Acked-by: Jingjing Wu --- drivers/net/i40e/i40e_ethdev_vf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 91b5bb0..4927b14 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1585,13 +1585,19 @@ static int i40evf_init_vlan(struct rte_eth_dev *dev) { /* Apply vlan offload setting */ - return i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK); + i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK); + + return 0; } static int i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask) { struct rte_eth_conf *dev_conf = &dev->data->dev_conf; + struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); + + if (!(vf->vf_res->vf_offload_flags & VIRTCHNL_VF_OFFLOAD_VLAN)) + return -ENOTSUP; /* Vlan stripping setting */ if (mask & ETH_VLAN_STRIP_MASK) { -- 2.7.4