DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wang Xiao W <xiao.w.wang@intel.com>
To: jing.d.chen@intel.com
Cc: dev@dpdk.org, Wang Xiao W <xiao.w.wang@intel.com>
Subject: [dpdk-dev] [PATCH] fm10k: fix VF cannot receive broadcast traffic
Date: Mon,  6 Jun 2016 17:00:47 +0800	[thread overview]
Message-ID: <1465203647-18717-1-git-send-email-xiao.w.wang@intel.com> (raw)

When app tries promisc/allmulti setting, fm10k will check if a valid glort
is acquired, if not then exit without doing anything. It's a long journey
for VF to acquire glort info from VF to PF mailbox, PF to switch mailbox.
It could be a long interval that's out of DPDK's control. Thus, app may
fail on promisc/allmulti setting in VF. In fact, we don't need a valid
glort value in VF, so this patch just skips the glort check for VF.

Fixes: df02ba864695 ("fm10k: support promiscuous mode")

Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index c2d377f..b3aefdb 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -947,7 +947,7 @@ fm10k_dev_promiscuous_enable(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	/* Return if it didn't acquire valid glort range */
-	if (!fm10k_glort_valid(hw))
+	if ((hw->mac.type == fm10k_mac_pf) && !fm10k_glort_valid(hw))
 		return;
 
 	fm10k_mbx_lock(hw);
@@ -969,7 +969,7 @@ fm10k_dev_promiscuous_disable(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	/* Return if it didn't acquire valid glort range */
-	if (!fm10k_glort_valid(hw))
+	if ((hw->mac.type == fm10k_mac_pf) && !fm10k_glort_valid(hw))
 		return;
 
 	if (dev->data->all_multicast == 1)
@@ -995,7 +995,7 @@ fm10k_dev_allmulticast_enable(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	/* Return if it didn't acquire valid glort range */
-	if (!fm10k_glort_valid(hw))
+	if ((hw->mac.type == fm10k_mac_pf) && !fm10k_glort_valid(hw))
 		return;
 
 	/* If promiscuous mode is enabled, it doesn't make sense to enable
@@ -1026,7 +1026,7 @@ fm10k_dev_allmulticast_disable(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	/* Return if it didn't acquire valid glort range */
-	if (!fm10k_glort_valid(hw))
+	if ((hw->mac.type == fm10k_mac_pf) && !fm10k_glort_valid(hw))
 		return;
 
 	if (dev->data->promiscuous) {
-- 
1.9.3

             reply	other threads:[~2016-06-06  9:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06  9:00 Wang Xiao W [this message]
2016-06-14  5:03 ` Chen, Jing D
2016-06-17 10:32   ` Bruce Richardson
2016-06-17 10:18 ` Bruce Richardson
2016-06-19 13:47   ` Chen, Jing D

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=1465203647-18717-1-git-send-email-xiao.w.wang@intel.com \
    --to=xiao.w.wang@intel.com \
    --cc=dev@dpdk.org \
    --cc=jing.d.chen@intel.com \
    /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).