From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TfOtw+GJ; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 03AFB5A0280 for ; Mon, 26 May 2025 16:19:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748269171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7zTA//5byKnUwT8foO83PkZQ7n8FFbdX5N5nEPYKJ4k=; b=TfOtw+GJdsJqjFVAkNly+Eo2GQ/B1HdtImj6wE68qNj/ENBvVNPNyUktCE3hlu3eHWi8t2 LkaVkm0k6XfAVklK0TZ9Mwm5OS7gkm/4gV0XKw96gsMjnMflIDUj77kVJqNhJzDaQ3bWKp 4aVTR8yP4EJCh6b3x+dwy+D1OlBsyj4= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-296-1wYg7TqxMAuWkHqCoguU8g-1; Mon, 26 May 2025 10:19:30 -0400 X-MC-Unique: 1wYg7TqxMAuWkHqCoguU8g-1 X-Mimecast-MFC-AGG-ID: 1wYg7TqxMAuWkHqCoguU8g_1748269169 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3a37a0d1005so1283891f8f.3 for ; Mon, 26 May 2025 07:19:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748269169; x=1748873969; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7zTA//5byKnUwT8foO83PkZQ7n8FFbdX5N5nEPYKJ4k=; b=HLcYxgWuqx8iAbSmpgKFVBlBlJGctNPsBsPcGo9SGsk9u4x/+XMBZaZNj3h/lWe00+ MZaZB8r/QIwzSTSTIRmW5Vnbltjb5Vl5Se/y8BQCfqG11NwekS9DBOAe8J5oI4E56e0Z YbvyCW1RE3TDzhLJUbysgFcQs9GUsgyaBpyrUgyd2+6ttuh07/81tvIVIEtdh1ndMsrJ sTkvPmQ0gIUZQh1CQmN9V5HaBiK3u40O2DQL7rFL0mdli+kY7qgyjdI1KQYGb9AvD1nd XYKF+xmLNsBog8ncgLlB2r0NplOa16w6PmmGMAaVK+0rWdaGjiGRUzn05G1Ya8uYnM4T E87Q== X-Gm-Message-State: AOJu0YwnHoo/xMMfStH9gLDU/+HEql5jyKZMI7xZvrqg1PgdNeAI939V a4YzSdA8HuwN9pJALgmBCxjJTN6EWCWxquIDlLQN6lvDle11Awaa6Uz0viL9T5gEd5vHX3ghS/V EZQ87Q0f9uF0HGeRXOcAY0nrOdCwKnoDRQk/L8r6AQhiz6otkR0nklCTB53TioQ== X-Gm-Gg: ASbGncs20CaOr0ZMC3uCZZ261v0ZjmWs8wpfNJxaYtzIbe4kyk7gqD12EmSn73zJQ3f lYAcRSQ9Ae8n2jnwVLoAAgTpf3IhsHHZfAM9MLdxXnEt84zruV0CcTYleHdf6l9A/2y4RMWdALM my6VhOiUWEJXKR7gVI8hdKo4JQl0Wm+pISpKzlk5BjmqJgkk9FXMnHX9qfybthKz5eGIL1lWJTl V+V1wYpoPIEaGOXjrRg/+L6Ae3SUM0FXy02Dg4Rep25x/+prPkWorrJ68QyDMW9rUO2Ve9xvkyW SmS0wqJiZGYQ+wZUzWcg2Mk= X-Received: by 2002:adf:f483:0:b0:3a4:cbc6:9db2 with SMTP id ffacd0b85a97d-3a4cbc69e1dmr6178537f8f.59.1748269169005; Mon, 26 May 2025 07:19:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlIuLVB1xLxDHac27CqKI6P5LzqqpbECB/yLKFHnqiyWXB1Wa7kOPO2RWemwNaWARcFiIKEQ== X-Received: by 2002:adf:f483:0:b0:3a4:cbc6:9db2 with SMTP id ffacd0b85a97d-3a4cbc69e1dmr6178517f8f.59.1748269168579; Mon, 26 May 2025 07:19:28 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4d37498e8sm5221327f8f.16.2025.05.26.07.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 May 2025 07:19:28 -0700 (PDT) Date: Mon, 26 May 2025 16:19:27 +0200 From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH v5 05/29] packet: Use iov_tail with packet_add() Message-ID: <20250526161927.1378c3ae@elisabeth> In-Reply-To: <20250417165136.2688884-6-lvivier@redhat.com> References: <20250417165136.2688884-1-lvivier@redhat.com> <20250417165136.2688884-6-lvivier@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ujhxTvnui6rjXHlz0x7kZsYFwa9gKhp-hTkgKTCa6N8_1748269169 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: I7JTSDRHNNLQVGQUZHRSSOFLCLNSN7VY X-Message-ID-Hash: I7JTSDRHNNLQVGQUZHRSSOFLCLNSN7VY X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 17 Apr 2025 18:51:12 +0200 Laurent Vivier wrote: > Modify the interface of packet_add_do() to take an iov_tail > rather than a memory pointer aand length. > > Internally it only supports iovec array with only one entries, > after being pruned. We can accept iovec array with several > entries if the offset allows the function to reduce the number > of entries to 1. > > tap4_handler() is updated to create an iov_tail value using > IOV_TAIL_FROM_BUF() from the buffer and the length. > > Signed-off-by: Laurent Vivier > Reviewed-by: David Gibson > --- > iov.h | 1 + > packet.c | 15 ++++++++++++--- > packet.h | 7 ++++--- > tap.c | 32 ++++++++++++++++++-------------- > 4 files changed, 35 insertions(+), 20 deletions(-) > > diff --git a/iov.h b/iov.h > index a6e0f41e8033..b15a300131b9 100644 > --- a/iov.h > +++ b/iov.h > @@ -17,6 +17,7 @@ > > #include > #include > +#include I guess this is a left-over from a previous version adding a bool. At least, gcc doesn't complain if I don't include it here (not necessarily a good reason, sometimes with glibc headers are included in surprising ways... but still I guess it's a left-over). The rest of this patch looks good to me. -- Stefano