summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/amd/xgbe/xgbe.h
diff options
context:
space:
mode:
authorLendacky, Thomas <Thomas.Lendacky@amd.com>2017-08-18 09:04:04 -0500
committerDavid S. Miller <davem@davemloft.net>2017-08-18 16:30:17 -0700
commit1a510ccf5869a95c0ff324c61518e42e95712844 (patch)
tree05293565c2b2dc3f6c18c32632b0913f81bcd96a /drivers/net/ethernet/amd/xgbe/xgbe.h
parent85f9feb64bd5cfd6412258be15f90b517b4b40fc (diff)
downloadlinux-1a510ccf5869a95c0ff324c61518e42e95712844.tar.gz
linux-1a510ccf5869a95c0ff324c61518e42e95712844.tar.xz
amd-xgbe: Add support for VXLAN offload capabilities
The hardware has the capability to perform checksum offload support (both Tx and Rx) and TSO support for VXLAN packets. Add the support required to enable this. The hardware can only support a single VXLAN port for offload. If more than one VXLAN port is added then the offload capabilities have to be disabled and can no longer be advertised. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe/xgbe.h')
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
index 48a46a70bf5e..db155fe7f74d 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe.h
+++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
@@ -132,6 +132,7 @@
#include <linux/interrupt.h>
#include <linux/dcache.h>
#include <linux/ethtool.h>
+#include <linux/list.h>
#define XGBE_DRV_NAME "amd-xgbe"
#define XGBE_DRV_VERSION "1.0.3"
@@ -817,6 +818,11 @@ struct xgbe_hw_if {
/* For ECC */
void (*disable_ecc_ded)(struct xgbe_prv_data *);
void (*disable_ecc_sec)(struct xgbe_prv_data *, enum xgbe_ecc_sec);
+
+ /* For VXLAN */
+ void (*enable_vxlan)(struct xgbe_prv_data *);
+ void (*disable_vxlan)(struct xgbe_prv_data *);
+ void (*set_vxlan_id)(struct xgbe_prv_data *);
};
/* This structure represents implementation specific routines for an
@@ -941,6 +947,7 @@ struct xgbe_hw_features {
unsigned int addn_mac; /* Additional MAC Addresses */
unsigned int ts_src; /* Timestamp Source */
unsigned int sa_vlan_ins; /* Source Address or VLAN Insertion */
+ unsigned int vxn; /* VXLAN/NVGRE */
/* HW Feature Register1 */
unsigned int rx_fifo_size; /* MTL Receive FIFO Size */
@@ -979,6 +986,12 @@ struct xgbe_version_data {
unsigned int rx_desc_prefetch;
};
+struct xgbe_vxlan_data {
+ struct list_head list;
+ sa_family_t sa_family;
+ __be16 port;
+};
+
struct xgbe_prv_data {
struct net_device *netdev;
struct pci_dev *pcidev;
@@ -1120,6 +1133,15 @@ struct xgbe_prv_data {
u32 rss_table[XGBE_RSS_MAX_TABLE_SIZE];
u32 rss_options;
+ /* VXLAN settings */
+ unsigned int vxlan_port_set;
+ unsigned int vxlan_offloads_set;
+ unsigned int vxlan_force_disable;
+ unsigned int vxlan_port_count;
+ struct list_head vxlan_ports;
+ u16 vxlan_port;
+ netdev_features_t vxlan_features;
+
/* Netdev related settings */
unsigned char mac_addr[ETH_ALEN];
netdev_features_t netdev_features;