[ovs-dev] [PATCH v2] tunneling: Improving tunneling performance using DPDK Rx checksum offloading feature.

Jesse Gross jesse at kernel.org
Thu Apr 14 17:26:40 UTC 2016


On Wed, Apr 13, 2016 at 7:42 AM, Sugesh Chandran
<sugesh.chandran at 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.chandran at intel.com>

Can you include the environment details in the commit message similar
to what you sent in the previous message?

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.

> 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?



More information about the dev mailing list