Regards
_Sugesh


> -----Original Message-----
> From: Jesse Gross [mailto:je...@kernel.org]
> Sent: Thursday, April 14, 2016 6:27 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:
> > Optimizing tunneling performance in userspace datapath by offloading
> > the rx checksum validation on tunnel packets to the NIC when it is
> supported.
> >
> > This patch improves the bidirectional VxLAN tunneling performance by
> > 8% and decapsulation performance by 24%. However it introduces 1%
> > performance drop in PHY-PHY case due to the overhead of validating
> > invalid checksum flag reported by NIC.
> >
> > Signed-off-by: Sugesh Chandran <sugesh.chand...@intel.com>
> 
> Can you include the environment details in the commit message similar to
> what you sent in the previous message?
[Sugesh] Sure, I will add those details when I am sending next version of patch.
> 
> Similar to what Pravin said, I don't think it is right to validate the 
> checksum for
> all packets. If an L2 switch is being implemented (without tunneling) then we
> shouldn't drop packets with incorrect L4 checksums. This will also avoid any
> performance overhead in cases where the offload is not needed.
[Sugesh] Yes we could move checksum validation and packet dropping to the 
tunneling code. But I feel its still necessary to check and mark the incoming 
packets
on rx checksum offloaded DPDK ports. Otherwise tunneling code
cannot distinguish Rx checksum offloaded packets from normal.
> 
> > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index
> > c7217ea..1c5cd56 100644
> > --- a/lib/netdev-dpdk.c
> > +++ b/lib/netdev-dpdk.c
> > @@ -608,7 +618,14 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev)
> OVS_REQUIRES(dpdk_mutex)
> >      n_rxq = MIN(info.max_rx_queues, dev->up.n_rxq);
> >      n_txq = MIN(info.max_tx_queues, dev->up.n_txq);
> >
> > -    diag = dpdk_eth_dev_queue_setup(dev, n_rxq, n_txq);
> > +    new_port_conf = port_conf;
> > +    /* Enable rx checksum offload if it is supported by the NIC */
> > +    if (info.rx_offload_capa & DEV_RX_OFFLOAD_IPV4_CKSUM) {
> > +        netdev->ol_flags |= NETDEV_RX_CHECKSUM_OFFLOAD;
> > +        new_port_conf.rxmode.hw_ip_checksum = 1;
> > +    }
> 
> Based on this, it looks like L4 checksums are provided by default but
> IPv4 needs to be turned on manually. Is that correct?
[Sugesh] The default behavior is neither L4 nor IPV4 checksums are enabled.
There is only one bit available in DPDK to enable Rx checksum offloading.
This will enable all the available checksum offloading features (IP/UDP/TCP).
I will modify the code to set/enable the rx checksum offloading on a port
only 
        if (info.rx_offload_capa & DEV_RX_OFFLOAD_IPV4_CKSUM  &&
                     info.rx_offload_capa &  DEV_RX_OFFLOAD_UDP_CKSUM  &&
                     info.rx_offload_capa &  DEV_RX_OFFLOAD_TCP_CKSUM)) {
Currently all the DPDK NIC drivers supports ip4 +L4 checksum offloading.
Couldn’t find anything that supports only either one of these.




_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to