Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7CB4C433F5 for ; Wed, 17 Nov 2021 06:01:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C954E6139F for ; Wed, 17 Nov 2021 06:01:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233475AbhKQGEp (ORCPT ); Wed, 17 Nov 2021 01:04:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230044AbhKQGEn (ORCPT ); Wed, 17 Nov 2021 01:04:43 -0500 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43997C061570 for ; Tue, 16 Nov 2021 22:01:45 -0800 (PST) Received: by mail-oi1-x229.google.com with SMTP id s139so3921092oie.13 for ; Tue, 16 Nov 2021 22:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VlZH+SjArM/+ypAkd0GkqnF+/8X0/LANVS817tn/Z6M=; b=uh8qtTLsquh/EZx+E9fM9iwATsMXMExVvsfTsH2Dx4lGVp8ngZnDfySMn+twM2jJyZ I/M5mWXJDABMPKRcDGW69gLwYu4xB6BTxQayphm/gDensbt5NojFMj9o6A9mnvkL1M11 hHOPCtglWmO/FgubeQ/StiOjmeZ/xeXsHBbyXCBEcyBlqIyYjc3mqTaMLjK+svLedqG6 r0PMecG3kbB4CQMkJSoP4CIQtNyKHdU/Sn8GfvPsP0sDnY05RejHXZbg4i4Xin67Dzlc DhRvSYl1Ti/HtCpwOT3vAtg4SAKzYqOEEbfWk7fHDHwPHkdE7Dn18d5xMdzfTDIEHNCB h2yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VlZH+SjArM/+ypAkd0GkqnF+/8X0/LANVS817tn/Z6M=; b=WHGejmLRlBhdrHLK8hPXG/VGiNBoH88fMCKwwp6uhSIkKNX06k7iINNTv8hUkYyDiX nP7Puvc5ECT2mwSXYFLqnGq7DI3/Ku0PRl9sZp6K48jwq6UWF4WRK9G3K7//CKNASBvf 8s6LVugKJG+mAntgS5rO2HhA1jZpB0LzVTwH5jzxo4MW+tJlB+lbpwiZh9ZxFdgNaCWX L9I8qZMKJN7xZ8Ff8A0s0rVV0wQAugHPZL2RvcgvMMW3z+dH9UEHm3Kl3Q7kZDOn6oYh gKxXbIm5uLz3m7J4bDF5RP98aOCEHywXiuiKCExSXyIh123R5RkoPVptQT2U1oe20YeP hZ1Q== X-Gm-Message-State: AOAM530ZIwOwFO0/iciVSacGYgiOQ3LD3x+xmAr1bgdijdgh73uZDxE7 Va0jsV+z28QyXs3Jhbd3SQVbMw73TSLzBSHDE176xQ== X-Google-Smtp-Source: ABdhPJzRwMxi5Vhil0B4DEUfMMuTRi3VY7MLIEvgxCf9w8HuketPjUr+oWOSEK3nH61Fv5xXVvtfGeDjDQDbTozG4bM= X-Received: by 2002:a05:6808:171c:: with SMTP id bc28mr58754765oib.18.1637128904727; Tue, 16 Nov 2021 22:01:44 -0800 (PST) MIME-Version: 1.0 References: <20211031045959.143001-1-andrew@daynix.com> <20211031045959.143001-2-andrew@daynix.com> <20211101043723-mutt-send-email-mst@kernel.org> In-Reply-To: <20211101043723-mutt-send-email-mst@kernel.org> From: Andrew Melnichenko Date: Wed, 17 Nov 2021 08:00:00 +0200 Message-ID: Subject: Re: [RFC PATCH 1/4] drivers/net/virtio_net: Fixed vheader to use v1. To: "Michael S. Tsirkin" Cc: Jason Wang , davem@davemloft.net, kuba@kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yuri Benditovich , Yan Vugenfirer Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 1, 2021 at 10:40 AM Michael S. Tsirkin wrote: > > On Sun, Oct 31, 2021 at 06:59:56AM +0200, Andrew Melnychenko wrote: > > The header v1 provides additional info about RSS. > > Added changes to computing proper header length. > > In the next patches, the header may contain RSS hash info > > for the hash population. > > > > Signed-off-by: Andrew Melnychenko > > --- > > drivers/net/virtio_net.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index 4ad25a8b0870..b72b21ac8ebd 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -240,13 +240,13 @@ struct virtnet_info { > > }; > > > > struct padded_vnet_hdr { > > - struct virtio_net_hdr_mrg_rxbuf hdr; > > + struct virtio_net_hdr_v1_hash hdr; > > /* > > * hdr is in a separate sg buffer, and data sg buffer shares same page > > * with this header sg. This padding makes next sg 16 byte aligned > > * after the header. > > */ > > - char padding[4]; > > + char padding[12]; > > }; > > > > static bool is_xdp_frame(void *ptr) > > > This is not helpful as a separate patch, just reserving extra space. > better squash with the patches making use of the change. Ok. > > > @@ -1636,7 +1636,7 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) > > const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; > > struct virtnet_info *vi = sq->vq->vdev->priv; > > int num_sg; > > - unsigned hdr_len = vi->hdr_len; > > + unsigned int hdr_len = vi->hdr_len; > > bool can_push; > > > if we want this, pls make it a separate patch. Ok. I've added that change after checkpatch warnings. Technically, checkpatch should not fail on the patch without that line. > > > > > > pr_debug("%s: xmit %p %pM\n", vi->dev->name, skb, dest); > > -- > > 2.33.1 >