From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 560101B130; Fri, 8 Mar 2019 04:13:32 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2019 19:13:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,454,1544515200"; d="scan'208";a="129823359" Received: from dpdk6.bj.intel.com ([172.16.182.192]) by fmsmga008.fm.intel.com with ESMTP; 07 Mar 2019 19:13:30 -0800 From: Wei Zhao To: dev@dpdk.org Cc: stable@dpdk.org, qi.z.zhang@intel.com, Wei Zhao Date: Fri, 8 Mar 2019 10:46:16 +0800 Message-Id: <1552013177-70811-2-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1552013177-70811-1-git-send-email-wei.zhao1@intel.com> References: <1550042334-60187-1-git-send-email-wei.zhao1@intel.com> <1552013177-70811-1-git-send-email-wei.zhao1@intel.com> Subject: [dpdk-dev] [PATCH v4 1/2] net/ixgbe: promiscuous mode enable on VF 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: Fri, 08 Mar 2019 03:13:33 -0000 There is need to enable two ops of promiscuous_enable and promiscuous_disable on VF. Signed-off-by: Wei Zhao --- doc/guides/nics/features/ixgbe_vf.ini | 1 + doc/guides/rel_notes/release_19_05.rst | 5 +++++ drivers/net/ixgbe/ixgbe_ethdev.c | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/doc/guides/nics/features/ixgbe_vf.ini b/doc/guides/nics/features/ixgbe_vf.ini index 0a15500..1614190 100644 --- a/doc/guides/nics/features/ixgbe_vf.ini +++ b/doc/guides/nics/features/ixgbe_vf.ini @@ -11,6 +11,7 @@ Jumbo frame = Y Scattered Rx = Y LRO = Y TSO = Y +Promiscuous mode = Y Allmulticast mode = Y Unicast MAC filter = Y RSS hash = Y diff --git a/doc/guides/rel_notes/release_19_05.rst b/doc/guides/rel_notes/release_19_05.rst index 2fc6ad4..36d843d 100644 --- a/doc/guides/rel_notes/release_19_05.rst +++ b/doc/guides/rel_notes/release_19_05.rst @@ -85,6 +85,11 @@ New Features * Added limited support for RSS. * Added limited support for PASSTHRU. +* **Enable promiscuous mode on ixgbe VF.** + + Enable promiscuous mode enable ixgbe on VF, + pf host also be enabled to support that. + Removed Items ------------- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index c336937..3bf51ee 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -260,6 +260,8 @@ static int ixgbevf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, static void ixgbevf_set_ivar_map(struct ixgbe_hw *hw, int8_t direction, uint8_t queue, uint8_t msix_vector); static void ixgbevf_configure_msix(struct rte_eth_dev *dev); +static void ixgbevf_dev_promiscuous_enable(struct rte_eth_dev *dev); +static void ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev); static void ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev); static void ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev); @@ -596,6 +598,8 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = { .xstats_get_names = ixgbevf_dev_xstats_get_names, .dev_close = ixgbevf_dev_close, .dev_reset = ixgbevf_dev_reset, + .promiscuous_enable = ixgbevf_dev_promiscuous_enable, + .promiscuous_disable = ixgbevf_dev_promiscuous_disable, .allmulticast_enable = ixgbevf_dev_allmulticast_enable, .allmulticast_disable = ixgbevf_dev_allmulticast_disable, .dev_infos_get = ixgbevf_dev_info_get, @@ -8310,6 +8314,22 @@ ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev, } static void +ixgbevf_dev_promiscuous_enable(struct rte_eth_dev *dev) +{ + struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); + + hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_PROMISC); +} + +static void +ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev) +{ + struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); + + hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_NONE); +} + +static void ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); -- 2.7.5