[dpdk-dev] [PATCH v3 0/3] enhance TX checksum command and csum forwarding engine

Liu, Jijiang jijiang.liu at intel.com
Mon Jan 12 04:41:42 CET 2015


Hi,

> -----Original Message-----
> From: Olivier MATZ [mailto:olivier.matz at 6wind.com]
> Sent: Friday, January 9, 2015 6:45 PM
> To: Ananyev, Konstantin; Liu, Jijiang
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 0/3] enhance TX checksum command and
> csum forwarding engine
> 
> Hi,
> 
> Thank you Jijiang for taking the time to get back on this.
> 
> On 01/08/2015 11:54 AM, Ananyev, Konstantin wrote:
> >> And we are able to test all of cases in
> >> http://dpdk.org/ml/archives/dev/2014-December/009213.html
> >>
> >> Test case A:
> >>
> >> tx_checksum set sw-tunnel-mode off
> >> tx_checksum set hw-tunnel-mode off
> >> tx_checksum set  ip   hw
> >>
> >> test case B.1:
> >>
> >> tx_checksum set sw-tunnel-mode on
> >> tx_checksum set hw-tunnel-mode on
> >> tx_checksum set  ip   hw
> >> tx_checksum set  tcp   hw
> >>
> >> test case B.2:
> >>
> >> tx_checksum set sw-tunnel-mode on
> >> tx_checksum set hw-tunnel-mode off
> >> tx_checksum set  ip   hw
> >>
> >> test case C:
> >>
> >> tx_checksum set sw-tunnel-mode on
> >> tx_checksum set hw-tunnel-mode on
> >> tx_checksum set  outer-ip   hw
> >> tx_checksum set  ip   hw
> >> tx_checksum set  tcp   hw
> 
> There is something I don't understand. A forward engine takes any packet in input
> and output. Packets can be of any kind (eth/arp, eth/ip/tcp,
> eth/vlan/ip/udp/vxlan/eth/ip/tcp, ...)
Yes.

> Today, the behavior of csum forward engine is defined for any kind of packet. See
> the description and the table in http://dpdk.org/ml/archives/dev/2014-
> December/009886.html
> 
> All packets that are not "Ether[/vlan]/(IP|IP6)/(UDP|TCP|SCTP)" or
> "Ether[/vlan]/(IP|IP6)/UDP/VxLAN/Ether[/vlan]/(IP|IP6)/UDP|TCP|SCTP"
> are forwarded without beeing modified.
Yes

> In my understanding, the use-case you are describing correspond to specific
> packet types. So a configuration would work only for one packet format only. Is it
> correct?

The use-cases I described correspond to all tunneling packet type, not just for "Ether[/vlan]/(IP|IP6)/UDP/VxLAN/Ether[/vlan]/(IP|IP6)/UDP|TCP|SCTP"  packet format.
Our goal is to have TX checksum framework that can cover all the case in the http://dpdk.org/ml/archives/dev/2014-December/009213.html  and all packet types in csum fwd engine.
If so, it is easy to support other tunneling type in csum fwd engine in the future. 

There are some examples for the different packet types:

1. For L2 Packet types:
MAC, ARP
MAC, PAY2
...
They are forwarded without beeing modified no matter if these above commands are set.

 2. For Non Tunneled IPv4/6 packet
MAC, IPV4, UDP, PAY4
MAC, IPV6, UDP, PAY4
...
Ipv4:
tx_checksum set  ip   hw
tx_checksum set  udp   hw

IPv6:
tx_checksum set  udp   hw

They are forwarded with TX checksum offload if these above commands are set.

3. For Tunneled IPv4/6 packet

See the above test cases:
Test case A
test case B.1
test case B.2
test case C

They are forwarded with TX checksum offload if these above commands are set.

> I think that the test-pmd command API should define a behavior for the csum
> forward engine for any packet. What do you think?

Agree.

Let me explain the checksum offload behavior of different packet type below,

1. For L2 Packet types:
Checksum offload behavior definition:
tx_checksum set sw-tunnel-mode on :               NONE
tx_checksum set hw-tunnel-mode on:               NONE
tx_checksum set  outer-ip|ip|tcp|udp|sctp   hw:     NONE

2. For Non Tunneled IPv4/6 packet

Checksum offload behavior definition:

tx_checksum set sw-tunnel-mode on :                NONE
tx_checksum set hw-tunnel-mode on:                 NONE      
tx_checksum set  outer-ip|ip|tcp|udp|sctp   hw:     ip|tcp|udp|sctp options   are VALID

3. For Tunneled IPv4/6 packet
Checksum offload behavior definition:

tx_checksum set sw-tunnel-mode on :                VALID
tx_checksum set hw-tunnel-mode on:                 VALID 
tx_checksum set  outer-ip|ip|tcp|udp|sctp   hw:     VALID

It is very welcome if you have better solution that is able to cover all the case in the http://dpdk.org/ml/archives/dev/2014-December/009213.html  and all packet types in csum fwd engine.

> 
> Regards,
> Olivier


More information about the dev mailing list