DPDK usage discussions
 help / color / mirror / Atom feed
* Re: [dpdk-users] How to make virtual NIC (virtio and vmxnet3) support IP header checksum?
       [not found] <5c74f8e3.1c69fb81.b9311.cde6SMTPIN_ADDED_BROKEN@mx.google.com>
@ 2019-02-26 15:48 ` Stephen Hemminger
  2019-02-27  2:40   ` [dpdk-users] 答复: " 宋捷
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2019-02-26 15:48 UTC (permalink / raw)
  To: 宋捷; +Cc: 'users'

On Tue, 26 Feb 2019 16:29:00 +0800
宋捷 <songj@zctt.com> wrote:

> Hi All
> 
>     I test the DPDK virtual nics both in Esxi and KVM, I used DPDK  vmxnet3,
> virtio and e1000 nic. I need create IP packets and TX them.
> 
>  
> 
> I set the rte_mbuf as below before TX.
> 
> mb->l2_len = len(out_eth)
> 
> mb->l3_len = len(out_ip)
> 
> mb->ol_flags |= PKT_TX_IPV4 | PKT_TX_IP_CSUM
> 
>  
> 
> It worked well with DPDK virtual e1000 nic, the IP header checksum will be
> set correct value. but vmxnet3 and virtio just keep 0 for IP header
> checksum. 
> 
> I disable above code and call rte_ipv4_cksum for each IP header checksum. it
> worked with vmxnet3 and virtio when TX slowly, but checksum invalid once TX
> quicklyL
> 
>  
> 
> Why the DPDK vmxnet3 and virtio drivers don't support IP checksum?
> 
> If there’s an easy way for adding the IP header checksum with vmxnet3 and
> virtio ?
> 
>  
> 
>  
> 
> Thanks
> 
>  
> 
> Jie
> 

You need to look at the TX_OFFLOAD capability flags in dev_info.
Many drivers do not support IP checksum offload.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-users] 答复:  How to make virtual NIC (virtio and vmxnet3) support IP header checksum?
  2019-02-26 15:48 ` [dpdk-users] How to make virtual NIC (virtio and vmxnet3) support IP header checksum? Stephen Hemminger
@ 2019-02-27  2:40   ` 宋捷
  0 siblings, 0 replies; 3+ messages in thread
From: 宋捷 @ 2019-02-27  2:40 UTC (permalink / raw)
  To: 'Stephen Hemminger'; +Cc: 'users'

Thanks, 

I run testpmd for checking tx_offload capabilities, Virtio do not support IP checksum.

vmxnet3 can't start by testpmd, I need send another email about this.

Thanks
Jie

-----邮件原件-----
发件人: Stephen Hemminger [mailto:stephen@networkplumber.org] 
发送时间: 2019年2月26日 23:48
收件人: 宋捷 <songj@zctt.com>
抄送: 'users' <users@dpdk.org>
主题: Re: [dpdk-users] How to make virtual NIC (virtio and vmxnet3) support IP header checksum?

On Tue, 26 Feb 2019 16:29:00 +0800
宋捷 <songj@zctt.com> wrote:

> Hi All
> 
>     I test the DPDK virtual nics both in Esxi and KVM, I used DPDK  
> vmxnet3, virtio and e1000 nic. I need create IP packets and TX them.
> 
>  
> 
> I set the rte_mbuf as below before TX.
> 
> mb->l2_len = len(out_eth)
> 
> mb->l3_len = len(out_ip)
> 
> mb->ol_flags |= PKT_TX_IPV4 | PKT_TX_IP_CSUM
> 
>  
> 
> It worked well with DPDK virtual e1000 nic, the IP header checksum 
> will be set correct value. but vmxnet3 and virtio just keep 0 for IP 
> header checksum.
> 
> I disable above code and call rte_ipv4_cksum for each IP header 
> checksum. it worked with vmxnet3 and virtio when TX slowly, but 
> checksum invalid once TX quicklyL
> 
>  
> 
> Why the DPDK vmxnet3 and virtio drivers don't support IP checksum?
> 
> If there’s an easy way for adding the IP header checksum with vmxnet3 
> and virtio ?
> 
>  
> 
>  
> 
> Thanks
> 
>  
> 
> Jie
> 

You need to look at the TX_OFFLOAD capability flags in dev_info.
Many drivers do not support IP checksum offload.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-users] How to make virtual NIC (virtio and vmxnet3) support IP header checksum?
@ 2019-02-26  8:29 宋捷
  0 siblings, 0 replies; 3+ messages in thread
From: 宋捷 @ 2019-02-26  8:29 UTC (permalink / raw)
  To: 'users'

Hi All

    I test the DPDK virtual nics both in Esxi and KVM, I used DPDK  vmxnet3,
virtio and e1000 nic. I need create IP packets and TX them.

 

I set the rte_mbuf as below before TX.

mb->l2_len = len(out_eth)

mb->l3_len = len(out_ip)

mb->ol_flags |= PKT_TX_IPV4 | PKT_TX_IP_CSUM

 

It worked well with DPDK virtual e1000 nic, the IP header checksum will be
set correct value. but vmxnet3 and virtio just keep 0 for IP header
checksum. 

I disable above code and call rte_ipv4_cksum for each IP header checksum. it
worked with vmxnet3 and virtio when TX slowly, but checksum invalid once TX
quicklyL

 

Why the DPDK vmxnet3 and virtio drivers don't support IP checksum?

If there’s an easy way for adding the IP header checksum with vmxnet3 and
virtio ?

 

 

Thanks

 

Jie

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-27  2:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5c74f8e3.1c69fb81.b9311.cde6SMTPIN_ADDED_BROKEN@mx.google.com>
2019-02-26 15:48 ` [dpdk-users] How to make virtual NIC (virtio and vmxnet3) support IP header checksum? Stephen Hemminger
2019-02-27  2:40   ` [dpdk-users] 答复: " 宋捷
2019-02-26  8:29 [dpdk-users] " 宋捷

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).