diff options
author | Gurucharan Shetty <gshetty@riverbed.com> | 2009-12-15 08:00:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-16 02:18:26 -0500 |
commit | ca553980432898da5d4125573a9e2aee6ed5d355 (patch) | |
tree | dcc0dea9d485bcaae0173ed430a49bed5d34f040 /drivers/net/ixgbe/ixgbe_main.c | |
parent | 734e979f25a74e0d7da4ae0498ecac644db6377d (diff) |
ixgbe: allow tx of pre-formatted vlan tagged packets
When the 82598 is fed 802.1q packets, it chokes with
an error of the form:
ixgbe: eth0: ixgbe_tx_csum: partial checksum but proto=81!
As the logic there was not smart enough to look into
the vlan header to pick out the encapsulated protocol.
There are times when we'd like to send these packets
out without having to configure a vlan on the interface.
Here we check for the vlan tag and allow the packet to
go out with the correct hardware checksum.
This patch is a clone of a previously submitted patch by
Arthur Jones <ajones@riverbed.com> for igb (Commit -
fa4a7ef36ec834fee1719636b30d2f28f4cb0166).
Signed-off-by: Gurucharan Shetty <gshetty@riverbed.com>
Signed-off-by: Arthur Jones <ajones@riverbed.com>
Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 529274824931..bd64387563f0 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -5006,7 +5006,18 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter, | |||
5006 | IXGBE_ADVTXD_DTYP_CTXT); | 5006 | IXGBE_ADVTXD_DTYP_CTXT); |
5007 | 5007 | ||
5008 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 5008 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
5009 | switch (skb->protocol) { | 5009 | __be16 protocol; |
5010 | |||
5011 | if (skb->protocol == cpu_to_be16(ETH_P_8021Q)) { | ||
5012 | const struct vlan_ethhdr *vhdr = | ||
5013 | (const struct vlan_ethhdr *)skb->data; | ||
5014 | |||
5015 | protocol = vhdr->h_vlan_encapsulated_proto; | ||
5016 | } else { | ||
5017 | protocol = skb->protocol; | ||
5018 | } | ||
5019 | |||
5020 | switch (protocol) { | ||
5010 | case cpu_to_be16(ETH_P_IP): | 5021 | case cpu_to_be16(ETH_P_IP): |
5011 | type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4; | 5022 | type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4; |
5012 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) | 5023 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) |