From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladislav Yasevich Subject: [PATCH net-next 4/5] tun: Add support for SCTP checksum offload Date: Mon, 2 Apr 2018 09:40:05 -0400 Message-ID: <20180402134006.10111-5-vyasevic@redhat.com> References: <20180402134006.10111-1-vyasevic@redhat.com> Cc: linux-sctp@vger.kernel.org, virtualization@lists.linux-foundation.org, mst@redhat.com, jasowang@redhat.com, nhorman@tuxdriver.com, Vladislav Yasevich To: netdev@vger.kernel.org Return-path: Received: from mail-qk0-f195.google.com ([209.85.220.195]:38146 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbeDBNkU (ORCPT ); Mon, 2 Apr 2018 09:40:20 -0400 In-Reply-To: <20180402134006.10111-1-vyasevic@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: Adds a new tun offload flag to allow for SCTP checksum offload. The flag has to be set by the user and defaults to "no offload". Signed-off-by: Vladislav Yasevich --- drivers/net/tun.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index a1ba262..263bcbe 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -2719,6 +2719,11 @@ static int set_offload(struct tun_struct *tun, unsigned long arg) arg &= ~TUN_F_UFO; } + if (arg & TUN_F_SCTP_CSUM) { + features |= NETIF_F_SCTP_CRC; + arg &= ~TUN_F_SCTP_CSUM; + } + /* This gives the user a way to test for new features in future by * trying to set them. */ if (arg) -- 2.9.5