Commit 4a2512cf authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher

ixgbe: Assume provided MAC filter has been verified by macvlan

The macvlan driver itself will validate the MAC address that is configured
for a given interface. There is no need for us to verify it again.

Instead we should be checking to verify that we actually allocate the filter
and have not run out of resources to configure a MAC rule in our filter
table.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 6bd39bc3
...@@ -5406,12 +5406,16 @@ static int ixgbe_fwd_ring_up(struct net_device *vdev, ...@@ -5406,12 +5406,16 @@ static int ixgbe_fwd_ring_up(struct net_device *vdev,
if (err) if (err)
goto fwd_queue_err; goto fwd_queue_err;
if (is_valid_ether_addr(vdev->dev_addr)) /* ixgbe_add_mac_filter will return an index if it succeeds, so we
ixgbe_add_mac_filter(adapter, vdev->dev_addr, * need to only treat it as an error value if it is negative.
*/
err = ixgbe_add_mac_filter(adapter, vdev->dev_addr,
VMDQ_P(accel->pool)); VMDQ_P(accel->pool));
if (err < 0)
goto fwd_queue_err;
ixgbe_macvlan_set_rx_mode(vdev, VMDQ_P(accel->pool), adapter); ixgbe_macvlan_set_rx_mode(vdev, VMDQ_P(accel->pool), adapter);
return err; return 0;
fwd_queue_err: fwd_queue_err:
ixgbe_fwd_ring_down(vdev, accel); ixgbe_fwd_ring_down(vdev, accel);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment