diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2020-07-21 18:38:24 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-22 01:24:04 +0200 |
commit | 39344a89623d77ffa4cf9354d85fd6e58467bb87 (patch) | |
tree | e1803f58424092d2b150fbb173a53a2fafaeeedc /drivers/net/ethernet/freescale/dpaa2/dpni.h | |
parent | dpaa2-eth: move the mqprio setup into a separate function (diff) | |
download | linux-39344a89623d77ffa4cf9354d85fd6e58467bb87.tar.xz linux-39344a89623d77ffa4cf9354d85fd6e58467bb87.zip |
dpaa2-eth: add API for Tx shaping
Add the necessary API (dpni_set_tx_shaping) for configuring the rate and
burst size of a per port shaper in DPAA2.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa2/dpni.h')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpni.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpni.h b/drivers/net/ethernet/freescale/dpaa2/dpni.h index e874d8084142..39387991a1f9 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpni.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpni.h @@ -1062,5 +1062,21 @@ int dpni_get_api_version(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 *major_ver, u16 *minor_ver); +/** + * struct dpni_tx_shaping - Structure representing DPNI tx shaping configuration + * @rate_limit: Rate in Mbps + * @max_burst_size: Burst size in bytes (up to 64KB) + */ +struct dpni_tx_shaping_cfg { + u32 rate_limit; + u16 max_burst_size; +}; + +int dpni_set_tx_shaping(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + const struct dpni_tx_shaping_cfg *tx_cr_shaper, + const struct dpni_tx_shaping_cfg *tx_er_shaper, + int coupled); #endif /* __FSL_DPNI_H */ |