RE: Fwd: QOS sample example.

2022-03-31 Thread Singh, Jasvinder


> -Original Message-
> From: Thomas Monjalon 
> Sent: Thursday, March 31, 2022 8:39 PM
> To: satish amara 
> Cc: users@dpdk.org; Singh, Jasvinder ;
> Dumitrescu, Cristian 
> Subject: Re: Fwd: QOS sample example.
> 
> +Cc QoS scheduler maintainers (see file MAINTAINERS)
> 
> 31/03/2022 18:59, satish amara:
> > Hi,
> > I am trying to understand the QOS sample scheduler application code.
> > Trying to understand what is tc_period in the config.
> > 30. QoS Scheduler Sample Application — Data Plane Development Kit
> > 21.05.0 documentation (dpdk.org)
> >  21.05/sample_app_ug/qos_scheduler.html>
> > Is tc_period same as  tb_period tb_period Bytes Time period that
> > should elapse since the last credit update in order for the bucket to
> > be awarded tb_credits_per_period worth or credits.
> > Regards,
> > Satish Amara
> >

tc_period and tb_period are different. TC period is related to pipe tc rate 
limiting mechanism while tb period relates to traffic shaping mechanism (token 
bucket) implemented at pipe level.  tc_period represents the time interval to 
compute pipe TC credits (bytes). In each interval (tc_period value), credits 
are initialised to a fixed value. It is configurable parameter and should be 
carefully selected to avoid deadlock situation which arises when number of pipe 
TC credits (computed using tc_period) is smaller than the MTU. Please refer  
https://doc.dpdk.org/guides/prog_guide/qos_framework.html for more details.


Re: Fwd: QOS sample example.

2022-03-31 Thread satish amara
Thanks, Thomas for forwarding this to the group.
I have one more question. Does DPDK QOS  uses any internal threads/timers
for the token bucket implementation?. The token
 buckets can be implemented in different ways.  When are the tokens are
filled, I see there is tb_period?
It looks like the tokens are filled when the HQOS thread is trying to find
the next active pipe?

Regards,
Satish Amara






On Thu, Mar 31, 2022 at 3:39 PM Thomas Monjalon  wrote:

> +Cc QoS scheduler maintainers (see file MAINTAINERS)
>
> 31/03/2022 18:59, satish amara:
> > Hi,
> > I am trying to understand the QOS sample scheduler application code.
> > Trying to understand what is tc_period in the config.
> > 30. QoS Scheduler Sample Application — Data Plane Development Kit 21.05.0
> > documentation (dpdk.org)
> >  Is
> > tc_period same as  tb_period
> > tb_period Bytes Time period that should elapse since the last credit
> update
> > in order for the bucket to be awarded tb_credits_per_period worth or
> > credits.
> > Regards,
> > Satish Amara
> >
>
>
>
>
>
>


Re: Fwd: QOS sample example.

2022-03-31 Thread Thomas Monjalon
+Cc QoS scheduler maintainers (see file MAINTAINERS)

31/03/2022 18:59, satish amara:
> Hi,
> I am trying to understand the QOS sample scheduler application code.
> Trying to understand what is tc_period in the config.
> 30. QoS Scheduler Sample Application — Data Plane Development Kit 21.05.0
> documentation (dpdk.org)
>  Is
> tc_period same as  tb_period
> tb_period Bytes Time period that should elapse since the last credit update
> in order for the bucket to be awarded tb_credits_per_period worth or
> credits.
> Regards,
> Satish Amara
> 







Fwd: QOS sample example.

2022-03-31 Thread satish amara
Hi,
I am trying to understand the QOS sample scheduler application code.
Trying to understand what is tc_period in the config.
30. QoS Scheduler Sample Application — Data Plane Development Kit 21.05.0
documentation (dpdk.org)
 Is
tc_period same as  tb_period
tb_period Bytes Time period that should elapse since the last credit update
in order for the bucket to be awarded tb_credits_per_period worth or
credits.
Regards,
Satish Amara


sriov net_mlx5 error - Unexpected error in DR drop action support detection

2022-03-31 Thread Yaron Illouz
Hi

I am using dpd19.11 and having error when trying to use sriov vf of a mlx5 100G 
card
net_mlx5: Unexpected error in DR drop action support detection

