OSDN Git Service

net/mlx5: Packet pacing enhancement
authorBodong Wang <bodong@mellanox.com>
Mon, 19 Mar 2018 13:10:29 +0000 (15:10 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 19 Mar 2018 17:54:41 +0000 (11:54 -0600)
commit05d3ac978ed25b753bfe34fe76c50c31ee506a82
tree767fd0b81ca9dc51de9971b12662c23c98483a11
parentdf7e40425813c50cd252e6f5e348a81ef1acae56
net/mlx5: Packet pacing enhancement

Add two new parameters: max_burst_sz and typical_pkt_size (both
in bytes) to rate limit configurations.

max_burst_sz: The device will schedule bursts of packets for an
SQ connected to this rate, smaller than or equal to this value.
Value 0x0 indicates packet bursts will be limited to the device
defaults. This field should be used if bursts of packets must be
strictly kept under a certain value.

typical_pkt_size: When the rate limit is intended for a stream of
similar packets, stating the typical packet size can improve the
accuracy of the rate limiter. The expected packet size will be
the same for all SQs associated with the same rate limit index.

Ethernet driver is updated according to this change, but these two
parameters will be kept as 0 due to lacking of proper way to get the
configurations from user space which requires to change
ndo_set_tx_maxrate interface.

Signed-off-by: Bodong Wang <bodong@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/rl.c
include/linux/mlx5/driver.h
include/linux/mlx5/mlx5_ifc.h