On Mon, Apr 18, 2016 at 2:12 AM, Chandran, Sugesh
<sugesh.chand...@intel.com> wrote:
>> -----Original Message-----
>> From: Jesse Gross [mailto:je...@kernel.org]
>> Sent: Friday, April 15, 2016 5:04 PM
>> To: Chandran, Sugesh <sugesh.chand...@intel.com>
>> Cc: pravin shelar <pshe...@ovn.org>; ovs dev <dev@openvswitch.org>
>> Subject: Re: [ovs-dev] [PATCH v2] tunneling: Improving tunneling
>> performance using DPDK Rx checksum offloading feature.
>>
>> On Fri, Apr 15, 2016 at 3:04 AM, Chandran, Sugesh
>> <sugesh.chand...@intel.com> wrote:
>> >> -----Original Message-----
>> >> From: pravin shelar [mailto:pshe...@ovn.org]
>> >> Sent: Thursday, April 14, 2016 5:59 PM
>> >> To: Chandran, Sugesh <sugesh.chand...@intel.com>
>> >> Cc: ovs dev <dev@openvswitch.org>
>> >> Subject: Re: [ovs-dev] [PATCH v2] tunneling: Improving tunneling
>> >> performance using DPDK Rx checksum offloading feature.
>> >> On Wed, Apr 13, 2016 at 7:42 AM, Sugesh Chandran
>> >> <sugesh.chand...@intel.com> wrote:
>> >> > +static inline bool
>> >> > +is_checksum_valid(struct dp_packet *packet) { #ifdef DPDK_NETDEV
>> >> > +    if (packet->mbuf.ol_flags & (PKT_RX_IP_CKSUM_BAD |
>> >> > +                                 PKT_RX_L4_CKSUM_BAD)) {
>> >> > +        return 0;
>> >> > +    }
>> >> > +    packet->md.ol_flags = NETDEV_RX_CHECKSUM_OFFLOAD;
>> >> There is no need to define redundant flags for same information in
>> >> dp_packet. We can just access packet->mbuf members to check the
>> >> checksum flag.
>> > [Sugesh] mbuf doesn’t have a flag for checksum. However  the checksum
>> > Invalid flags in mbuf get set when a packet received with invalid
>> > checksum on a checksum offloaded port. So a packet with a valid
>> > checksum cannot say if the checksum is already validated in the
>> > NIC/not. We need this information in the packet to bypass checksum
>> validation in tunneling code.
>>
>> What do you think the chances are of fixing this in DPDK? The current design
>> doesn't make a lot of sense to me, so it would be better to address it at the
>> source rather than papering over it in OVS.
> [Sugesh] I feel DPDK may not have to fix this behavior due to the fact that
> 1) The checksum offloading can be enabled only on supported DPDK ports. The 
> port
> Initialization reports error otherwise.
> 2) Any packet received on checksum offload port, always validated by NIC when
> its enabled.
> 3) DPDK reports error on packets having invalid checksum. Why should DPDK
> reports a packet is validated/valid also , provided its implicit as its 
> received on the offloaded
> port.

From a driver perspective, I don't think there is much difference in
reporting checksum valid vs. checksum invalid. However, reporting only
invalid state requires additional bookkeeping to track which ports
support checksum offload, which in this case also results in a
performance impact as you have reported. This just seems like
unnecessary complexity for no gain.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to