* [dpdk-dev] [PATCH 1/2] net/i40e: fix MAC check when delete MAC
@ 2017-01-23 9:42 Jingjing Wu
2017-01-23 9:42 ` [dpdk-dev] [PATCH 2/2] net/i40e: fix deletion of all macvlan filters Jingjing Wu
2017-01-23 13:52 ` [dpdk-dev] [PATCH 1/2] net/i40e: fix MAC check when delete MAC Ferruh Yigit
0 siblings, 2 replies; 3+ messages in thread
From: Jingjing Wu @ 2017-01-23 9:42 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, henlin.zhang
When VF sends request to remove MAC address, PF host will check
if it is a non-zero or unicast address. When VF remove a multicast
address, it will report error.
This patch fixes this issue.
Fixes: ec852c94af39 ("net/i40e: enhance sanity check of MAC")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_pf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index dbea5d0..0af0573 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -929,7 +929,7 @@ i40e_pf_host_process_cmd_del_ether_address(struct i40e_pf_vf *vf,
for (i = 0; i < addr_list->num_elements; i++) {
mac = (struct ether_addr *)(addr_list->list[i].addr);
- if(!is_valid_assigned_ether_addr(mac) ||
+ if(is_zero_ether_addr(mac) ||
i40e_vsi_delete_mac(vf->vsi, mac)) {
ret = I40E_ERR_INVALID_MAC_ADDR;
goto send_msg;
--
2.4.11
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH 2/2] net/i40e: fix deletion of all macvlan filters
2017-01-23 9:42 [dpdk-dev] [PATCH 1/2] net/i40e: fix MAC check when delete MAC Jingjing Wu
@ 2017-01-23 9:42 ` Jingjing Wu
2017-01-23 13:52 ` [dpdk-dev] [PATCH 1/2] net/i40e: fix MAC check when delete MAC Ferruh Yigit
1 sibling, 0 replies; 3+ messages in thread
From: Jingjing Wu @ 2017-01-23 9:42 UTC (permalink / raw)
To: dev; +Cc: jingjing.wu, henlin.zhang
filter_type is not set when removing all macvlan filters. It will
cause error when send AQ command to HW.
This patch fixes this issue.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
CC:stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 92c750f..a818998 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -6115,7 +6115,7 @@ i40e_find_all_mac_for_vlan(struct i40e_vsi *vsi,
static int
i40e_vsi_remove_all_macvlan_filter(struct i40e_vsi *vsi)
{
- int i, num;
+ int i, j, num;
struct i40e_mac_filter *f;
struct i40e_macvlan_filter *mv_f;
int ret = I40E_SUCCESS;
@@ -6140,6 +6140,7 @@ i40e_vsi_remove_all_macvlan_filter(struct i40e_vsi *vsi)
TAILQ_FOREACH(f, &vsi->mac_list, next) {
(void)rte_memcpy(&mv_f[i].macaddr,
&f->mac_info.mac_addr, ETH_ADDR_LEN);
+ mv_f[i].filter_type = f->mac_info.filter_type;
mv_f[i].vlan_id = 0;
i++;
}
@@ -6149,6 +6150,8 @@ i40e_vsi_remove_all_macvlan_filter(struct i40e_vsi *vsi)
vsi->vlan_num, &f->mac_info.mac_addr);
if (ret != I40E_SUCCESS)
goto DONE;
+ for (j = i; j < i + vsi->vlan_num; j++)
+ mv_f[j].filter_type = f->mac_info.filter_type;
i += vsi->vlan_num;
}
}
--
2.4.11
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] net/i40e: fix MAC check when delete MAC
2017-01-23 9:42 [dpdk-dev] [PATCH 1/2] net/i40e: fix MAC check when delete MAC Jingjing Wu
2017-01-23 9:42 ` [dpdk-dev] [PATCH 2/2] net/i40e: fix deletion of all macvlan filters Jingjing Wu
@ 2017-01-23 13:52 ` Ferruh Yigit
1 sibling, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2017-01-23 13:52 UTC (permalink / raw)
To: Jingjing Wu, dev; +Cc: henlin.zhang, dpdk stable
On 1/23/2017 9:42 AM, Jingjing Wu wrote:
> When VF sends request to remove MAC address, PF host will check
> if it is a non-zero or unicast address. When VF remove a multicast
> address, it will report error.
> This patch fixes this issue.
>
> Fixes: ec852c94af39 ("net/i40e: enhance sanity check of MAC")
Cc: stable@dpdk.org
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-23 13:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23 9:42 [dpdk-dev] [PATCH 1/2] net/i40e: fix MAC check when delete MAC Jingjing Wu
2017-01-23 9:42 ` [dpdk-dev] [PATCH 2/2] net/i40e: fix deletion of all macvlan filters Jingjing Wu
2017-01-23 13:52 ` [dpdk-dev] [PATCH 1/2] net/i40e: fix MAC check when delete MAC Ferruh Yigit
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).