summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpaa2/dpni.h
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2020-07-21 19:38:24 +0300
committerDavid S. Miller <davem@davemloft.net>2020-07-21 16:24:04 -0700
commit39344a89623d77ffa4cf9354d85fd6e58467bb87 (patch)
treee1803f58424092d2b150fbb173a53a2fafaeeedc /drivers/net/ethernet/freescale/dpaa2/dpni.h
parente3ec13be571b9da61011bf41ef097fe9bbbc3041 (diff)
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.h16
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 */