From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [10.110.1.242]) by lists.oasis-open.org (Postfix) with ESMTP id 2B88C986304 for ; Tue, 9 Aug 2022 09:22:22 +0000 (UTC) Date: Tue, 9 Aug 2022 05:22:13 -0400 From: "Michael S. Tsirkin" Message-ID: <20220809051849-mutt-send-email-mst@kernel.org> References: <20220802044548.9031-1-gavinl@nvidia.com> <973632c6-3606-01fb-c584-a6d4774647d8@oracle.com> <465efc4c-f41f-494e-8f2d-a87deae90c5d@nvidia.com> MIME-Version: 1.0 In-Reply-To: Subject: Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets Content-Type: text/plain; charset=us-ascii Content-Disposition: inline To: Jason Wang Cc: Gavin Li , Si-Wei Liu , "Hemminger, Stephen" , davem , virtualization , Virtio-Dev , jesse.brandeburg@intel.com, alexander.h.duyck@intel.com, kubakici@wp.pl, sridhar.samudrala@intel.com, loseweigh@gmail.com, Parav Pandit , gavi@nvidia.com List-ID: On Tue, Aug 09, 2022 at 03:44:22PM +0800, Jason Wang wrote: > > @@ -3571,8 +3581,10 @@ static int virtnet_probe(struct virtio_device > > *vdev) > > if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) || > > virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6) || > > virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_ECN) || > > - virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_UFO)) > > + virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_UFO)) { > > vi->big_packets = true; > > + vi->gso_is_supported = true; > > > > Please do the same for virtnet_clear_guest_offloads(), and > > correspondingly virtnet_restore_guest_offloads() as well. Not sure why > > virtnet_clear_guest_offloads() or the caller doesn't unset big_packet on > > successful return, seems like a bug to me. > > It is fine as long as > > 1) we don't implement ethtool API for changing guest offloads > 2) big mode XDP is not enabled > > So that code works only for XDP but we forbid big packets in the case > of XDP right now. > > Thanks To put it another way, changing big_packets after probe requires a bunch of work as current code assumes this flag never changes. Adding a TODO to handle dynamic offload config is fine but I don't think it should block this. -- MST --------------------------------------------------------------------- To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org