diff options
author | ajit.khaparde@broadcom.com <ajit.khaparde@broadcom.com> | 2016-02-23 00:35:01 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-24 15:25:19 -0500 |
commit | 127bfce54197a6cd43205b7ba950547918128053 (patch) | |
tree | d3a9d7a14a39b8429f1e3d5140b0e0a9f93e0981 /drivers/net/ethernet/emulex/benet/be.h | |
parent | b0fd2eb28bd47e0c906e31dbaccaf17883e238ff (diff) | |
download | op-kernel-dev-127bfce54197a6cd43205b7ba950547918128053.zip op-kernel-dev-127bfce54197a6cd43205b7ba950547918128053.tar.gz |
be2net: Fix a UE caused by passing large frames to the ASIC
In QnQ configurations like Flex-10 where the VLANs are inserted by the
ASIC, on rare occasions the HW is encountering a scenario where the
final frame length ends to be greater than what the ASIC can support.
This is because when the TXULP pulls the TX WRB to check the length
of the frame to be transmitted it also adds the size of VLANs to be
inserted by the HW to the length of the frame indicated in the WRB,
which in some cases fails the range check. This causes a UE.
Avoid this by trimming the skb length to accommodate the VLAN insertion.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be.h')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 756f25b..ee584c5 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -72,6 +72,9 @@ #define BE_MAX_MTU (BE_MAX_JUMBO_FRAME_SIZE - \ (ETH_HLEN + ETH_FCS_LEN)) +/* Accommodate for QnQ configurations where VLAN insertion is enabled in HW */ +#define BE_MAX_GSO_SIZE (65535 - 2 * VLAN_HLEN) + #define BE_NUM_VLANS_SUPPORTED 64 #define BE_MAX_EQD 128u #define BE_MAX_TX_FRAG_COUNT 30 |