From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Dai Subject: [PATCH 02/29] net/ixgbe/base: fix condition to clear RAR entry Date: Sun, 4 Dec 2016 14:31:13 +0800 Message-ID: <1480833100-48545-2-git-send-email-wei.dai@intel.com> References: <1480833100-48545-1-git-send-email-wei.dai@intel.com> Cc: dev@dpdk.org, Wei Dai To: helin.zhang@intel.com, konstantin.ananyev@intel.com Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 8B5F437B8 for ; Sun, 4 Dec 2016 07:35:23 +0100 (CET) In-Reply-To: <1480833100-48545-1-git-send-email-wei.dai@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Specifically the RAR entry for the SAN MAC address is being cleared when the VMDq pool bits are cleared. In order to prevent this we need to add an extra check to protect the SAN MAC from being cleared. Fixes: af75078fece3 ("first public release") Signed-off-by: Wei Dai --- drivers/net/ixgbe/base/ixgbe_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c index cca19ef..b2cc6fb 100644 --- a/drivers/net/ixgbe/base/ixgbe_common.c +++ b/drivers/net/ixgbe/base/ixgbe_common.c @@ -3764,7 +3764,8 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq) } /* was that the last pool using this rar? */ - if (mpsar_lo == 0 && mpsar_hi == 0 && rar != 0) + if (mpsar_lo == 0 && mpsar_hi == 0 && + rar != 0 && rar != hw->mac.san_mac_rar_index) hw->mac.ops.clear_rar(hw, rar); done: return IXGBE_SUCCESS; -- 2.7.4