Skip to content

Commit 3bced31

Browse files
Ronak Doshikuba-moo
authored andcommitted
vmxnet3: use gro callback when UPT is enabled
Currently, vmxnet3 uses GRO callback only if LRO is disabled. However, on smartNic based setups where UPT is supported, LRO can be enabled from guest VM but UPT devicve does not support LRO as of now. In such cases, there can be performance degradation as GRO is not being done. This patch fixes this issue by calling GRO API when UPT is enabled. We use updateRxProd to determine if UPT mode is active or not. To clarify few things discussed over the thread: The patch is not neglecting any feature bits nor disabling GRO. It uses GRO callback when UPT is active as LRO is not available in UPT. GRO callback cannot be used as default for all cases as it degrades performance for non-UPT cases or for cases when LRO is already done in ESXi. Cc: [email protected] Fixes: 6f91f4b ("vmxnet3: add support for capability registers") Signed-off-by: Ronak Doshi <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b93eb56 commit 3bced31

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/vmxnet3/vmxnet3_drv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,9 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
16881688
if (unlikely(rcd->ts))
16891689
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), rcd->tci);
16901690

1691-
if (adapter->netdev->features & NETIF_F_LRO)
1691+
/* Use GRO callback if UPT is enabled */
1692+
if ((adapter->netdev->features & NETIF_F_LRO) &&
1693+
!rq->shared->updateRxProd)
16921694
netif_receive_skb(skb);
16931695
else
16941696
napi_gro_receive(&rq->napi, skb);

0 commit comments

Comments
 (0)