The same code work for pf
I am not trying to do filtering on nic, but just to read from the port, 1 rx 
queue, 1 tx queue



Network devices using kernel driver
===
:0b:00.0 'MT27800 Family [ConnectX-5 Virtual Function] 1018' if=ens192 
drv=mlx5_core unused=igb_uio
:13:00.0 'VMXNET3 Ethernet Controller 07b0' if=ens224 drv=vmxnet3 
unused=igb_uio *Active*
:1b:00.0 'VMXNET3 Ethernet Controller 07b0' if=ens256 drv=vmxnet3 
unused=igb_uio *Active*

ethtool -i ens192
driver: mlx5_core
version: 5.0-0
firmware-version: 16.29.1016 (HPE09)
expansion-rom-version:
bus-info: :0b:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: yes

Here is a part of the initialization code
struct rte_eth_conf port_conf;
memset(_conf, 0, sizeof(port_conf));
port_conf.link_speeds = ETH_LINK_SPEED_AUTONEG;
port_conf.rxmode.mq_mode = (pi_nNumRxQueues > 1 ? ETH_MQ_RX_RSS 
: ETH_MQ_RX_NONE);
port_conf.rxmode.max_rx_pkt_len = nMaxPacketLen; //only used 
with jumbo_frame.   For now, only allow packets which fit in mbufs
port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
  //Jumbo Frame Support enabled
if(pi_sDriverName != "net_ixgbe_vf")//if not sriov
port_conf.rxmode.offloads |= 
DEV_RX_OFFLOAD_KEEP_CRC;  //Don't strip CRC
port_conf.rxmode.offloads &= pi_devInfo.rx_offload_capa;  
//turn off unsupported offloads
port_conf.rx_adv_conf.rss_conf.rss_key = NULL; //use default 
RSS key
port_conf.rx_adv_conf.rss_conf.rss_hf = (pi_nNumRxQueues > 1) ? 
GetRSSTypes(pi_sDriverName) : 0;
port_conf.fdir_conf.mode = RTE_FDIR_MODE_NONE; //flow director 
off
port_conf.intr_conf.lsc = bLSC ? 1 : 0; //enable link status 
change interrupt. Without this

int ret = rte_eth_dev_configure(pi_nPort, nRxQueues, nTxQueues, 
_conf);
if (ret < 0)
//failure

//Set MTU - needed for some NICs (at least mlx5 and vmxnet3) to 
receive jumbo packets
ret = rte_eth_dev_set_mtu(pi_nPort, nMaxPacketLen);
if (ret < 0)
//failure


struct rte_eth_rxconf rx_conf;
memset(_conf, 0, sizeof(rx_conf));
rx_conf.rx_thresh.pthresh = 
DPDK_NIC_RX_PTHRESH; //ring prefetch threshold
rx_conf.rx_thresh.hthresh = 
DPDK_NIC_RX_HTHRESH; //ring host threshold
rx_conf.rx_thresh.wthresh = 
DPDK_NIC_RX_WTHRESH; //ring writeback threshold
rx_conf.rx_free_thresh = 
DPDK_NIC_RX_FREE_THRESH;
for(RU32 nQueue = 0; nQueue

rte_eth_tx_burst return zero occasionally

2022-03-31 Thread Hong Christian
Hi DPDK users,


I met a dpdk tx issue with dpdk v19.11.10.

I use INTEL XXV710 25G NIC, two ports.

My app use pipeline mode, setup 1 rx and 6 tx queue for each ports,  rx/tx desc 
4096, share one pkt pool. Traffic is 18Gbps/300Wpps, so each port will have 9G 
rx and 9G tx.

Everything works fine at the beginning 1~2 hours. Then rte_eth_tx_burst starts 
to return 0 in a while. I add prints, and it shows the tx desc is not freed in 
that time:

"i40e_xmit_fixed_burst_vec_avx2(): avx:tx_free_thresh 512 tx_rs_thresh 32, 
nb_tx_free 0"

Since I do not have re-send action, once the issue occurs, thousands of pkts 
dropped due to tx failed. And then it will go back to normal since desc is 
released.

Does any one met the same issue before ? could you please give any suggestions 
? Thank you so much!

Br,
Christian