1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net
Przemyslaw Patynowski ec60d54cb9 iavf: Fix max_rate limiting
Fix max_rate option in TC, check for proper quanta boundaries.
Check for minimum value provided and if it fits expected 50Mbps
quanta.

Without this patch, iavf could send settings for max_rate limiting
that would be accepted from by PF even the max_rate option is less
than expected 50Mbps quanta. It results in no rate limiting
on traffic as rate limiting will be floored to 0.

Example:
tc qdisc add dev $vf root mqprio num_tc 3 map 0 2 1 queues \
2@0 2@2 2@4 hw 1 mode channel shaper bw_rlimit \
max_rate 50Mbps 500Mbps 500Mbps

Should limit TC0 to circa 50 Mbps

tc qdisc add dev $vf root mqprio num_tc 3 map 0 2 1 queues \
2@0 2@2 2@4 hw 1 mode channel shaper bw_rlimit \
max_rate 0Mbps 100Kbit 500Mbps

Should return error

Fixes: d5b33d0244 ("i40evf: add ndo_setup_tc callback to i40evf")
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Jun Zhang <xuejun.zhang@intel.com>
Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2022-07-29 08:45:31 -07:00
..
appletalk net: appletalk: remove Apple/Farallon LocalTalk PC support 2022-05-11 13:08:38 +01:00
arcnet
bonding net: bonding: fix use-after-free after 802.3ad slave unbind 2022-06-29 20:52:40 -07:00
caif caif_virtio: fix race between virtio_device_ready() and ndo_open() 2022-06-27 08:04:30 -04:00
can can: rcar_canfd: Add missing of_node_put() in rcar_canfd_probe() 2022-07-20 10:20:19 +02:00
dsa net: dsa: vitesse-vsc73xx: silent spi_device_id warnings 2022-07-19 12:20:40 +02:00
ethernet iavf: Fix max_rate limiting 2022-07-29 08:45:31 -07:00
fddi net: fddi: skfp: smt: Remove extra parameters to vararg macro 2022-05-22 23:05:56 +01:00
fjes
hamradio hamradio: 6pack: fix array-index-out-of-bounds in decode_std_command() 2022-06-17 11:39:46 +01:00
hippi drivers: net: hippi: Fix deadlock in rr_close() 2022-04-21 10:30:45 +02:00
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-23 21:19:17 -07:00
ieee802154 Stefan Schmidt says: 2022-05-02 13:57:56 -07:00
ipa net: ipa: Fix typo 'the the' in comment 2022-07-25 10:52:28 +01:00
ipvlan net: add netif_inherit_tso_max() 2022-05-06 12:07:56 +01:00
mctp mctp i2c: correct mctp_i2c_header_create result 2022-04-01 12:04:15 +01:00
mdio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-05 13:03:18 -07:00
netdevsim netdevsim: fib: Add debugfs knob to simulate route deletion failure 2022-07-29 12:21:02 +01:00
pcs net: pcs: xpcs: propagate xpcs_read error to xpcs_get_state_c37_sgmii 2022-07-21 19:01:16 -07:00
phy net: sfp: fix memory leak in sfp_probe() 2022-06-30 11:38:16 +02:00
plip slip/plip: Use netif_rx(). 2022-03-06 11:05:31 +00:00
ppp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-19 11:23:59 -07:00
slip drivers: net: slip: fix NPD bug in sl_tx_timeout() 2022-04-06 23:00:16 -07:00
team
usb r8152: fix a WOL issue 2022-07-19 17:10:56 -07:00
vmxnet3 net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup() 2022-05-17 12:03:52 +02:00
vxlan net: vxlan: Fix kernel coding style 2022-05-20 17:38:27 -07:00
wan net: wan: switch to netif_napi_add_weight() 2022-05-08 11:33:57 +01:00
wireguard wireguard: device: check for metadata_dst with skb_valid_dst() 2022-04-22 15:59:05 -07:00
wireless wifi: mac80211: add gfp_t parameter to ieeee80211_obss_color_collision_notify 2022-06-29 11:43:15 +02:00
wwan wwan: iosm: use a flexible array rather than allocate short objects 2022-05-20 17:56:50 -07:00
xen-netback xen/netback: avoid entering xenvif_rx_next_skb() with an empty rx queue 2022-07-14 10:12:12 -07:00
amt.c amt: do not use amt->nr_tunnels outside of lock 2022-07-19 12:37:02 +02:00
bareudp.c bareudp: use ipv6_mod_enabled to check if IPv6 enabled 2022-03-16 19:16:57 -07:00
dummy.c
eql.c net: eql: Use kzalloc instead of kmalloc/memset 2022-04-21 14:40:21 +02:00
geneve.c geneve: avoid indirect calls in GRO path, when possible 2022-04-15 10:52:29 +01:00
gtp.c gtp: Fix inconsistent indenting 2022-03-16 08:47:02 -07:00
ifb.c
Kconfig wireguard: Kconfig: select CRYPTO_CHACHA_S390 2022-07-06 20:04:06 -07:00
LICENSE.SRC
loopback.c net: loopback: enable BIG TCP packets 2022-05-16 10:18:56 +01:00
macsec.c net: macsec: fix potential resource leak in macsec_add_rxsa() and macsec_add_txsa() 2022-07-25 11:51:05 +01:00
macvlan.c rtnetlink: add extack support in fdb del handlers 2022-05-09 11:58:20 +01:00
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c net: add per-cpu storage and net->core_stats 2022-03-11 23:17:24 -08:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c eth: amd: remove NI6510 support (ni65) 2022-05-11 13:09:59 +01:00
sungem_phy.c net: sungem_phy: Add of_node_put() for reference returned by of_get_parent() 2022-07-21 19:04:19 -07:00
tap.c net: tap: track dropped skb via kfree_skb_reason() 2022-03-06 11:04:01 +00:00
thunderbolt.c
tun.c net: tun: avoid disabling NAPI twice 2022-06-30 11:34:10 -07:00
veth.c veth: Add updating of trans_start 2022-06-17 11:38:09 +01:00
virtio_net.c virtio-net: fix the race between refill work and close 2022-07-27 13:20:44 +01:00
vrf.c vrf: fix packet sniffing for traffic originating from ip tunnels 2022-04-01 11:56:55 +01:00
vsockmon.c
xen-netfront.c xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() 2022-07-01 10:01:23 +02:00