aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/fm10k/fm10k_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_main.c')
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index c7a19a5e0ec9..84ab9eea2768 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -727,6 +727,12 @@ static __be16 fm10k_tx_encap_offload(struct sk_buff *skb)
727 struct ethhdr *eth_hdr; 727 struct ethhdr *eth_hdr;
728 u8 l4_hdr = 0; 728 u8 l4_hdr = 0;
729 729
730/* fm10k supports 184 octets of outer+inner headers. Minus 20 for inner L4. */
731#define FM10K_MAX_ENCAP_TRANSPORT_OFFSET 164
732 if (skb_inner_transport_header(skb) - skb_mac_header(skb) >
733 FM10K_MAX_ENCAP_TRANSPORT_OFFSET)
734 return 0;
735
730 switch (vlan_get_protocol(skb)) { 736 switch (vlan_get_protocol(skb)) {
731 case htons(ETH_P_IP): 737 case htons(ETH_P_IP):
732 l4_hdr = ip_hdr(skb)->protocol; 738 l4_hdr = ip_hdr(skb)->protocol;