diff mbox series

net/memif: fix missing Tx-bps stats for zero-copy

Message ID 20210412082231.1866235-1-tianyu.li@arm.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series net/memif: fix missing Tx-bps stats for zero-copy | expand

Checks

Context Check Description
ci/iol-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-abi-testing success Testing PASS
ci/github-robot success github build: passed
ci/travis-robot success travis build: passed
ci/checkpatch warning coding style issues

Commit Message

Tianyu Li April 12, 2021, 8:22 a.m. UTC
Fix the missing Tx-bps counter for memif zero-copy mode
Before
  Rx-pps:      6891450          Rx-bps:   3528438928
  Tx-pps:      6891482          Tx-bps:            0
After
  Throughput (since last show)
  Rx-pps:     11157056          Rx-bps:   5712413016
  Tx-pps:     11157056          Tx-bps:   5712413016

Fixes: 43b815d88188 ("net/memif: support zero-copy slave")
Cc: stable@dpdk.org

Signed-off-by: Tianyu Li <tianyu.li@arm.com>
---
 drivers/net/memif/rte_eth_memif.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ferruh Yigit April 14, 2021, 8:13 a.m. UTC | #1
On 4/12/2021 9:22 AM, Tianyu Li wrote:
> Fix the missing Tx-bps counter for memif zero-copy mode
> Before
>    Rx-pps:      6891450          Rx-bps:   3528438928
>    Tx-pps:      6891482          Tx-bps:            0
> After
>    Throughput (since last show)
>    Rx-pps:     11157056          Rx-bps:   5712413016
>    Tx-pps:     11157056          Tx-bps:   5712413016
> 
> Fixes: 43b815d88188 ("net/memif: support zero-copy slave")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tianyu Li <tianyu.li@arm.com>
> ---
>   drivers/net/memif/rte_eth_memif.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
> index 77c95bcb7..dd2825968 100644
> --- a/drivers/net/memif/rte_eth_memif.c
> +++ b/drivers/net/memif/rte_eth_memif.c
> @@ -706,6 +706,7 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
>   	/* populate descriptor */
>   	d0 = &ring->desc[slot & mask];
>   	d0->length = rte_pktmbuf_data_len(mbuf);
> +	mq->n_bytes += rte_pktmbuf_data_len(mbuf);
>   	/* FIXME: get region index */
>   	d0->region = 1;
>   	d0->offset = rte_pktmbuf_mtod(mbuf, uint8_t *) -
> 

Looks good to me, but let's wait Jakub's review for it.
Tianyu Li April 27, 2021, 6:30 a.m. UTC | #2
Hi Jakub,

Any comments about the patch?

-----Original Message-----
From: Ferruh Yigit <ferruh.yigit@intel.com> 
Sent: Wednesday, April 14, 2021 4:13 PM
To: Tianyu Li <Tianyu.Li@arm.com>; Jakub Grajciar <jgrajcia@cisco.com>
Cc: dev@dpdk.org; nd <nd@arm.com>; stable@dpdk.org
Subject: Re: [PATCH] net/memif: fix missing Tx-bps stats for zero-copy

On 4/12/2021 9:22 AM, Tianyu Li wrote:
> Fix the missing Tx-bps counter for memif zero-copy mode Before
>    Rx-pps:      6891450          Rx-bps:   3528438928
>    Tx-pps:      6891482          Tx-bps:            0
> After
>    Throughput (since last show)
>    Rx-pps:     11157056          Rx-bps:   5712413016
>    Tx-pps:     11157056          Tx-bps:   5712413016
> 
> Fixes: 43b815d88188 ("net/memif: support zero-copy slave")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tianyu Li <tianyu.li@arm.com>
> ---
>   drivers/net/memif/rte_eth_memif.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/memif/rte_eth_memif.c 
> b/drivers/net/memif/rte_eth_memif.c
> index 77c95bcb7..dd2825968 100644
> --- a/drivers/net/memif/rte_eth_memif.c
> +++ b/drivers/net/memif/rte_eth_memif.c
> @@ -706,6 +706,7 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
>   	/* populate descriptor */
>   	d0 = &ring->desc[slot & mask];
>   	d0->length = rte_pktmbuf_data_len(mbuf);
> +	mq->n_bytes += rte_pktmbuf_data_len(mbuf);
>   	/* FIXME: get region index */
>   	d0->region = 1;
>   	d0->offset = rte_pktmbuf_mtod(mbuf, uint8_t *) -
> 

Looks good to me, but let's wait Jakub's review for it.
Ferruh Yigit May 18, 2021, 12:08 p.m. UTC | #3
On 4/27/2021 7:30 AM, Tianyu Li wrote:
> Hi Jakub,
> 
> Any comments about the patch?
> 

+Damjan.

Hi Damjan,

