mbox series

[ovs-dev,0/3] userspace-tso: Improve L4 csum offload support.

Message ID 20200214130336.583696-1-fbl@sysclose.org
Headers show
Series userspace-tso: Improve L4 csum offload support. | expand

Message

Flavio Leitner Feb. 14, 2020, 1:03 p.m. UTC
This patchset disables unsupported offload features for vhost
device such as UFO and ECN.

Then it includes UDP checksum offload as a must have to enable
userspace TSO, but leave SCTP as optional. Only a few drivers
support SCTP checksum offload and the protocol is not widely
used.

Finally it fixes netdev layer to handle each L4 checksum
independently.

Flavio Leitner (3):
  netdev-dpdk: vhost: disable unsupported offload features.
  userspace TSO: Include UDP checksum offload.
  userspace TSO: SCTP checksum offload optional.

 Documentation/topics/userspace-tso.rst |  7 +++
 lib/netdev-dpdk.c                      | 59 +++++++++++++++++++-------
 lib/netdev-linux.c                     |  2 +
 lib/netdev-provider.h                  |  4 +-
 lib/netdev.c                           | 30 +++++++++++--
 5 files changed, 82 insertions(+), 20 deletions(-)

Comments

Ilya Maximets Feb. 28, 2020, 3:34 p.m. UTC | #1
On 2/14/20 2:03 PM, Flavio Leitner wrote:
> This patchset disables unsupported offload features for vhost
> device such as UFO and ECN.
> 
> Then it includes UDP checksum offload as a must have to enable
> userspace TSO, but leave SCTP as optional. Only a few drivers
> support SCTP checksum offload and the protocol is not widely
> used.
> 
> Finally it fixes netdev layer to handle each L4 checksum
> independently.
> 
> Flavio Leitner (3):
>   netdev-dpdk: vhost: disable unsupported offload features.
>   userspace TSO: Include UDP checksum offload.
>   userspace TSO: SCTP checksum offload optional.
> 
>  Documentation/topics/userspace-tso.rst |  7 +++
>  lib/netdev-dpdk.c                      | 59 +++++++++++++++++++-------
>  lib/netdev-linux.c                     |  2 +
>  lib/netdev-provider.h                  |  4 +-
>  lib/netdev.c                           | 30 +++++++++++--
>  5 files changed, 82 insertions(+), 20 deletions(-)
> 

Thanks!  Applied to master and branch-2.13.

Best regards, Ilya Maximets.
William Tu April 15, 2020, 11:49 p.m. UTC | #2
On Fri, Feb 28, 2020 at 7:34 AM Ilya Maximets <i.maximets@ovn.org> wrote:
>
> On 2/14/20 2:03 PM, Flavio Leitner wrote:
> > This patchset disables unsupported offload features for vhost
> > device such as UFO and ECN.
> >
> > Then it includes UDP checksum offload as a must have to enable
> > userspace TSO, but leave SCTP as optional. Only a few drivers
> > support SCTP checksum offload and the protocol is not widely
> > used.

Hi Flavio and Ilya,

I have a question about this.
If we do "other_config:userspace-tso-enable=true", it enables both
the TSO and CSUM offload.
Can we enable only the CSUM offload, but not TSO?
So making it a separate configurations?

Because currently, all the "make check-system-userspace" has to add
$ ethtool -K $1 tx off
due to no checksum support.
If we make CSUM offload enabled by default, so we don't need to turn
off tx offload?

Regards,
William
Yi Yang (杨燚)-云服务集团 April 16, 2020, 2:16 a.m. UTC | #3
Ethtool can separately turn off tso

$ ethtool -K vethXXX tso off

$ ethtool -K vethXXX tx off will turn off tx checksum, tso, sg.

TSO depends on tx checksum and sg, so if you just want to turn off tso and
keep tx chechsum on, you can do it in the below way.

$ ethtool -K vethXXX tx on
$ ethtool -K vethXXX tso off


-----邮件原件-----
发件人: dev [mailto:ovs-dev-bounces@openvswitch.org] 代表 William Tu
发送时间: 2020年4月16日 7:49
收件人: Ilya Maximets <i.maximets@ovn.org>
抄送: <dev@openvswitch.org> <dev@openvswitch.org>; Flavio Leitner
<fbl@sysclose.org>
主题: Re: [ovs-dev] [PATCH 0/3] userspace-tso: Improve L4 csum offload
support.

On Fri, Feb 28, 2020 at 7:34 AM Ilya Maximets <i.maximets@ovn.org> wrote:
>
> On 2/14/20 2:03 PM, Flavio Leitner wrote:
> > This patchset disables unsupported offload features for vhost device 
> > such as UFO and ECN.
> >
> > Then it includes UDP checksum offload as a must have to enable 
> > userspace TSO, but leave SCTP as optional. Only a few drivers 
> > support SCTP checksum offload and the protocol is not widely used.

Hi Flavio and Ilya,

I have a question about this.
If we do "other_config:userspace-tso-enable=true", it enables both the TSO
and CSUM offload.
Can we enable only the CSUM offload, but not TSO?
So making it a separate configurations?

Because currently, all the "make check-system-userspace" has to add $
ethtool -K $1 tx off due to no checksum support.
If we make CSUM offload enabled by default, so we don't need to turn off tx
offload?

Regards,
William