[ovs-dev] [PATCH v6] netdev-dpdk: Enable Rx checksum offloading feature on DPDK physical ports.

Ben Pfaff blp at ovn.org
Tue Dec 13 16:28:37 UTC 2016


On Tue, Dec 13, 2016 at 10:19:53AM +0000, Chandran, Sugesh wrote:
> Hi Ben,
> 
> Regards
> _Sugesh
> 
> > -----Original Message-----
> > From: Ben Pfaff [mailto:blp at ovn.org]
> > Sent: Monday, December 12, 2016 10:24 PM
> > To: Chandran, Sugesh <sugesh.chandran at intel.com>
> > Cc: dev at openvswitch.org; jesse at kernel.org
> > Subject: Re: [ovs-dev] [PATCH v6] netdev-dpdk: Enable Rx checksum
> > offloading feature on DPDK physical ports.
> > 
> > On Mon, Nov 28, 2016 at 03:24:24PM +0000, Sugesh Chandran wrote:
> > > Add Rx checksum offloading feature support on DPDK physical ports. By
> > > default, the Rx checksum offloading is enabled if NIC supports.
> > > However, the checksum offloading can be turned OFF either while adding
> > > a new DPDK physical port to OVS or at runtime.
> > >
> > > The rx checksum offloading can be turned off by setting the parameter
> > > to 'false'. For eg: To disable the rx checksum offloading when adding
> > > a port,
> > >
> > >  'ovs-vsctl add-port br0 dpdk0 -- \
> > >   set Interface dpdk0 type=dpdk options:rx-checksum-offload=false'
> > >
> > > OR (to disable at run time after port is being added to OVS)
> > >
> > > 'ovs-vsctl set Interface dpdk0 options:rx-checksum-offload=false'
> > >
> > > Similarly to turn ON rx checksum offloading at run time,
> > >
> > > 'ovs-vsctl set Interface dpdk0 options:rx-checksum-offload=true'
> > >
> > > The Tx checksum offloading support is not implemented due to the
> > > following reasons.
> > >
> > > 1) Checksum offloading and vectorization are mutually exclusive in
> > > DPDK poll mode driver. Vector packet processing is turned OFF when
> > > checksum offloading is enabled which causes significant performance drop
> > at Tx side.
> > >
> > > 2) Normally, OVS generates checksum for tunnel packets in software at
> > > the 'tunnel push' operation, where the tunnel headers are created.
> > > However enabling Tx checksum offloading involves,
> > >
> > >   *) Mark every packets for tx checksum offloading at 'tunnel_push' and
> > >   recirculate.
> > >   *) At the time of xmit, validate the same flag and instruct the NIC to do
> > the
> > >   checksum calculation.  In case NIC doesnt support Tx checksum offloading,
> > >   the checksum calculation has to be done in software before sending out
> > the
> > >   packets.
> > >
> > > No significant performance improvement noticed with Tx checksum
> > > offloading due to the e overhead of additional validations + non vector
> > packet processing.
> > > In some test scenarios, it introduces performance drop too.
> > >
> > > Rx checksum offloading still offers 8-9% of improvement on VxLAN
> > > tunneling decapsulation even though the SSE vector Rx function is
> > > disabled in DPDK poll mode driver.
> > >
> > > Signed-off-by: Sugesh Chandran <sugesh.chandran at intel.com>
> > > Acked-by: Jesse Gross <jesse at kernel.org>
> > 
> > Why would a user want to turn off checksum offloading?  The patch and the
> > documentation does not explain why, and it seems strange to offer an
> > optimization that a user would not want to use.
> [Sugesh] In DPDK, The vectorization get turned off when checksum offloading is enabled, which impacts the
> performance of smaller(64 bytes) packet traffic. The performance gain offered by checksum offload alleviates the vectorization impact in
> tunneling decapsulation. However it is not the case for non tunnel traffic. We also noticed the impact of vectorization is not very significant for larger packets >256 bytes for any type of traffic. 
> Considering all these aspects and according to the previous communications on this patch, we decided to give flexibility to user to turn ON/OFF checksum. So that a user who have only non tunnel traffic(with smaller packets) can turn off the checksum offload to get the same old good performance. By default the checksum offload is in ON state.
> 
> Do you think this information must be mentioned in the documentation? There are lot of parameters involved in there for a normal user to decide upon the checksum offload ON/OFF. Considering the style of documentation which talks only about the available configuration options and its syntax, do we have to put all these information which may cause confusion? 
> As you mentioned, I can provide these details in the commit message. Do you think it is suffice?

I think that the documentation should try to explain.  Users will not
read commit messages.


More information about the dev mailing list