From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E61AC88E72 for ; Thu, 17 Sep 2026 10:30:35 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x79NJ-0007Ij-LP; Thu, 17 Sep 2026 06:29:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x79NA-0007Hx-Rr for qemu-devel@nongnu.org; Thu, 17 Sep 2026 06:29:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x79N7-0007Tp-Oo for qemu-devel@nongnu.org; Thu, 17 Sep 2026 06:29:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1789640980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=42qBdcQkRCKD9zcYnHiQLuQwW4V9L6vZuJMC9NQaT6s=; b=NQic7Pd4ewKVGXomfrUnsJpySnMOV+B75HuKly8MtP7/hUuH76kAZDKyZi14GsFoLiOolf rMKFbBkC2yODAQmPjbr/JHuniHKhtV1OgGe5QF3WcnD/ahZxyWMhC17ODFeiiQK95fvCc/ c7wExTb0TE+xJj/WAVQeerXXqx5Igbc= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-354-2gGJn5AJP16bFBf--knDWw-1; Thu, 17 Sep 2026 06:29:38 -0400 X-MC-Unique: 2gGJn5AJP16bFBf--knDWw-1 X-Mimecast-MFC-AGG-ID: 2gGJn5AJP16bFBf--knDWw_1789640977 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 36EC61944B1C; Thu, 17 Sep 2026 10:29:37 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.44.48.151]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 94F5419AC044; Thu, 17 Sep 2026 10:29:35 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: Nariman Sayed Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: Re: [PATCH 1/3] net/tap: add tap_fd_get_mtu() to query host tap MTU Date: Thu, 17 Sep 2026 12:28:48 +0200 Message-ID: <20260917102921.210023-2-eperezma@redhat.com> In-Reply-To: <20260816043451.2547-2-narimansayed28@gmail.com> References: <20260816043451.2547-2-narimansayed28@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Received-SPF: pass client-ip=170.10.133.124; envelope-from=eperezma@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Good feature! I'm sorry, the series fell through the cracks. On Sun, 16 Aug 2026 at 07:34:49 +0300, Nariman Sayed wrote: > + if (n->net_conf.mtu_from_tap) { > + NetClientState *tap_peer = n->nic_conf.peers.ncs[0]; > + if (tap_peer && tap_peer->info->type == NET_CLIENT_DRIVER_TAP) { > + int mtu = tap_get_mtu(tap_peer); > + if (mtu > 0) { > + n->net_conf.mtu = mtu; > + n->host_features |= (1ULL << VIRTIO_NET_F_MTU); > + } > + } > + } The series looks good, but this part should not check for the backend type. Instead, rename the callback as get_mtu and call peer->get_mtu, so if we add the feature to other backends like vhost-user or vhost-vdpa this part of the code does not need to be modified. Thanks!