From: Qiming Yang <qiming.yang@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, wenzhuo.lu@intel.com,
Qiming Yang <qiming.yang@intel.com>
Subject: [dpdk-stable] [PATCH v2] net/e1000: fix VF received problem
Date: Wed, 3 May 2017 13:51:32 +0800 [thread overview]
Message-ID: <1493790692-58671-1-git-send-email-qiming.yang@intel.com> (raw)
In-Reply-To: <1493269649-56200-1-git-send-email-qiming.yang@intel.com>
VF default MAC address be added in PF Mac address list
instead of VF MAC address list, makes VF can't receive
packets. This patch fixes this issue.
Fixes: be2d648a2dd3 ("igb: add PF support")
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
drivers/net/e1000/igb_pf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c
index 67da3c2..923c78a 100644
--- a/drivers/net/e1000/igb_pf.c
+++ b/drivers/net/e1000/igb_pf.c
@@ -332,12 +332,16 @@ igb_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
*(E1000_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
int rar_entry = hw->mac.rar_entry_count - (vf + 1);
uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
+ int rah;
if (is_unicast_ether_addr((struct ether_addr *)new_mac)) {
if (!is_zero_ether_addr((struct ether_addr *)new_mac))
rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
sizeof(vfinfo[vf].vf_mac_addresses));
hw->mac.ops.rar_set(hw, new_mac, rar_entry);
+ rah = E1000_READ_REG(hw, E1000_RAH(rar_entry));
+ rah |= (0x1 << (E1000_RAH_POOLSEL_SHIFT + vf));
+ E1000_WRITE_REG(hw, E1000_RAH(rar_entry), rah);
return 0;
}
return -1;
--
2.7.4
next prev parent reply other threads:[~2017-05-03 6:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 5:07 [dpdk-stable] [PATCH] net/e1000: fix vf " Qiming Yang
2017-04-27 5:41 ` Lu, Wenzhuo
2017-05-03 5:51 ` Qiming Yang [this message]
2017-05-03 7:12 ` [dpdk-stable] [PATCH v2] net/e1000: fix VF " Lu, Wenzhuo
2017-05-05 14:56 ` Thomas Monjalon
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=1493790692-58671-1-git-send-email-qiming.yang@intel.com \
--to=qiming.yang@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=wenzhuo.lu@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).