[v2] net/virtio: fixed missing next flag when sending packets in packed mode

Message ID 20231010020828.2128-1-liufengjiang.0426@bytedance.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series [v2] net/virtio: fixed missing next flag when sending packets in packed mode |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS

Commit Message

Fengjiang Liu Oct. 10, 2023, 2:08 a.m. UTC
  When the packets is sent in packed mode, and the packets data and
virtio-header are divided into two desc, set the next flag of
virtio-header desc

>> Fix the warning that a single line of commit log exceeds 75 chars

Bugzilla ID: 1295
Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues")

Signed-off-by: liufengjiang.0426 <liufengjiang.0426@bytedance.com>
---
 drivers/net/virtio/virtqueue.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Maxime Coquelin Oct. 10, 2023, 7:12 a.m. UTC | #1
Addressed
Hi,

Thanks for investigating the issue and proposing a fix!

On 10/10/23 04:08, liufengjiang.0426 wrote:
> When the packets is sent in packed mode, and the packets data and
> virtio-header are divided into two desc, set the next flag of
> virtio-header desc
> 
>>> Fix the warning that a single line of commit log exceeds 75 chars

The changelog should not be part of the commit message.

> 
> Bugzilla ID: 1295
> Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues")
> 
> Signed-off-by: liufengjiang.0426 <liufengjiang.0426@bytedance.com>

Could you please sign-off with your full name?


> ---

The changelog should be placed here.

>   drivers/net/virtio/virtqueue.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
> index 9d4aba11a3..4e9f2d0358 100644
> --- a/drivers/net/virtio/virtqueue.h
> +++ b/drivers/net/virtio/virtqueue.h
> @@ -672,6 +672,7 @@ virtqueue_enqueue_xmit_packed(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
>   		 */
>   		start_dp[idx].addr = txvq->hdr_mem + RTE_PTR_DIFF(&txr[idx].tx_hdr, txr);
>   		start_dp[idx].len = vq->hw->vtnet_hdr_size;
> +		head_flags |= VRING_DESC_F_NEXT;
>   		hdr = (struct virtio_net_hdr *)&txr[idx].tx_hdr;
>   		idx++;
>   		if (idx >= vq->vq_nentries) {

Otherwise, the fix look good to me.
With above small changes, it will be good for me.

Thanks,
Maxime
  
Maxime Coquelin Oct. 12, 2023, 1:56 p.m. UTC | #2
Addressed
Hi,

On 10/10/23 09:12, Maxime Coquelin wrote:
> Hi,
> 
> Thanks for investigating the issue and proposing a fix!
> 
> On 10/10/23 04:08, liufengjiang.0426 wrote:
>> When the packets is sent in packed mode, and the packets data and
>> virtio-header are divided into two desc, set the next flag of
>> virtio-header desc
>>
>>>> Fix the warning that a single line of commit log exceeds 75 chars
> 
> The changelog should not be part of the commit message.
> 
>>
>> Bugzilla ID: 1295
>> Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues")
>>
>> Signed-off-by: liufengjiang.0426 <liufengjiang.0426@bytedance.com>
> 
> Could you please sign-off with your full name?

Gentle reminder. No need to resubmit, just reply here with your full
name.

Thanks!
Maxime

> 
> 
>> ---
> 
> The changelog should be placed here.
> 
>>   drivers/net/virtio/virtqueue.h | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/net/virtio/virtqueue.h 
>> b/drivers/net/virtio/virtqueue.h
>> index 9d4aba11a3..4e9f2d0358 100644
>> --- a/drivers/net/virtio/virtqueue.h
>> +++ b/drivers/net/virtio/virtqueue.h
>> @@ -672,6 +672,7 @@ virtqueue_enqueue_xmit_packed(struct virtnet_tx 
>> *txvq, struct rte_mbuf *cookie,
>>            */
>>           start_dp[idx].addr = txvq->hdr_mem + 
>> RTE_PTR_DIFF(&txr[idx].tx_hdr, txr);
>>           start_dp[idx].len = vq->hw->vtnet_hdr_size;
>> +        head_flags |= VRING_DESC_F_NEXT;
>>           hdr = (struct virtio_net_hdr *)&txr[idx].tx_hdr;
>>           idx++;
>>           if (idx >= vq->vq_nentries) {
> 
> Otherwise, the fix look good to me.
> With above small changes, it will be good for me.
> 
> Thanks,
> Maxime
  

Patch

diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 9d4aba11a3..4e9f2d0358 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -672,6 +672,7 @@  virtqueue_enqueue_xmit_packed(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
 		 */
 		start_dp[idx].addr = txvq->hdr_mem + RTE_PTR_DIFF(&txr[idx].tx_hdr, txr);
 		start_dp[idx].len = vq->hw->vtnet_hdr_size;
+		head_flags |= VRING_DESC_F_NEXT;
 		hdr = (struct virtio_net_hdr *)&txr[idx].tx_hdr;
 		idx++;
 		if (idx >= vq->vq_nentries) {