fm10k: Add support for MACVLAN acceleration
This patch adds support for L2 MACVLAN by making use of the fact that the RRC provides a unique tag per filter called a Global Resource Tag, or GLORT. In the case of this offload what I have done is assigned a linear block of these so that each GLORT represents one of the MACVLAN netdevs. By doing this I can share the Rx queues and Tx queues for all of the MACVLAN netdevs while allowing them to be demuxed in the Rx cleanup path. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:

committed by
Jeff Kirsher

parent
76a540d472
commit
5cd5e2e982
@@ -54,6 +54,15 @@
|
||||
/* How many Rx Buffers do we bundle into one write to the hardware ? */
|
||||
#define FM10K_RX_BUFFER_WRITE 16 /* Must be power of 2 */
|
||||
|
||||
#define FM10K_MAX_STATIONS 63
|
||||
struct fm10k_l2_accel {
|
||||
int size;
|
||||
u16 count;
|
||||
u16 dglort;
|
||||
struct rcu_head rcu;
|
||||
struct net_device *macvlan[0];
|
||||
};
|
||||
|
||||
enum fm10k_ring_state_t {
|
||||
__FM10K_TX_DETECT_HANG,
|
||||
__FM10K_HANG_CHECK_ARMED,
|
||||
@@ -104,6 +113,7 @@ struct fm10k_ring {
|
||||
struct fm10k_q_vector *q_vector;/* backpointer to host q_vector */
|
||||
struct net_device *netdev; /* netdev ring belongs to */
|
||||
struct device *dev; /* device for DMA mapping */
|
||||
struct fm10k_l2_accel __rcu *l2_accel; /* L2 acceleration list */
|
||||
void *desc; /* descriptor ring memory */
|
||||
union {
|
||||
struct fm10k_tx_buffer *tx_buffer;
|
||||
@@ -217,6 +227,7 @@ struct fm10k_vxlan_port {
|
||||
struct fm10k_intfc {
|
||||
unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
|
||||
struct net_device *netdev;
|
||||
struct fm10k_l2_accel *l2_accel; /* pointer to L2 acceleration list */
|
||||
struct pci_dev *pdev;
|
||||
unsigned long state;
|
||||
|
||||
|
Reference in New Issue
Block a user