From: Vladislav Yasevich <vyasevich@gmail.com> To: netdev@vger.kernel.org Cc: nhorman@tuxdriver.com, mst@redhat.com, virtualization@lists.linux-foundation.org, linux-sctp@vger.kernel.org Subject: [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support Date: Mon, 2 Apr 2018 09:40:01 -0400 [thread overview] Message-ID: <20180402134006.10111-1-vyasevic@redhat.com> (raw) Now that we have SCTP offload capabilities in the kernel, we can add them to virtio as well. First step is SCTP checksum. We need a new freature in virtio to negotiate this support since SCTP is excluded with the stardard checksum and requires a little bit extra. This series proposes VIRTIO_NET_F_SCTP_CSUM feature bit. As the "little bit extra", the kernel uses a new bit in the skb (skb->csum_not_inet) to determine whether to use standard inet checksum or the SCTP CRC32c checksum. This bit has to be communicated between the host and the guest. This bit is carried in the vnet header. Tap and macvtap support is added through an extra feature for the TUNSETOFFLOAD ioctl. Additionally macvtap will no correctly do sctp checksumming if the receive doesn't support SCTP offload. This also turns on sctp offloading for macvlan devices. As for the perf numbers, I am seeing about a 5% increase in vm-to-vm and vm-to-hos throughput which is the same as manually disabling sctp checksumming,since this is exactly what we are emulatting. Sending outside the host, the increase about 2.5-3%. As for GSO, the way sctp GSO is currently implemented buys us nothing in added support to virtio. To add true GSO, would require a lot of re-work inside of SCTP and would require extensions to the virtio net header to carry extra sctp data. Vladislav Yasevich (5): virtio: Add support for SCTP checksum offloading sctp: Handle sctp packets with CHECKSUM_PARTIAL sctp: Build sctp offload support into the base kernel tun: Add support for SCTP checksum offload macvlan/macvtap: Add support for SCTP checksum offload. drivers/net/macvlan.c | 5 +++-- drivers/net/tap.c | 8 +++++--- drivers/net/tun.c | 5 +++++ drivers/net/virtio_net.c | 10 +++++++--- include/linux/virtio_net.h | 6 ++++++ include/net/sctp/sctp.h | 5 ----- include/uapi/linux/if_tun.h | 1 + include/uapi/linux/virtio_net.h | 2 ++ net/Kconfig | 1 + net/sctp/Kconfig | 1 - net/sctp/Makefile | 3 ++- net/sctp/input.c | 11 ++++++++++- net/sctp/offload.c | 4 +++- net/sctp/protocol.c | 3 --- 14 files changed, 45 insertions(+), 20 deletions(-) -- 2.9.5
WARNING: multiple messages have this Message-ID (diff)
From: Vladislav Yasevich <vyasevich@gmail.com> To: netdev@vger.kernel.org Cc: nhorman@tuxdriver.com, mst@redhat.com, virtualization@lists.linux-foundation.org, linux-sctp@vger.kernel.org Subject: [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support Date: Mon, 02 Apr 2018 13:40:01 +0000 [thread overview] Message-ID: <20180402134006.10111-1-vyasevic@redhat.com> (raw) Now that we have SCTP offload capabilities in the kernel, we can add them to virtio as well. First step is SCTP checksum. We need a new freature in virtio to negotiate this support since SCTP is excluded with the stardard checksum and requires a little bit extra. This series proposes VIRTIO_NET_F_SCTP_CSUM feature bit. As the "little bit extra", the kernel uses a new bit in the skb (skb->csum_not_inet) to determine whether to use standard inet checksum or the SCTP CRC32c checksum. This bit has to be communicated between the host and the guest. This bit is carried in the vnet header. Tap and macvtap support is added through an extra feature for the TUNSETOFFLOAD ioctl. Additionally macvtap will no correctly do sctp checksumming if the receive doesn't support SCTP offload. This also turns on sctp offloading for macvlan devices. As for the perf numbers, I am seeing about a 5% increase in vm-to-vm and vm-to-hos throughput which is the same as manually disabling sctp checksumming,since this is exactly what we are emulatting. Sending outside the host, the increase about 2.5-3%. As for GSO, the way sctp GSO is currently implemented buys us nothing in added support to virtio. To add true GSO, would require a lot of re-work inside of SCTP and would require extensions to the virtio net header to carry extra sctp data. Vladislav Yasevich (5): virtio: Add support for SCTP checksum offloading sctp: Handle sctp packets with CHECKSUM_PARTIAL sctp: Build sctp offload support into the base kernel tun: Add support for SCTP checksum offload macvlan/macvtap: Add support for SCTP checksum offload. drivers/net/macvlan.c | 5 +++-- drivers/net/tap.c | 8 +++++--- drivers/net/tun.c | 5 +++++ drivers/net/virtio_net.c | 10 +++++++--- include/linux/virtio_net.h | 6 ++++++ include/net/sctp/sctp.h | 5 ----- include/uapi/linux/if_tun.h | 1 + include/uapi/linux/virtio_net.h | 2 ++ net/Kconfig | 1 + net/sctp/Kconfig | 1 - net/sctp/Makefile | 3 ++- net/sctp/input.c | 11 ++++++++++- net/sctp/offload.c | 4 +++- net/sctp/protocol.c | 3 --- 14 files changed, 45 insertions(+), 20 deletions(-) -- 2.9.5
next reply other threads:[~2018-04-02 13:40 UTC|newest] Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-02 13:40 Vladislav Yasevich [this message] 2018-04-02 13:40 ` [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support Vladislav Yasevich 2018-04-02 13:40 ` [PATCH net-next 1/5] virtio: Add support for SCTP checksum offloading Vladislav Yasevich 2018-04-02 13:40 ` Vladislav Yasevich 2018-04-10 3:17 ` Jason Wang 2018-04-10 3:17 ` Jason Wang 2018-04-10 3:17 ` Jason Wang 2018-04-11 22:39 ` Marcelo Ricardo Leitner 2018-04-11 22:39 ` Marcelo Ricardo Leitner 2018-04-11 22:49 ` Michael S. Tsirkin 2018-04-11 22:49 ` Michael S. Tsirkin 2018-04-16 13:45 ` Vlad Yasevich 2018-04-16 13:45 ` Vlad Yasevich 2018-04-16 15:52 ` Michael S. Tsirkin 2018-04-16 15:52 ` Michael S. Tsirkin 2018-04-16 17:09 ` Michael S. Tsirkin 2018-04-16 17:09 ` Michael S. Tsirkin 2018-04-17 19:06 ` Vlad Yasevich 2018-04-17 19:06 ` Vlad Yasevich 2018-04-17 19:06 ` Vlad Yasevich 2018-04-16 17:09 ` Michael S. Tsirkin 2018-04-16 13:45 ` Vlad Yasevich 2018-04-11 22:49 ` Michael S. Tsirkin 2018-04-16 17:07 ` Michael S. Tsirkin 2018-04-16 17:07 ` Michael S. Tsirkin 2018-04-16 17:07 ` Michael S. Tsirkin 2018-04-02 13:40 ` Vladislav Yasevich 2018-04-02 13:40 ` [PATCH net-next 2/5] sctp: Handle sctp packets with CHECKSUM_PARTIAL Vladislav Yasevich 2018-04-02 13:40 ` Vladislav Yasevich 2018-04-02 13:40 ` Vladislav Yasevich 2018-04-02 13:40 ` [PATCH net-next 3/5] sctp: Build sctp offload support into the base kernel Vladislav Yasevich 2018-04-02 13:40 ` Vladislav Yasevich 2018-04-02 13:40 ` Vladislav Yasevich 2018-04-02 13:40 ` [PATCH net-next 4/5] tun: Add support for SCTP checksum offload Vladislav Yasevich 2018-04-02 13:40 ` Vladislav Yasevich 2018-04-02 13:40 ` Vladislav Yasevich 2018-04-03 0:49 ` kbuild test robot 2018-04-03 0:49 ` kbuild test robot 2018-04-03 0:49 ` kbuild test robot 2018-04-16 17:12 ` Michael S. Tsirkin 2018-04-16 17:12 ` Michael S. Tsirkin 2018-04-16 17:12 ` Michael S. Tsirkin 2018-04-02 13:40 ` [PATCH net-next 5/5] macvlan/macvtap: " Vladislav Yasevich 2018-04-02 13:40 ` Vladislav Yasevich 2018-04-04 15:31 ` Davide Caratti 2018-04-04 15:31 ` Davide Caratti 2018-04-16 17:14 ` Michael S. Tsirkin 2018-04-16 17:14 ` Michael S. Tsirkin 2018-04-16 17:14 ` Michael S. Tsirkin 2018-04-02 13:40 ` Vladislav Yasevich 2018-04-02 14:16 ` [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support David Miller 2018-04-02 14:16 ` David Miller 2018-04-02 14:16 ` David Miller 2018-04-02 14:47 ` Marcelo Ricardo Leitner 2018-04-02 14:47 ` Marcelo Ricardo Leitner 2018-04-17 20:35 ` Vlad Yasevich 2018-04-17 20:35 ` Vlad Yasevich 2018-04-18 1:33 ` Marcelo Ricardo Leitner 2018-04-18 1:33 ` Marcelo Ricardo Leitner 2018-04-18 6:57 ` Xin Long 2018-04-18 6:57 ` Xin Long 2018-04-18 6:57 ` Xin Long 2018-04-18 14:06 ` Michael S. Tsirkin 2018-04-18 14:06 ` Michael S. Tsirkin 2018-04-20 17:22 ` Marcelo Ricardo Leitner 2018-04-20 17:22 ` Marcelo Ricardo Leitner 2018-04-20 18:32 ` Michael S. Tsirkin 2018-04-20 18:32 ` Michael S. Tsirkin 2018-04-20 18:32 ` Michael S. Tsirkin 2018-04-23 13:17 ` Vlad Yasevich 2018-04-23 13:17 ` Vlad Yasevich 2018-04-23 13:17 ` Vlad Yasevich 2018-04-18 14:06 ` Michael S. Tsirkin 2018-04-17 20:35 ` Vlad Yasevich
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=20180402134006.10111-1-vyasevic@redhat.com \ --to=vyasevich@gmail.com \ --cc=linux-sctp@vger.kernel.org \ --cc=mst@redhat.com \ --cc=netdev@vger.kernel.org \ --cc=nhorman@tuxdriver.com \ --cc=virtualization@lists.linux-foundation.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.