Is Jakub still maintaining the net/memif?

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com> 
> Sent: Wednesday, April 14, 2021 4:13 PM
> To: Tianyu Li <Tianyu.Li@arm.com>; Jakub Grajciar <jgrajcia@cisco.com>
> Cc: dev@dpdk.org; nd <nd@arm.com>; stable@dpdk.org
> Subject: Re: [PATCH] net/memif: fix missing Tx-bps stats for zero-copy
> 
> On 4/12/2021 9:22 AM, Tianyu Li wrote:
>> Fix the missing Tx-bps counter for memif zero-copy mode Before
>>    Rx-pps:      6891450          Rx-bps:   3528438928
>>    Tx-pps:      6891482          Tx-bps:            0
>> After
>>    Throughput (since last show)
>>    Rx-pps:     11157056          Rx-bps:   5712413016
>>    Tx-pps:     11157056          Tx-bps:   5712413016
>>
>> Fixes: 43b815d88188 ("net/memif: support zero-copy slave")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Tianyu Li <tianyu.li@arm.com>
>> ---
>>   drivers/net/memif/rte_eth_memif.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/net/memif/rte_eth_memif.c 
>> b/drivers/net/memif/rte_eth_memif.c
>> index 77c95bcb7..dd2825968 100644
>> --- a/drivers/net/memif/rte_eth_memif.c
>> +++ b/drivers/net/memif/rte_eth_memif.c
>> @@ -706,6 +706,7 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
>>   	/* populate descriptor */
>>   	d0 = &ring->desc[slot & mask];
>>   	d0->length = rte_pktmbuf_data_len(mbuf);
>> +	mq->n_bytes += rte_pktmbuf_data_len(mbuf);
>>   	/* FIXME: get region index */
>>   	d0->region = 1;
>>   	d0->offset = rte_pktmbuf_mtod(mbuf, uint8_t *) -
>>
> 
> Looks good to me, but let's wait Jakub's review for it.
>
Hi,

Sorry for the inconvenience, the thread got filtered so I only found it in spam after Damjan notified me.

The patch looks good. Thanks for the fix!

Reviewd-By: Jakub Grajciar <jgrajcia@cisco.com>

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Tuesday, May 18, 2021 2:09 PM
> To: Tianyu Li <Tianyu.Li@arm.com>; Jakub Grajciar -X (jgrajcia - PANTHEON
> TECH SRO at Cisco) <jgrajcia@cisco.com>; Damjan Marion (damarion)
> <damarion@cisco.com>
> Cc: dev@dpdk.org; nd <nd@arm.com>; stable@dpdk.org
> Subject: Re: [PATCH] net/memif: fix missing Tx-bps stats for zero-copy
> 
> On 4/27/2021 7:30 AM, Tianyu Li wrote:
> > Hi Jakub,
> >
> > Any comments about the patch?
> >
> 
> +Damjan.
> 
> Hi Damjan,
> 
> Is Jakub still maintaining the net/memif?
> 
> > -----Original Message-----
> > From: Ferruh Yigit <ferruh.yigit@intel.com>
> > Sent: Wednesday, April 14, 2021 4:13 PM
> > To: Tianyu Li <Tianyu.Li@arm.com>; Jakub Grajciar <jgrajcia@cisco.com>
> > Cc: dev@dpdk.org; nd <nd@arm.com>; stable@dpdk.org
> > Subject: Re: [PATCH] net/memif: fix missing Tx-bps stats for zero-copy
> >
> > On 4/12/2021 9:22 AM, Tianyu Li wrote:
> >> Fix the missing Tx-bps counter for memif zero-copy mode Before
> >>    Rx-pps:      6891450          Rx-bps:   3528438928
> >>    Tx-pps:      6891482          Tx-bps:            0
> >> After
> >>    Throughput (since last show)
> >>    Rx-pps:     11157056          Rx-bps:   5712413016
> >>    Tx-pps:     11157056          Tx-bps:   5712413016
> >>
> >> Fixes: 43b815d88188 ("net/memif: support zero-copy slave")
> >> Cc: stable@dpdk.org
> >>
> >> Signed-off-by: Tianyu Li <tianyu.li@arm.com>
> >> ---
> >>   drivers/net/memif/rte_eth_memif.c | 1 +
> >>   1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/net/memif/rte_eth_memif.c
> >> b/drivers/net/memif/rte_eth_memif.c
> >> index 77c95bcb7..dd2825968 100644
> >> --- a/drivers/net/memif/rte_eth_memif.c
> >> +++ b/drivers/net/memif/rte_eth_memif.c
> >> @@ -706,6 +706,7 @@ memif_tx_one_zc(struct pmd_process_private
> *proc_private, struct memif_queue *mq
> >>   	/* populate descriptor */
> >>   	d0 = &ring->desc[slot & mask];
> >>   	d0->length = rte_pktmbuf_data_len(mbuf);
> >> +	mq->n_bytes += rte_pktmbuf_data_len(mbuf);
> >>   	/* FIXME: get region index */
> >>   	d0->region = 1;
> >>   	d0->offset = rte_pktmbuf_mtod(mbuf, uint8_t *) -
> >>
> >
> > Looks good to me, but let's wait Jakub's review for it.
> >
Ferruh Yigit May 19, 2021, 7:57 a.m. UTC | #5
On 4/12/2021 9:22 AM, Tianyu Li wrote:
> Fix the missing Tx-bps counter for memif zero-copy mode
> Before
>   Rx-pps:      6891450          Rx-bps:   3528438928
>   Tx-pps:      6891482          Tx-bps:            0
> After
>   Throughput (since last show)
>   Rx-pps:     11157056          Rx-bps:   5712413016
>   Tx-pps:     11157056          Tx-bps:   5712413016
> 
> Fixes: 43b815d88188 ("net/memif: support zero-copy slave")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tianyu Li <tianyu.li@arm.com>

Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>

Applied to dpdk-next-net/main, thanks.
diff mbox series

Patch

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 77c95bcb7..dd2825968 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -706,6 +706,7 @@  memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq
 	/* populate descriptor */
 	d0 = &ring->desc[slot & mask];
 	d0->length = rte_pktmbuf_data_len(mbuf);
+	mq->n_bytes += rte_pktmbuf_data_len(mbuf);
 	/* FIXME: get region index */
 	d0->region = 1;
 	d0->offset = rte_pktmbuf_mtod(mbuf, uint8_t *) -