From patchwork Tue Oct 16 03:27:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huaibin Wang X-Patchwork-Id: 46866 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8C6D74C95; Tue, 16 Oct 2018 05:28:02 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 003D12C2F for ; Tue, 16 Oct 2018 05:28:00 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id r63-v6so20842728wma.4 for ; Mon, 15 Oct 2018 20:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=pdjIq0nz/0aueGa3N+CdJoPqAmiHeJ9lg3cc9FYZz2k=; b=AamaaF8POk1hnc3yQHSMPMwpQSc+UK3p4QnJhfnbB7sZHvQeQlrMtGK7JRzCfE6E2T jDSmqYAINJcyU4QG45a23nBlsxN+nOSHuFOYFV5TcG799n8kD8/73GVSLGUEbvN3t3uz g10so4uCEC+zyGuzLaG/S0ZXZxK3c9w6f3FgbmPnhDbcipYEHIV4/+UwbOoEfenSIr0T 4eUVEDZFNfP1cznR/qAMPDN8W1Kf+uccixRQRgpRa0AR+RIX+u0bFyW8xYpeFKyZc5qI /3Yf1Ny3Th1UCBmuhR3D0r43kBggcVUi5D9/In8zkpXdDcleoTCXNh+lV1r+I5hJx8Jz RAGw== 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; bh=pdjIq0nz/0aueGa3N+CdJoPqAmiHeJ9lg3cc9FYZz2k=; b=Ds7zRJ6OEQhAVa/y7NimtgBnzindiQuGu6WXIcBYdUzfuJvsliV1m+jhArFGwViSyk KKdhbhkAFX5APIn4MZkjWTBUDYorHTYwoMnhHpuQMi/nqZYmJT09/POGAi1bpcs5oLkp HPMC+w5iG16UD+mx14xU6BqRmM0gEoQtlbhYp12H0uwggDRrCSfaqpd4aGoe3zGheZ9y FRq2EBpQeiK/jD+s3DHmegUaD5b4qnk/nj8Y661nG3agefaiZT+zraEQlOwNA+izUxYb MlmFa9RVHiiioizaG0RfxBsvPyjIMNTdYCUHzdRpCseXLDJSXkJOKHQtVQbdmQmxpvhj BzCw== X-Gm-Message-State: ABuFfoiZz/LedOT0ZW+Sz1YDRwJ23FPMQ4xKm3o0f29PxuzooGWdX4fy xh9iGmZ/B5G/ry6x8PZfj6uK4Kfa37c= X-Google-Smtp-Source: ACcGV61yCk4HawokMgv6z5zxWMIMAL3EEmdzrGbTG/FXdI/zP0nS4oQziIVMp8sXRxdo7ffnvqV5oQ== X-Received: by 2002:a1c:ee9d:: with SMTP id j29-v6mr16083764wmi.52.1539660480404; Mon, 15 Oct 2018 20:28:00 -0700 (PDT) Received: from cougar.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id a205-v6sm9392781wmh.19.2018.10.15.20.27.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 20:27:59 -0700 (PDT) From: Huaibin Wang To: dev@dpdk.org Cc: Beilei Xing , Qi Zhang , huaibin Wang , Laurent Hardy Date: Tue, 16 Oct 2018 05:27:37 +0200 Message-Id: <20181016032737.28869-1-huaibin.wang@6wind.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH] net/i40e: keep promisc on if allmulticast is enabled 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: huaibin Wang Promisc should not be disabled if the all multicast mode is enabled. Patch keeps the promiscuous on if all multicast mode is on, this behavior is also consistant with the implementation done on ixgbe pmd. Signed-off-by: huaibin Wang Signed-off-by: Laurent Hardy --- Cc: Beilei Xing Cc: Qi Zhang drivers/net/i40e/i40e_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index f7a685c8c..6c503debc 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2587,6 +2587,10 @@ i40e_dev_promiscuous_disable(struct rte_eth_dev *dev) if (status != I40E_SUCCESS) PMD_DRV_LOG(ERR, "Failed to disable unicast promiscuous"); + /* must remain in all_multicast mode */ + if (dev->data->all_multicast == 1) + return; + status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, false, NULL); if (status != I40E_SUCCESS)