public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: aerosouund <aerosound161@gmail.com>,
	passt-dev@passt.top, eperezma@redhat.com
Subject: Re: [PATCH 1/7] tap: Move the tap_hdr file to a separate file
Date: Wed, 9 Sep 2026 19:10:31 +1000	[thread overview]
Message-ID: <aqEiduOmDLNc7_b2@gractus.seuss> (raw)
In-Reply-To: <f55301c3-3f04-452f-a6c4-b418d470fbbf@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3316 bytes --]

On Wed, Sep 09, 2026 at 10:47:25AM +0200, Laurent Vivier wrote:
> Subject: s/tap_hdr file/tap_hdr structure/
> 
> 
> On 9/4/26 23:28, aerosouund wrote:
> > From: Ammar Yasser <aerosound161@gmail.com>
> > 
> > It was defined in tap.h, put it on its own so that future callers won't
> > need to depend on all definitions in tap.h.
> > Also turn it into a union of a vnet_len and virtio_net_mrg_rxbuf
> > because for vhost acceleration the frames will have this virtio net
> > header prepended to them.
> > 
> > Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> 
> If Eugenio is the author, you should set it as the author, otherwise you
> should remove his Signed-off-by

I don't think that's necessarily correct.  If the patch has been
changed substantially enough from the original, it makes sense to
change the author.  However, the S-o-b should remain if some fragments
of the original remain, so as to still record the chain of hands
through which it has passed for the DCO.

> 
> > Signed-off-by: Ammar Yasser <aerosound161@gmail.com>
> > ---
> >   tap.h     |  9 +--------
> >   tap_hdr.h | 23 +++++++++++++++++++++++
> >   2 files changed, 24 insertions(+), 8 deletions(-)
> >   create mode 100644 tap_hdr.h
> > 
> > diff --git a/tap.h b/tap.h
> > index b335933..1625975 100644
> > --- a/tap.h
> > +++ b/tap.h
> > @@ -10,6 +10,7 @@
> >   #include <stdint.h>
> >   #include "passt.h"
> > +#include "tap_hdr.h"
> >   /** L2_MAX_LEN_PASTA - Maximum frame length for pasta mode (with L2 header)
> >    *
> > @@ -38,14 +39,6 @@
> >   struct udphdr;
> > -/**
> > - * struct tap_hdr - tap backend specific headers
> > - * @vnet_len:	Frame length (for qemu socket transport)
> > - */
> > -struct tap_hdr {
> > -	uint32_t vnet_len;
> > -} __attribute__((packed));
> > -
> >   /**
> >    * tap_hdr_iov() - struct iovec for a tap header
> >    * @c:		Execution context
> > diff --git a/tap_hdr.h b/tap_hdr.h
> > new file mode 100644
> > index 0000000..aa270b7
> > --- /dev/null
> > +++ b/tap_hdr.h
> > @@ -0,0 +1,23 @@
> > +/* SPDX-License-Identifier: GPL-2.0-or-later
> > + * Copyright (c) 2021 Red Hat GmbH
> > + * Author: Stefano Brivio <sbrivio@redhat.com>
> > + */
> > +
> > +#ifndef TAP_HDR_H
> > +#define TAP_HDR_H
> > +
> > +#include <stdint.h>
> > +#include <linux/virtio_net.h>
> > +
> > +/**
> > + * struct tap_hdr - tap backend specific headers
> > + * @vnet_len:	Frame length (for qemu socket transport)
> 
> missing @hdr description
> 
> > + */
> > +struct tap_hdr {
> > +	union {
> > +		uint32_t vnet_len;
> > +		struct virtio_net_hdr_mrg_rxbuf hdr;
> > +	};
> > +};
> 
> This will break passt.
> 
> In tap.h, we have:
> static inline struct iovec tap_hdr_iov(const struct ctx *c,
>                                        struct tap_hdr *thdr)
> {
>         return (struct iovec){
>                 .iov_base = thdr,
>                 .iov_len = c->mode == MODE_PASST ? sizeof(*thdr) : 0,
>         };
> }
> 
> before this patch sizeof(*thdr) is 4, now it's 12.
> 
> > +
> > +#endif /* TAP_HDR_H */
> 

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-09-09  9:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 21:28 [PATCH 0/7] Add vhost-net kernel support to pasta aerosouund
2026-09-04 21:28 ` [PATCH 1/7] tap: Move the tap_hdr file to a separate file aerosouund
2026-09-05  1:52   ` David Gibson
2026-09-09  8:47   ` Laurent Vivier
2026-09-09  9:10     ` David Gibson [this message]
2026-09-09  9:42       ` Laurent Vivier
2026-09-04 21:28 ` [PATCH 2/7] conf: Add context fields, epoll types and --vhost-kernel flag to pasta aerosouund
2026-09-04 21:28 ` [PATCH 3/7] virtio: Add the pasta vhost-net interface and implementation aerosouund
2026-09-04 21:28 ` [PATCH 4/7] tap: Implement the pasta vhost-net from-guest path aerosouund
2026-09-04 21:28 ` [PATCH 5/7] tap, tcp, udp: Prepare the to-guest path for vhost-net aerosouund
2026-09-04 21:28 ` [PATCH 6/7] tap: Implement the pasta vhost-net to-guest path aerosouund
2026-09-04 21:28 ` [PATCH 7/7] tap/tcp: Replace tcp_payload_used with a ring buffer style index aerosouund
2026-09-05 16:25 ` [PATCH 2/7] conf: Add context fields, epoll types and --vhost-kernel flag to pasta aerosouund
2026-09-05 16:25   ` [PATCH 3/7] virtio: Add the pasta vhost-net interface and implementation aerosouund
2026-09-05 16:25   ` [PATCH 4/7] tap: Implement the pasta vhost-net from-guest path aerosouund
2026-09-05 16:25   ` [PATCH 7/7] tap/tcp: Replace tcp_payload_used with a ring buffer style index aerosouund

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=aqEiduOmDLNc7_b2@gractus.seuss \
    --to=david@gibson.dropbear.id.au \
    --cc=aerosound161@gmail.com \
    --cc=eperezma@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=passt-dev@passt.top \
    /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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).