Message ID | 20230323054322.24938-1-doshir@vmware.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] vmxnet3: use gro callback when UPT is enabled | expand |
Context | Check | Description |
---|---|---|
netdev/series_format | success | Single patches do not need cover letters |
netdev/tree_selection | success | Clearly marked for net |
netdev/fixes_present | success | Fixes tag present in non-next series |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 32 this patch: 32 |
netdev/cc_maintainers | success | CCed 8 of 8 maintainers |
netdev/build_clang | success | Errors and warnings before: 18 this patch: 18 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/deprecated_api | success | None detected |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | Fixes tag looks correct |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 32 this patch: 32 |
netdev/checkpatch | warning | WARNING: line length of 99 exceeds 80 columns |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
On Wed, Mar 22, 2023 at 10:43:19PM -0700, Ronak Doshi wrote: > 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: stable@vger.kernel.org > Fixes: 6f91f4ba046e ("vmxnet3: add support for capability registers") > Signed-off-by: Ronak Doshi <doshir@vmware.com> > Acked-by: Guolin Yang <gyang@vmware.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> > --- > drivers/net/vmxnet3/vmxnet3_drv.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c > index 682987040ea8..8f7ac7d85afc 100644 > --- a/drivers/net/vmxnet3/vmxnet3_drv.c > +++ b/drivers/net/vmxnet3/vmxnet3_drv.c > @@ -1688,7 +1688,8 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq, > if (unlikely(rcd->ts)) > __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), rcd->tci); > > - if (adapter->netdev->features & NETIF_F_LRO) > + /* Use GRO callback if UPT is enabled */ > + if ((adapter->netdev->features & NETIF_F_LRO) && !rq->shared->updateRxProd) nit: this could be two lines, fitting into 80 columns > netif_receive_skb(skb); > else > napi_gro_receive(&rq->napi, skb); > -- > 2.11.0 >
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 682987040ea8..8f7ac7d85afc 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -1688,7 +1688,8 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq, if (unlikely(rcd->ts)) __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), rcd->tci); - if (adapter->netdev->features & NETIF_F_LRO) + /* Use GRO callback if UPT is enabled */ + if ((adapter->netdev->features & NETIF_F_LRO) && !rq->shared->updateRxProd) netif_receive_skb(skb); else napi_gro_receive(&rq->napi, skb);