[v4,3/5] app/procinfo: add Rx buffer size to --show-port

Message ID 1599296854-56620-4-git-send-email-tangchengchang@huawei.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series add Rx buffer size for rxq info structure |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Chengchang Tang Sept. 5, 2020, 9:07 a.m. UTC
  Add Rx buffer size to show_port function to display it in the port PMD
information so that the user can get the buffer length used by HW queue
of receiving packets.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
---
 app/proc-info/main.c | 2 ++
 1 file changed, 2 insertions(+)

--
2.7.4
  

Comments

Stephen Hemminger Sept. 5, 2020, 4:59 p.m. UTC | #1
On Sat, 5 Sep 2020 17:07:32 +0800
Chengchang Tang <tangchengchang@huawei.com> wrote:

>  				printf("\t  -- queue %d rx scatter %d"
>  						" descriptors %d"
> +						" rx buffer size %d"
>  						" offloads 0x%"PRIx64
>  						" mempool socket %d\n",
>  						j,
>  						queue_info.scattered_rx,
>  						queue_info.nb_desc,
> +						queue_info.rx_buf_size,
>  						queue_info.conf.offloads,
>  						queue_info.mp->socket_id);
>  			}

These should be using %u and need space after " for PRIx64
Why not:
  				printf("\t  -- queue %u rx scatter %u"
  						" descriptors %u"
 						" rx buffer size %u"
  						" offloads %#" PRIx64
  						" mempool socket %d\n",
  
Chengchang Tang Sept. 7, 2020, 9:14 a.m. UTC | #2
On 2020/9/6 0:59, Stephen Hemminger wrote:
> On Sat, 5 Sep 2020 17:07:32 +0800
> Chengchang Tang <tangchengchang@huawei.com> wrote:
> 
>>  				printf("\t  -- queue %d rx scatter %d"
>>  						" descriptors %d"
>> +						" rx buffer size %d"
>>  						" offloads 0x%"PRIx64
>>  						" mempool socket %d\n",
>>  						j,
>>  						queue_info.scattered_rx,
>>  						queue_info.nb_desc,
>> +						queue_info.rx_buf_size,
>>  						queue_info.conf.offloads,
>>  						queue_info.mp->socket_id);
>>  			}
> 
> These should be using %u and need space after " for PRIx64
> Why not:
>   				printf("\t  -- queue %u rx scatter %u"
>   						" descriptors %u"
>  						" rx buffer size %u"
>   						" offloads %#" PRIx64
>   						" mempool socket %d\n",
> 

OK, I will fix these in next version.

Thanks
  
Stephen Hemminger Sept. 18, 2020, 10:11 p.m. UTC | #3
On Mon, 7 Sep 2020 17:14:48 +0800
Chengchang Tang <tangchengchang@huawei.com> wrote:

> On 2020/9/6 0:59, Stephen Hemminger wrote:
> > On Sat, 5 Sep 2020 17:07:32 +0800
> > Chengchang Tang <tangchengchang@huawei.com> wrote:
> >   
> >>  				printf("\t  -- queue %d rx scatter %d"
> >>  						" descriptors %d"
> >> +						" rx buffer size %d"
> >>  						" offloads 0x%"PRIx64
> >>  						" mempool socket %d\n",
> >>  						j,
> >>  						queue_info.scattered_rx,
> >>  						queue_info.nb_desc,
> >> +						queue_info.rx_buf_size,
> >>  						queue_info.conf.offloads,
> >>  						queue_info.mp->socket_id);
> >>  			}  
> > 
> > These should be using %u and need space after " for PRIx64
> > Why not:
> >   				printf("\t  -- queue %u rx scatter %u"
> >   						" descriptors %u"
> >  						" rx buffer size %u"
> >   						" offloads %#" PRIx64
> >   						" mempool socket %d\n",
> >   
> 
> OK, I will fix these in next version.
> 
> Thanks

NAK, these is superseded by.

Please look at the new improved procinfo still stuck in patchwork
https://patchwork.dpdk.org/patch/74960/

Let's put the buffer size there.
  
Chengchang Tang Sept. 21, 2020, 2:06 a.m. UTC | #4
Hi, All
These Patches improved procinfo was stuck in patchwork:
https://patchwork.dpdk.org/patch/74960/

These patches look good for me. Will these be applied?

I'm not sure what to do next. If these will be applied, I need modified
the code.

On 2020/9/19 6:11, Stephen Hemminger wrote:
> On Mon, 7 Sep 2020 17:14:48 +0800
> Chengchang Tang <tangchengchang@huawei.com> wrote:
> 
>> On 2020/9/6 0:59, Stephen Hemminger wrote:
>>> On Sat, 5 Sep 2020 17:07:32 +0800
>>> Chengchang Tang <tangchengchang@huawei.com> wrote:
>>>   
>>>>  				printf("\t  -- queue %d rx scatter %d"
>>>>  						" descriptors %d"
>>>> +						" rx buffer size %d"
>>>>  						" offloads 0x%"PRIx64
>>>>  						" mempool socket %d\n",
>>>>  						j,
>>>>  						queue_info.scattered_rx,
>>>>  						queue_info.nb_desc,
>>>> +						queue_info.rx_buf_size,
>>>>  						queue_info.conf.offloads,
>>>>  						queue_info.mp->socket_id);
>>>>  			}  
>>>
>>> These should be using %u and need space after " for PRIx64
>>> Why not:
>>>   				printf("\t  -- queue %u rx scatter %u"
>>>   						" descriptors %u"
>>>  						" rx buffer size %u"
>>>   						" offloads %#" PRIx64
>>>   						" mempool socket %d\n",
>>>   
>>
>> OK, I will fix these in next version.
>>
>> Thanks
> 
> NAK, these is superseded by.
> 
> Please look at the new improved procinfo still stuck in patchwork
> https://patchwork.dpdk.org/patch/74960/
> 
> Let's put the buffer size there.
> 
> .
>
  
Ferruh Yigit Sept. 21, 2020, 11:26 a.m. UTC | #5
On 9/21/2020 3:06 AM, Chengchang Tang wrote:
> Hi, All
> These Patches improved procinfo was stuck in patchwork:
> https://patchwork.dpdk.org/patch/74960/
> 
> These patches look good for me. Will these be applied?
> 
> I'm not sure what to do next. If these will be applied, I need modified
> the code.

Hi Chengchang,

I suggest don't hold your patches and send your next version on top of 
latest head of git repo, based on which patch applied first we can 
resolve the conflict accordingly.
  

Patch

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index abeca4a..e840dea 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -711,11 +711,13 @@  show_port(void)
 			if (ret == 0) {
 				printf("\t  -- queue %d rx scatter %d"
 						" descriptors %d"
+						" rx buffer size %d"
 						" offloads 0x%"PRIx64
 						" mempool socket %d\n",
 						j,
 						queue_info.scattered_rx,
 						queue_info.nb_desc,
+						queue_info.rx_buf_size,
 						queue_info.conf.offloads,
 						queue_info.mp->socket_id);
 			}