From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 97A831B45E for ; Mon, 14 Jan 2019 07:12:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jan 2019 22:12:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,476,1539673200"; d="scan'208";a="117891189" Received: from dpdk-qiming2.sh.intel.com ([10.67.119.132]) by orsmga003.jf.intel.com with ESMTP; 13 Jan 2019 22:12:40 -0800 From: Qiming Yang To: dev@dpdk.org Cc: Qiming Yang Date: Mon, 14 Jan 2019 21:35:30 +0800 Message-Id: <20190114133530.137015-1-qiming.yang@intel.com> X-Mailer: git-send-email 2.9.5 Subject: [dpdk-dev] [PATCH] net/ice: fix vlan filter Tx issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 06:12:43 -0000 This patch fixed Tx error and allowed untagged packets in when vlan filter on. Fixes: e0dcf94a0d7f ("net/ice: support VLAN ops") Signed-off-by: Qiming Yang --- drivers/net/ice/ice_ethdev.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 0a81e04..4672d12 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2183,14 +2183,20 @@ ice_vsi_config_vlan_filter(struct ice_vsi *vsi, bool on) if (ret) { PMD_DRV_LOG(INFO, "Update VSI failed to %s vlan rx pruning", on ? "enable" : "disable"); - ret = -EINVAL; + return -EINVAL; } else { vsi->info.valid_sections |= rte_cpu_to_le_16(ICE_AQ_VSI_PROP_SW_VALID | ICE_AQ_VSI_PROP_SECURITY_VALID); } - return ret; + /* consist with other drivers, allow untagged packet when vlan filter on */ + if (on) + ret = ice_add_vlan_filter(vsi, 0); + else + ret = ice_remove_vlan_filter(vsi, 0); + + return 0; } static int -- 2.9.5