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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vlad Yasevich Date: Wed, 02 May 2018 17:17:50 +0000 Subject: Re: [PATCH V2 net-next 4/6] tun: Add support for SCTP checksum offload Message-Id: <5e968e6d-4dbf-cfef-a270-99b0d1dd4ea8@redhat.com> List-Id: References: <20180502020739.19239-1-vyasevic@redhat.com> <20180502020739.19239-5-vyasevic@redhat.com> <20180502145347.GG5105@localhost.localdomain> <20180502145607.GH5105@localhost.localdomain> In-Reply-To: <20180502145607.GH5105@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Marcelo Ricardo Leitner , Vladislav Yasevich 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: virtio-dev-return-4032-cohuck=redhat.com@lists.oasis-open.org Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [66.179.20.138]) by lists.oasis-open.org (Postfix) with ESMTP id 04FF05819146 for ; Wed, 2 May 2018 10:18:07 -0700 (PDT) Reply-To: vyasevic@redhat.com References: <20180502020739.19239-1-vyasevic@redhat.com> <20180502020739.19239-5-vyasevic@redhat.com> <20180502145347.GG5105@localhost.localdomain> <20180502145607.GH5105@localhost.localdomain> From: Vlad Yasevich Message-ID: <5e968e6d-4dbf-cfef-a270-99b0d1dd4ea8@redhat.com> Date: Wed, 2 May 2018 13:17:50 -0400 MIME-Version: 1.0 In-Reply-To: <20180502145607.GH5105@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: [virtio-dev] Re: [PATCH V2 net-next 4/6] tun: Add support for SCTP checksum offload To: Marcelo Ricardo Leitner , Vladislav Yasevich 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 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 --------------------------------------------------------------------- To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org