1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net
Song Yoong Siang 81d0885d68 net: stmmac: Fix overall budget calculation for rxtx_napi
tx_done is not used for napi_complete_done(). Thus, NAPI busy polling
mechanism by gro_flush_timeout and napi_defer_hard_irqs will not able
be triggered after a packet is transmitted when there is no receive
packet.

Fix this by taking the maximum value between tx_done and rx_done as
overall budget completed by the rxtx NAPI poll to ensure XDP Tx ZC
operation is continuously polling for next Tx frame. This gives
benefit of lower packet submission processing latency and jitter
under XDP Tx ZC mode.

Performance of tx-only using xdp-sock on Intel ADL-S platform is
the same with and without this patch.

root@intel-corei7-64:~# ./xdpsock -i enp0s30f4 -t -z -q 1 -n 10
 sock0@enp0s30f4:1 txonly xdp-drv
                   pps            pkts           10.00
rx                 0              0
tx                 511630         8659520

 sock0@enp0s30f4:1 txonly xdp-drv
                   pps            pkts           10.00
rx                 0              0
tx                 511625         13775808

 sock0@enp0s30f4:1 txonly xdp-drv
                   pps            pkts           10.00
rx                 0              0
tx                 511619         18892032

Fixes: 132c32ee5b ("net: stmmac: Add TX via XDP zero-copy socket")
Cc: <stable@vger.kernel.org> # 5.13.x
Co-developed-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-09-05 13:02:20 +01:00
..
appletalk make legacy ISA probe optional 2021-08-03 13:05:26 +01:00
arcnet
bonding bonding: improve nl error msg when device can't be enslaved because of IFF_MASTER 2021-08-16 14:03:30 +01:00
caif Networking fixes for 5.14-rc2, including fixes from bpf and netfilter. 2021-07-14 09:24:32 -07:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-26 17:57:57 -07:00
dsa net: dsa: b53: Set correct number of ports in the DSA struct 2021-09-02 13:32:24 +01:00
ethernet net: stmmac: Fix overall budget calculation for rxtx_napi 2021-09-05 13:02:20 +01:00
fddi fddi: switch from 'pci_' to 'dma_' API 2021-08-29 10:50:24 +01:00
fjes Tracing updates for 5.14: 2021-07-03 11:13:22 -07:00
hamradio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-19 18:09:18 -07:00
hippi hippi: use ndo_siocdevprivate 2021-07-27 20:11:44 +01:00
hyperv Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
ieee802154 ieee802154: hwsim: fix GPF in hwsim_new_edge_nl 2021-07-08 09:37:03 +02:00
ipa net: ipa: rename "ipa_clock.c" 2021-08-22 09:44:17 +01:00
ipvlan ipvlan: Add handling of NETDEV_UP events 2021-07-29 22:17:37 +01:00
mctp mctp: Add initial driver infrastructure 2021-07-29 15:06:50 +01:00
mdio net: mdio: mscc-miim: Make use of the helper function devm_platform_ioremap_resource() 2021-08-31 12:07:05 +01:00
netdevsim ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
pcs net: pcs: xpcs: Add Pause Mode support for SGMII and 2500BaseX 2021-08-16 11:03:22 +01:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-31 09:06:04 -07:00
plip slip/plip: use ndo_siocdevprivate 2021-07-27 20:11:44 +01:00
ppp bpf: Refactor BPF_PROG_RUN into a function 2021-08-17 00:45:07 +02:00
slip slip/plip: use ndo_siocdevprivate 2021-07-27 20:11:44 +01:00
team bpf: Refactor BPF_PROG_RUN into a function 2021-08-17 00:45:07 +02:00
usb net: usb: qmi_wwan: add Telit 0x1060 composition 2021-09-03 13:40:18 +01:00
vmxnet3 ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
wan wan: hostess_sv11: use module_init/module_exit helpers 2021-08-03 13:05:26 +01:00
wireguard wireguard: allowedips: free empty intermediate nodes when removing single node 2021-06-04 14:25:14 -07:00
wireless intel: switch from 'pci_' to 'dma_' API 2021-08-29 14:47:21 +03:00
wwan Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-26 17:57:57 -07:00
xen-netback xen-netback: take a reference to the RX task thread 2021-06-07 15:13:15 +02:00
bareudp.c bareudp: Fix invalid read beyond skb's linear data 2021-08-09 15:37:43 -07:00
dummy.c
eql.c eql: use ndo_siocdevprivate 2021-07-27 20:11:43 +01:00
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-04-26 12:00:00 -07:00
gtp.c gtp: reset mac_header after decap 2021-06-28 12:44:17 -07:00
ifb.c ifb: remove leading spaces before tabs 2021-05-20 15:10:57 -07:00
Kconfig net: Kconfig: remove obsolete reference to config MICROBLAZE_64K_PAGES 2021-08-13 16:30:35 -07:00
LICENSE.SRC
loopback.c
macsec.c net: macsec: fix the length used to copy the key for offloading 2021-06-24 12:41:12 -07:00
macvlan.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
macvtap.c
Makefile net: mhi: Remove MBIM protocol 2021-08-04 10:10:12 +01:00
mdio.c
mhi_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-26 17:57:57 -07:00
mii.c net: mii: make mii_ethtool_gset() return void 2021-08-19 13:06:53 +01:00
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c sb1000: use ndo_siocdevprivate 2021-07-27 20:11:44 +01:00
Space.c wan: remove sbni/granch driver 2021-08-03 13:05:26 +01:00
sungem_phy.c
tap.c
thunderbolt.c
tun.c ethtool: extend coalesce setting uAPI with CQE mode 2021-08-24 07:38:29 -07:00
veth.c veth: use skb_prepare_for_gro() 2021-07-29 12:18:12 +01:00
virtio_net.c virtio_net: reduce raw_smp_processor_id() calling in virtnet_xdp_get_sq 2021-08-29 10:53:45 +01:00
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-19 18:09:18 -07:00
vsockmon.c
vxlan.c vxlan: add missing rcu_read_lock() in neigh_reduce() 2021-06-22 09:48:38 -07:00
xen-netfront.c xen/netfront: don't trust the backend response data blindly 2021-08-25 10:43:21 +01:00