diff options
author | Mark Starovoytov <mstarovoitov@marvell.com> | 2020-05-22 11:19:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-22 14:08:28 -0700 |
commit | 7327699f35f8e90b32c03080b5cba4e9aa95e087 (patch) | |
tree | 8e18469819df2e1181a574e9593c086980a26330 /drivers/net/ethernet/aquantia/atlantic/aq_hw.h | |
parent | b9e989262a3e2e9b795361a7e7978d64851eb98f (diff) | |
download | linux-stable-7327699f35f8e90b32c03080b5cba4e9aa95e087.tar.gz linux-stable-7327699f35f8e90b32c03080b5cba4e9aa95e087.tar.bz2 linux-stable-7327699f35f8e90b32c03080b5cba4e9aa95e087.zip |
net: atlantic: QoS implementation: max_rate
This patch adds initial support for mqprio rate limiters (max_rate only).
Atlantic HW supports Rate-Shaping for time-sensitive traffic at per
Traffic Class (TC) granularity.
Target rate is defined by:
* nominal link rate (always 10G);
* rate factor (ratio between nominal rate and max allowed).
Signed-off-by: Mark Starovoytov <mstarovoitov@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic/aq_hw.h')
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h index 1dccaaee04b3..d31e576f8b86 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h +++ b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h @@ -35,6 +35,9 @@ enum aq_tc_mode { (AQ_RX_LAST_LOC_FVLANID - AQ_RX_FIRST_LOC_FVLANID + 1U) #define AQ_RX_QUEUE_NOT_ASSIGNED 0xFFU +/* Used for rate to Mbps conversion */ +#define AQ_MBPS_DIVISOR 125000 /* 1000000 / 8 */ + /* NIC H/W capabilities */ struct aq_hw_caps_s { u64 hw_features; |