On Fri, Dec 16, 2016 at 4:03 PM, Chandran, Sugesh
<[email protected]> wrote:
>
>
> Regards
> _Sugesh
>
>> -----Original Message-----
>> From: Pravin Shelar [mailto:[email protected]]
>> Sent: Friday, December 16, 2016 7:50 AM
>> To: Chandran, Sugesh <[email protected]>
>> Cc: ovs dev <[email protected]>; Jesse Gross <[email protected]>; Ben
>> Pfaff <[email protected]>
>> Subject: Re: [ovs-dev] [PATCH v7] netdev-dpdk: Enable Rx checksum
>> offloading feature on DPDK physical ports.
>>
>> On Thu, Dec 15, 2016 at 4:07 AM, Chandran, Sugesh
>> <[email protected]> wrote:
>> >
>> >
>> > Regards
>> > _Sugesh
>> >
>> >> -----Original Message-----
>> >> From: Pravin Shelar [mailto:[email protected]]
>> >> Sent: Wednesday, December 14, 2016 9:42 PM
>> >> To: Chandran, Sugesh <[email protected]>
>> >> Cc: ovs dev <[email protected]>; Jesse Gross <[email protected]>;
>> >> Ben Pfaff <[email protected]>
>> >> Subject: Re: [ovs-dev] [PATCH v7] netdev-dpdk: Enable Rx checksum
>> >> offloading feature on DPDK physical ports.
>> >>
>> >> Thanks for the patch. I have couple of questions.
>> >>
>> >> On Wed, Dec 14, 2016 at 7:30 AM, Sugesh Chandran
>> >> <[email protected]> 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 <[email protected]>
>> >> > Acked-by: Jesse Gross <[email protected]>
>> >> >
>> >> ...
>> >> ...
>> >> >  static void
>> >> > +dpdk_eth_checksum_offload_configure(struct netdev_dpdk *dev)
>> >> > +    OVS_REQUIRES(dev->mutex)
>> >> > +{
>> >> > +    struct rte_eth_dev_info info;
>> >> > +    bool rx_csum_ol_flag = false;
>> >> > +    uint32_t rx_chksm_offload_capa = DEV_RX_OFFLOAD_UDP_CKSUM
>> |
>> >> > +                                     DEV_RX_OFFLOAD_TCP_CKSUM |
>> >> > +                                     DEV_RX_OFFLOAD_IPV4_CKSUM;
>> >> > +    rte_eth_dev_info_get(dev->port_id, &info);
>> >> > +    rx_csum_ol_flag = (dev->hw_ol_features &
>> >> > +NETDEV_RX_CHECKSUM_OFFLOAD) != 0;
>> >> > +
>> >> > +    if (rx_csum_ol_flag &&
>> >> > +        (info.rx_offload_capa & rx_chksm_offload_capa) !=
>> >> > +         rx_chksm_offload_capa) {
>> >> > +        VLOG_WARN_ONCE("Failed to enable Rx checksum offload on
>> >> > + device
>> >> %d",
>> >> > +                   dev->port_id);
This is not clear error msg. In this case device does not support
requested offload feature. So the msg should mention that.

>> >> > +        dev->hw_ol_features &= ~NETDEV_RX_CHECKSUM_OFFLOAD;
>> >> > +        return;
>> >> > +    }
>> >> > +    netdev_request_reconfigure(&dev->up);
>> >> > +}
>> >> > +
>> >> I am not sure about need for netdev reconfigure here.
>> > [Sugesh] Reconfigure is called here to enable/disable the checksum at
>> > run time. Do you think the checksum will be updated on a user request
>> > without having this call?
>>
>> I do not see need to reconfigure netdev here.
> [Sugesh] Sorry Pravin, Looks like I am missing something here. Can you please
> elaborate why you feel the reconfigure is not needed here?

I thought we can enable rx checksum offload synchronously, but the
device API does not allow it, so I agree we have to reconfigure netdev
here.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to