Skip to content

Commit c8ad089

Browse files
committed
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2018-04-25 This series represents yet another phase of the macvlan cleanup Alex has been working on. The main goal of these changes is to make it so that we only support offloading what we can actually offload and we don't break any existing functionality. So for example we were claiming to advertise source mode macvlan and we were doing nothing of the sort, so support for that has been dropped. The biggest change with this set is that broadcast/multicast replication is no longer being supported in software. Alex dropped it as it leads to scaling issues when a broadcast frame has to be replicated up to 64 times. Beyond that this set goes through and optimized the time needed to bring up and tear down the macvlan interfaces on ixgbe and provides a clean way for us to disable the macvlan offload when needed. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 6f5d295 + 8315ef6 commit c8ad089

File tree

7 files changed

+243
-185
lines changed

7 files changed

+243
-185
lines changed

drivers/net/ethernet/intel/fm10k/fm10k_main.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,15 +445,14 @@ static void fm10k_type_trans(struct fm10k_ring *rx_ring,
445445
l2_accel = NULL;
446446
}
447447

448-
skb->protocol = eth_type_trans(skb, dev);
449-
450448
/* Record Rx queue, or update macvlan statistics */
451449
if (!l2_accel)
452450
skb_record_rx_queue(skb, rx_ring->queue_index);
453451
else
454452
macvlan_count_rx(netdev_priv(dev), skb->len + ETH_HLEN, true,
455-
(skb->pkt_type == PACKET_BROADCAST) ||
456-
(skb->pkt_type == PACKET_MULTICAST));
453+
false);
454+
455+
skb->protocol = eth_type_trans(skb, dev);
457456
}
458457

459458
/**

drivers/net/ethernet/intel/fm10k/fm10k_netdev.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "fm10k.h"
2323
#include <linux/vmalloc.h>
2424
#include <net/udp_tunnel.h>
25+
#include <linux/if_macvlan.h>
2526

2627
/**
2728
* fm10k_setup_tx_resources - allocate Tx resources (Descriptors)
@@ -1254,7 +1255,7 @@ void fm10k_restore_rx_state(struct fm10k_intfc *interface)
12541255
glort = l2_accel->dglort + 1 + i;
12551256

12561257
hw->mac.ops.update_xcast_mode(hw, glort,
1257-
FM10K_XCAST_MODE_MULTI);
1258+
FM10K_XCAST_MODE_NONE);
12581259
fm10k_queue_mac_request(interface, glort,
12591260
sdev->dev_addr,
12601261
hw->mac.default_vid, true);
@@ -1449,6 +1450,13 @@ static void *fm10k_dfwd_add_station(struct net_device *dev,
14491450
int size = 0, i;
14501451
u16 glort;
14511452

1453+
/* The hardware supported by fm10k only filters on the destination MAC
1454+
* address. In order to avoid issues we only support offloading modes
1455+
* where the hardware can actually provide the functionality.
1456+
*/
1457+
if (!macvlan_supports_dest_filter(sdev))
1458+
return ERR_PTR(-EMEDIUMTYPE);
1459+
14521460
/* allocate l2 accel structure if it is not available */
14531461
if (!l2_accel) {
14541462
/* verify there is enough free GLORTs to support l2_accel */
@@ -1515,7 +1523,7 @@ static void *fm10k_dfwd_add_station(struct net_device *dev,
15151523

15161524
if (fm10k_host_mbx_ready(interface)) {
15171525
hw->mac.ops.update_xcast_mode(hw, glort,
1518-
FM10K_XCAST_MODE_MULTI);
1526+
FM10K_XCAST_MODE_NONE);
15191527
fm10k_queue_mac_request(interface, glort, sdev->dev_addr,
15201528
hw->mac.default_vid, true);
15211529
}

drivers/net/ethernet/intel/ixgbe/ixgbe.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ enum ixgbe_ring_state_t {
305305
struct ixgbe_fwd_adapter {
306306
unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
307307
struct net_device *netdev;
308-
struct ixgbe_adapter *real_adapter;
309308
unsigned int tx_base_queue;
310309
unsigned int rx_base_queue;
311310
int pool;

0 commit comments

Comments
 (0)