[dpdk-dev] net/i40e: add more explanation for QoS APIs

Message ID 1492071678-68859-1-git-send-email-wenzhuo.lu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Wenzhuo Lu April 13, 2017, 8:21 a.m. UTC
  According to HW implementation, the bandwidth of QoS
means the L2 bandwidth, not count the bytes added by
physical layer.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.h | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Ferruh Yigit April 13, 2017, 10:25 a.m. UTC | #1
On 4/13/2017 9:21 AM, Wenzhuo Lu wrote:
> According to HW implementation, the bandwidth of QoS
> means the L2 bandwidth, not count the bytes added by
> physical layer.
> 
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Applied to dpdk-next-net/master, thanks.
  
Pei, Yulong April 14, 2017, 3:07 a.m. UTC | #2
testpmd> set vf tx max-bandwidth (port_id) (vf_id) (bandwidth)

bandwidth(Mbps)

I think that  Mbps usually  refer to physical layers.

Bet Regards
Yulong Pei

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit

Sent: Thursday, April 13, 2017 6:26 PM
To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/i40e: add more explanation for QoS APIs

On 4/13/2017 9:21 AM, Wenzhuo Lu wrote:
> According to HW implementation, the bandwidth of QoS means the L2 

> bandwidth, not count the bytes added by physical layer.

> 

> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>


Applied to dpdk-next-net/master, thanks.
  
Wenzhuo Lu April 14, 2017, 4:50 a.m. UTC | #3
Hi Yulong,

> -----Original Message-----

> From: Pei, Yulong

> Sent: Friday, April 14, 2017 11:07 AM

> To: Yigit, Ferruh; Lu, Wenzhuo; dev@dpdk.org

> Subject: RE: [dpdk-dev] [PATCH] net/i40e: add more explanation for QoS APIs

> 

> testpmd> set vf tx max-bandwidth (port_id) (vf_id) (bandwidth)

> 

> bandwidth(Mbps)

> 

> I think that  Mbps usually  refer to physical layers.

When we talk about 10G port, this 10G means physical layer bandwidth. So your concern is reasonable. 
I'll change the "max-bandwidth" to "l2-max-bandwidth".
  

Patch

diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
index 8e15630..22a5c64 100644
--- a/drivers/net/i40e/rte_pmd_i40e.h
+++ b/drivers/net/i40e/rte_pmd_i40e.h
@@ -386,6 +386,9 @@  int rte_pmd_i40e_reset_vf_stats(uint8_t port,
  *    ID specifying VF.
  * @param bw
  *    Bandwidth for this VF.
+ *    The value should be an absolute bandwidth in Mbps.
+ *    The bandwidth is a L2 bandwidth counting the bytes of ethernet packets.
+ *    Not count the bytes added by physical layer.
  * @return
  *   - (0) if successful.
  *   - (-ENODEV) if *port* invalid.
@@ -433,6 +436,9 @@  int rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port,
  *    Number specifying TC.
  * @param bw
  *    Max bandwidth for this TC.
+ *    The value should be an absolute bandwidth in Mbps.
+ *    The bandwidth is a L2 bandwidth counting the bytes of ethernet packets.
+ *    Not count the bytes added by physical layer.
  * @return
  *   - (0) if successful.
  *   - (-ENODEV) if *port* invalid.