[dpdk-dev] [PATCH v2 0/7] add mtu and flow control handlers

Ananyev, Konstantin konstantin.ananyev at intel.com
Tue Jun 17 10:57:03 CEST 2014


Hi David,

>>
>> 1)  [PATCH v2 3/7] ethdev: store min rx buffer size
>> @@ -879,6 +879,8 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
>>   		       const struct rte_eth_rxconf *rx_conf,
>>   		       struct rte_mempool *mp)
>>   {
>> ...
>> +	if (!ret) {
>> +		if (dev->data->min_rx_buf_size > mbp_buf_size)
>> +			dev->data->min_rx_buf_size = mbp_buf_size;
>> +	}
>> +
>> +	return ret;
>>
>> Where do you set the initial value of min_rx_buf_size?
>> Can't find it by some reason.

>Hum, actually, dev->data structure is supposed to be set to 0 at init 
>time or I missed something.

>I would say this happens once for the whole rte_eth_dev_data array in 
>rte_eth_dev_data_alloc() in primary process (first call to 
>rte_eth_dev_allocate()).

Yes, I understand that it will be initialised to 0 together with whole dev->data.
But then, the condition:
if (dev->data->min_rx_buf_size > mbp_buf_size)
would never be true, and  min_rx_buf_size would always remain 0?
I thought you need to initialise it with UINT32_MAX(or UINT16_MAX).
BTW, not big deal, but I think uint16_t is enough for min_rx_buf_size.

>>
>> 3)  if ((mtu < 68) || (frame_size > dev_info.max_rx_pktlen))
>> Can we add a new define for min allowable MTU (68) as it used in few places.

>RTE_IPV4_MIN_MTU then ?

Sounds good to me.

>I am not sure where this belongs, it could go in rte_ethdev.h.

Probably rte_ether.h?

Konstantin


More information about the dev mailing list