From: David Miller <davem@davemloft.net>
To: alexey.kodanev@oracle.com
Cc: netdev@vger.kernel.org, alexander.h.duyck@intel.com
Subject: Re: [PATCH net] ip6_gre: fix device features for ioctl setup
Date: Tue, 26 Dec 2017 12:21:53 -0500 (EST) [thread overview]
Message-ID: <20171226.122153.606492364036628199.davem@davemloft.net> (raw)
In-Reply-To: <1513787763-5384-1-git-send-email-alexey.kodanev@oracle.com>
From: Alexey Kodanev <alexey.kodanev@oracle.com>
Date: Wed, 20 Dec 2017 19:36:03 +0300
> When ip6gre is created using ioctl, its features, such as
> scatter-gather, GSO and tx-checksumming will be turned off:
>
> # ip -f inet6 tunnel add gre6 mode ip6gre remote fd00::1
> # ethtool -k gre6 (truncated output)
> tx-checksumming: off
> scatter-gather: off
> tcp-segmentation-offload: off
> generic-segmentation-offload: off [requested on]
>
> But when netlink is used, they will be enabled:
> # ip link add gre6 type ip6gre remote fd00::1
> # ethtool -k gre6 (truncated output)
> tx-checksumming: on
> scatter-gather: on
> tcp-segmentation-offload: on
> generic-segmentation-offload: on
>
> This results in a loss of performance when gre6 is created via ioctl.
> The issue was found with LTP/gre tests.
>
> Fix it by moving the setup of device features to a separate function
> and invoke it with ndo_init callback because both netlink and ioctl
> will eventually call it via register_netdevice():
>
> register_netdevice()
> - ndo_init() callback -> ip6gre_tunnel_init() or ip6gre_tap_init()
> - ip6gre_tunnel_init_common()
> - ip6gre_tnl_init_features()
>
> The moved code also contains two minor style fixes:
> * removed needless tab from GRE6_FEATURES on NETIF_F_HIGHDMA line.
> * fixed the issue reported by checkpatch: "Unnecessary parentheses around
> 'nt->encap.type == TUNNEL_ENCAP_NONE'"
>
> Fixes: ac4eb009e477 ("ip6gre: Add support for basic offloads offloads excluding GSO")
> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Looks good, applied and queued up for -stable.
prev parent reply other threads:[~2017-12-26 17:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 16:36 [PATCH net] ip6_gre: fix device features for ioctl setup Alexey Kodanev
2017-12-26 17:21 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171226.122153.606492364036628199.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexander.h.duyck@intel.com \
--cc=alexey.kodanev@oracle.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox