bnx2x: Do not allow enabling LRO if disable_tpa=1
Bug fix: Do not allow enabling LRO if disable_tpa=1. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f1e1a199f3
commit
d43a7e67ae
@@ -9968,12 +9968,14 @@ static int bnx2x_set_flags(struct net_device *dev, u32 data)
|
|||||||
|
|
||||||
/* TPA requires Rx CSUM offloading */
|
/* TPA requires Rx CSUM offloading */
|
||||||
if ((data & ETH_FLAG_LRO) && bp->rx_csum) {
|
if ((data & ETH_FLAG_LRO) && bp->rx_csum) {
|
||||||
if (!(dev->features & NETIF_F_LRO)) {
|
if (!disable_tpa) {
|
||||||
dev->features |= NETIF_F_LRO;
|
if (!(dev->features & NETIF_F_LRO)) {
|
||||||
bp->flags |= TPA_ENABLE_FLAG;
|
dev->features |= NETIF_F_LRO;
|
||||||
changed = 1;
|
bp->flags |= TPA_ENABLE_FLAG;
|
||||||
}
|
changed = 1;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
rc = -EINVAL;
|
||||||
} else if (dev->features & NETIF_F_LRO) {
|
} else if (dev->features & NETIF_F_LRO) {
|
||||||
dev->features &= ~NETIF_F_LRO;
|
dev->features &= ~NETIF_F_LRO;
|
||||||
bp->flags &= ~TPA_ENABLE_FLAG;
|
bp->flags &= ~TPA_ENABLE_FLAG;
|
||||||
|
Reference in New Issue
Block a user