Skip to content

Commit 483f451

Browse files
Hyong Youb Kimferruhy
authored andcommitted
net/enic: allow multicast in MAC address add callback
enic_set_mac_address() (mac_addr_add callback) currently allows only non-zero, unicast address to be added. It is overly restrictive. rte_eth_dev_mac_addr_add() itself allows multicast addresses. And, some applications do use rte_eth_dev_mac_addr_add() to accept multicast addresses. So, remove the unicast check in enic_set_mac_address(). Signed-off-by: Hyong Youb Kim <[email protected]> Reviewed-by: John Daley <[email protected]>
1 parent 417e776 commit 483f451

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

drivers/net/enic/enic_main.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,6 @@
3232
#include "vnic_intr.h"
3333
#include "vnic_nic.h"
3434

35-
static int is_zero_addr(uint8_t *addr)
36-
{
37-
return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]);
38-
}
39-
40-
static int is_mcast_addr(uint8_t *addr)
41-
{
42-
return addr[0] & 1;
43-
}
44-
45-
static int is_eth_addr_valid(uint8_t *addr)
46-
{
47-
return !is_mcast_addr(addr) && !is_zero_addr(addr);
48-
}
49-
5035
void
5136
enic_rxmbuf_queue_release(__rte_unused struct enic *enic, struct vnic_rq *rq)
5237
{
@@ -177,11 +162,6 @@ int enic_set_mac_address(struct enic *enic, uint8_t *mac_addr)
177162
{
178163
int err;
179164

180-
if (!is_eth_addr_valid(mac_addr)) {
181-
dev_err(enic, "invalid mac address\n");
182-
return -EINVAL;
183-
}
184-
185165
err = enic_dev_add_addr(enic, mac_addr);
186166
if (err)
187167
dev_err(enic, "add mac addr failed\n");

0 commit comments

Comments
 (0)