On Tue, Apr 30, 2024 at 08:48:40PM +0200, Stefano Brivio wrote: > On Mon, 29 Apr 2024 17:09:33 +1000 > David Gibson wrote: > > > tcp_fill_headers[46]() fill most of the headers, but the tap specific > > header (the frame length for qemu sockets) is filled in afterwards. > > Filling this as well: > > * Removes a little redundancy between the tcp_send_flag() and > > tcp_data_to_tap() path > > * Makes calculation of the correct length a little easier > > * Removes the now misleadingly named 'vnet_len' variable in > > tcp_send_flag() > > > > Signed-off-by: David Gibson > > --- > > tcp.c | 28 ++++++++++++++-------------- > > 1 file changed, 14 insertions(+), 14 deletions(-) > > > > diff --git a/tcp.c b/tcp.c > > index 27c06958..01987c04 100644 > > --- a/tcp.c > > +++ b/tcp.c > > @@ -1321,6 +1321,7 @@ static void tcp_fill_header(struct tcphdr *th, > > * tcp_fill_headers4() - Fill 802.3, IPv4, TCP headers in pre-cooked buffers > > * @c: Execution context > > * @conn: Connection pointer > > + * @taph: TAP backend specific header > > Here and below: s/TAP/tap/. Other than the minor comments I shared the Adjusted, thanks. > series looks good to me (and looks like a big improvement in terms of > possible sources of confusion). -- David Gibson | 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