Commit 8227e990 authored by Suresh Reddy's avatar Suresh Reddy Committed by David S. Miller

be2net: pad skb to meet minimum TX pkt size in BE3

On BE3 chips in SRIOV configs, the TX path stalls when a packet less
than 32B is received from the host. A workaround to pad such packets
already exists for the Skyhawk and Lancer chips. Use the same workaround
for BE3 chips too.
Signed-off-by: default avatarSuresh Reddy <suresh.reddy@avagotech.com>
Signed-off-by: default avatarSathya Perla <sathya.perla@avagotech.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c884567
...@@ -1123,11 +1123,12 @@ static struct sk_buff *be_xmit_workarounds(struct be_adapter *adapter, ...@@ -1123,11 +1123,12 @@ static struct sk_buff *be_xmit_workarounds(struct be_adapter *adapter,
struct sk_buff *skb, struct sk_buff *skb,
struct be_wrb_params *wrb_params) struct be_wrb_params *wrb_params)
{ {
/* Lancer, SH-R ASICs have a bug wherein Packets that are 32 bytes or /* Lancer, SH and BE3 in SRIOV mode have a bug wherein
* less may cause a transmit stall on that port. So the work-around is * packets that are 32b or less may cause a transmit stall
* to pad short packets (<= 32 bytes) to a 36-byte length. * on that port. The workaround is to pad such packets
* (len <= 32 bytes) to a minimum length of 36b.
*/ */
if (unlikely(!BEx_chip(adapter) && skb->len <= 32)) { if (skb->len <= 32) {
if (skb_put_padto(skb, 36)) if (skb_put_padto(skb, 36))
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment