From: "Eugenio Pérez" <eperezma@redhat.com>
To: Nariman Sayed <narimansayed28@gmail.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@gmail.com>
Subject: Re: [PATCH 1/3] net/tap: add tap_fd_get_mtu() to query host tap MTU
Date: Thu, 17 Sep 2026 12:28:49 +0200 [thread overview]
Message-ID: <20260917102921.210023-3-eperezma@redhat.com> (raw)
In-Reply-To: <20260816043451.2547-2-narimansayed28@gmail.com>
From: Eugenio Perez Martin <eperezma@redhat.com>
Good feature! I'm sorry, all of 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.
Good addition by the way :).
Thanks!
next prev parent reply other threads:[~2026-09-17 10:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 4:34 [PATCH 0/3] net/tap, virtio-net: auto-detect MTU from host tap device Nariman Sayed
2026-08-16 4:34 ` [PATCH 1/3] net/tap: add tap_fd_get_mtu() to query host tap MTU Nariman Sayed
2026-08-26 17:17 ` Aniket Sahu
2026-09-17 10:28 ` Eugenio Pérez
2026-09-17 10:28 ` Eugenio Pérez [this message]
2026-08-16 4:34 ` [PATCH 2/3] net/tap: expose tap_get_mtu() via NetClientState Nariman Sayed
2026-08-16 4:34 ` [PATCH 3/3] virtio-net: add mtu-from-tap property for automatic MTU detection Nariman Sayed
2026-08-24 13:40 ` [PATCH 0/3] net/tap, virtio-net: auto-detect MTU from host tap device Stefan Hajnoczi
2026-10-07 5:07 ` [PATCH v2 " Nariman Sayed
2026-10-07 5:07 ` [PATCH v2 1/3] net/tap: add tap_fd_get_mtu() to query host tap MTU Nariman Sayed
2026-10-07 5:07 ` [PATCH v2 2/3] net: add generic get_mtu NetClientInfo callback Nariman Sayed
2026-10-07 5:07 ` [PATCH v2 3/3] virtio-net: add mtu-from-tap property for automatic MTU detection Nariman Sayed
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=20260917102921.210023-3-eperezma@redhat.com \
--to=eperezma@redhat.com \
--cc=narimansayed28@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.