DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
To: dev@dpdk.org
Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>
Subject: [dpdk-dev] [PATCH 7/9] net/ixgbe: support xcast promisc mode
Date: Wed,  1 Mar 2017 14:04:50 +0800	[thread overview]
Message-ID: <1488348292-118243-8-git-send-email-wenzhuo.lu@intel.com> (raw)
In-Reply-To: <1488348292-118243-1-git-send-email-wenzhuo.lu@intel.com>

Add the support of xcast promiscuous mode. It's
added in mailbox v1.3.
Move the definition of xcast mode to base code.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_mbx.h | 8 ++++++++
 drivers/net/ixgbe/base/ixgbe_vf.c  | 4 ++++
 drivers/net/ixgbe/ixgbe_ethdev.c   | 6 ------
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.h b/drivers/net/ixgbe/base/ixgbe_mbx.h
index 7556a81..bde50a5 100644
--- a/drivers/net/ixgbe/base/ixgbe_mbx.h
+++ b/drivers/net/ixgbe/base/ixgbe_mbx.h
@@ -114,6 +114,14 @@ enum ixgbe_pfvf_api_rev {
 #define IXGBE_VF_GET_RSS_KEY	0x0b    /* get RSS key */
 #define IXGBE_VF_UPDATE_XCAST_MODE	0x0c
 
+/* mode choices for IXGBE_VF_UPDATE_XCAST_MODE */
+enum ixgbevf_xcast_modes {
+	IXGBEVF_XCAST_MODE_NONE = 0,
+	IXGBEVF_XCAST_MODE_MULTI,
+	IXGBEVF_XCAST_MODE_ALLMULTI,
+	IXGBEVF_XCAST_MODE_PROMISC,
+};
+
 /* GET_QUEUES return data indices within the mailbox */
 #define IXGBE_VF_TX_QUEUES	1	/* number of Tx queues supported */
 #define IXGBE_VF_RX_QUEUES	2	/* number of Rx queues supported */
diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/ixgbe_vf.c
index 8775ee5..b513190 100644
--- a/drivers/net/ixgbe/base/ixgbe_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_vf.c
@@ -432,6 +432,10 @@ s32 ixgbevf_update_xcast_mode(struct ixgbe_hw *hw, int xcast_mode)
 
 	switch (hw->api_version) {
 	case ixgbe_mbox_api_12:
+		/* New modes were introduced in 1.3 version */
+		if (xcast_mode > IXGBEVF_XCAST_MODE_ALLMULTI)
+			return IXGBE_ERR_FEATURE_NOT_SUPPORTED;
+		/* Fall through */
 	case ixgbe_mbox_api_13:
 		break;
 	default:
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 7169007..2e497a8 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -155,12 +155,6 @@
 #define IXGBE_QDE_STRIP_TAG                    0x00000004
 #define IXGBE_VTEICR_MASK                      0x07
 
-enum ixgbevf_xcast_modes {
-	IXGBEVF_XCAST_MODE_NONE = 0,
-	IXGBEVF_XCAST_MODE_MULTI,
-	IXGBEVF_XCAST_MODE_ALLMULTI,
-};
-
 #define IXGBE_EXVET_VET_EXT_SHIFT              16
 #define IXGBE_DMATXCTL_VT_MASK                 0xFFFF0000
 
-- 
1.9.3

  parent reply	other threads:[~2017-03-01  6:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01  6:04 [dpdk-dev] [PATCH 0/9] Update ixgbe base driver Wenzhuo Lu
2017-03-01  6:04 ` [dpdk-dev] [PATCH 1/9] net/ixgbe/base: make a debug message simple Wenzhuo Lu
2017-03-01  6:04 ` [dpdk-dev] [PATCH 2/9] net/ixgbe/base: remove X550em SFP iXFI setup Wenzhuo Lu
2017-03-01  6:04 ` [dpdk-dev] [PATCH 3/9] net/ixgbe/base: add link block check for KR Wenzhuo Lu
2017-03-01  6:04 ` [dpdk-dev] [PATCH 4/9] net/ixgbe/base: add bit for enabling L3/L4 filtering Wenzhuo Lu
2017-03-01  6:04 ` [dpdk-dev] [PATCH 5/9] net/ixgbe/base: complete hw init when SFP not present Wenzhuo Lu
2017-03-01  6:04 ` [dpdk-dev] [PATCH 6/9] net/ixgbe/base: disable FC for 15B0 Wenzhuo Lu
2017-03-01  6:04 ` Wenzhuo Lu [this message]
2017-03-01  6:04 ` [dpdk-dev] [PATCH 8/9] net/ixgbe/base: fix build error Wenzhuo Lu
2017-03-03 22:27   ` Ferruh Yigit
2017-03-01  6:04 ` [dpdk-dev] [PATCH 9/9] net/ixgbe/base: update readme Wenzhuo Lu
2017-03-03 22:28   ` Ferruh Yigit
2017-03-03 22:29 ` [dpdk-dev] [PATCH 0/9] Update ixgbe base driver Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1488348292-118243-8-git-send-email-wenzhuo.lu@intel.com \
    --to=wenzhuo.lu@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).