From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vlad Yasevich Subject: Re: [PATCH V2 net-next 4/6] tun: Add support for SCTP checksum offload Date: Wed, 2 May 2018 13:17:50 -0400 Message-ID: <5e968e6d-4dbf-cfef-a270-99b0d1dd4ea8@redhat.com> References: <20180502020739.19239-1-vyasevic@redhat.com> <20180502020739.19239-5-vyasevic@redhat.com> <20180502145347.GG5105@localhost.localdomain> <20180502145607.GH5105@localhost.localdomain> Reply-To: vyasevic@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org, virtualization@lists.linux-foundation.org, virtio-dev@lists.oasis-open.org, mst@redhat.com, jasowang@redhat.com, nhorman@tuxdriver.com To: Marcelo Ricardo Leitner , Vladislav Yasevich Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50652 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751127AbeEBRR4 (ORCPT ); Wed, 2 May 2018 13:17:56 -0400 In-Reply-To: <20180502145607.GH5105@localhost.localdomain> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 05/02/2018 10:56 AM, Marcelo Ricardo Leitner wrote: > On Wed, May 02, 2018 at 11:53:47AM -0300, Marcelo Ricardo Leitner wrote: >> On Tue, May 01, 2018 at 10:07:37PM -0400, Vladislav Yasevich wrote: >>> 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". >> >> I'm confused here: >> >>> +++ b/drivers/net/tun.c >>> @@ -216,7 +216,7 @@ struct tun_struct { >>> struct net_device *dev; >>> netdev_features_t set_features; >>> #define TUN_USER_FEATURES (NETIF_F_HW_CSUM|NETIF_F_TSO_ECN|NETIF_F_TSO| \ >>> - NETIF_F_TSO6) >>> + NETIF_F_TSO6|NETIF_F_SCTP_CRC) >> >> Doesn't adding it here mean it defaults to "offload", instead? >> >> later on, it does: >> dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST | >> TUN_USER_FEATURES | NETIF_F_HW_VLAN_CTAG_TX | >> NETIF_F_HW_VLAN_STAG_TX; > > Missed to paste the next line too: > dev->features = dev->hw_features | NETIF_F_LLTX; > Yes, as a software device, we can default it to on. However, qemu will 0-out the features and then set them up based on the guest (just like regular checksum). -vlad