virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Andrew Melnychenko <andrew@daynix.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	yuri.benditovich@daynix.com, yan@daynix.com, kuba@kernel.org,
	davem@davemloft.net
Subject: Re: [RFC PATCH 1/4] drivers/net/virtio_net: Fixed vheader to use v1.
Date: Mon, 1 Nov 2021 04:40:22 -0400	[thread overview]
Message-ID: <20211101043723-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20211031045959.143001-2-andrew@daynix.com>

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 <andrew@daynix.com>
> ---
>  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.

> @@ -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.


>  
>  	pr_debug("%s: xmit %p %pM\n", vi->dev->name, skb, dest);
> -- 
> 2.33.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2021-11-01  8:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-31  4:59 [RFC PATCH 0/4] Added RSS support Andrew Melnychenko
2021-10-31  4:59 ` [RFC PATCH 1/4] drivers/net/virtio_net: Fixed vheader to use v1 Andrew Melnychenko
2021-11-01  8:40   ` Michael S. Tsirkin [this message]
2021-11-17  6:00     ` Andrew Melnichenko
2021-10-31  4:59 ` [RFC PATCH 2/4] drivers/net/virtio_net: Changed mergeable buffer length calculation Andrew Melnychenko
2021-11-01  8:44   ` Michael S. Tsirkin
2021-11-17  6:00     ` Andrew Melnichenko
2021-10-31  4:59 ` [RFC PATCH 3/4] drivers/net/virtio_net: Added basic RSS support Andrew Melnychenko
2021-10-31 15:32   ` Willem de Bruijn
2021-10-31 15:37     ` Willem de Bruijn
2021-11-17  6:00     ` Andrew Melnichenko
2021-10-31  4:59 ` [RFC PATCH 4/4] drivers/net/virtio_net: Added RSS hash report control Andrew Melnychenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211101043723-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=andrew@daynix.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=yan@daynix.com \
    --cc=yuri.benditovich@daynix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).