Akihiko Odaki wrote:
> hdr_len is repeatedly used so keep it in a local variable.
>
> Signed-off-by: Akihiko Odaki
Reviewed-by: Willem de Bruijn
Akihiko Odaki wrote:
> The vnet handling code will be reused by tap.
>
> Functions are renamed to ensure that their names contain "vnet" to
> clarify that they are part of the decoupled vnet handling code.
>
> Signed-off-by: Akihiko Odaki
Reviewed-by: Willem de Bruijn
Akihiko Odaki wrote:
> On 2025/02/06 6:21, Willem de Bruijn wrote:
> > Akihiko Odaki wrote:
> >> hdr_len is repeatedly used so keep it in a local variable.
> >>
> >> Signed-off-by: Akihiko Odaki
> >
> >> @@ -682,11 +683,8 @@ st
Mina Almasry wrote:
> Augment dmabuf binding to be able to handle TX. Additional to all the RX
> binding, we also create tx_vec needed for the TX path.
>
> Provide API for sendmsg to be able to send dmabufs bound to this device:
>
> - Provide a new dmabuf_tx_cmsg which includes the dmabuf to send
Akihiko Odaki wrote:
> hdr_len is repeatedly used so keep it in a local variable.
>
> Signed-off-by: Akihiko Odaki
> @@ -682,11 +683,8 @@ static ssize_t tap_get_user(struct tap_queue *q, void
> *msg_control,
> if (msg_control && sock_flag(&q->sk, SOCK_ZEROCOPY)) {
> struct i
Akihiko Odaki wrote:
> tun and tap implements the same vnet-related features so reuse the code.
>
> Signed-off-by: Akihiko Odaki
Reviewed-by: Willem de Bruijn
Akihiko Odaki wrote:
> hdr_len is repeatedly used so keep it in a local variable.
>
> Signed-off-by: Akihiko Odaki
Reviewed-by: Willem de Bruijn
Akihiko Odaki wrote:
> The vnet handling code will be reused by tap.
>
> Signed-off-by: Akihiko Odaki
> ---
> MAINTAINERS| 2 +-
> drivers/net/tun.c | 179 +--
> drivers/net/tun_vnet.h | 184
> +++
Akihiko Odaki wrote:
> Check IS_ENABLED(CONFIG_TUN_VNET_CROSS_LE) to save some lines and make
> future changes easier.
>
> Signed-off-by: Akihiko Odaki
> Reviewed-by: Willem de Bruijn
> ---
> drivers/net/tun.c | 26 --
> 1 file changed, 8 ins
> > > +struct net_devmem_dmabuf_binding *
> > > +net_devmem_get_sockc_binding(struct sock *sk, struct sockcm_cookie
> > > *sockc)
> > > +{
> > > + struct net_devmem_dmabuf_binding *binding;
> > > + int err = 0;
> > > +
> > > + binding = net_devmem_lookup_dmabuf(sockc->dmabuf_id);
> >
>
Akihiko Odaki wrote:
> On 2025/01/20 20:19, Willem de Bruijn wrote:
> > On Mon, Jan 20, 2025 at 1:37 AM Jason Wang wrote:
> >>
> >> On Fri, Jan 17, 2025 at 6:35 PM Akihiko Odaki
> >> wrote:
> >>>
> >>> On 2025/01/17 18:23, Willem de B
Akihiko Odaki wrote:
> On 2025/01/20 20:24, Willem de Bruijn wrote:
> > Akihiko Odaki wrote:
> >> hdr_len is repeatedly used so keep it in a local variable.
> >>
> >> Signed-off-by: Akihiko Odaki
> >> ---
> >> drivers/net/tap.c | 17 ++
Akihiko Odaki wrote:
> hdr_len is repeatedly used so keep it in a local variable.
>
> Signed-off-by: Akihiko Odaki
> ---
> drivers/net/tap.c | 17 +++--
> 1 file changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/tap.c b/drivers/net/tap.c
> index
> 061c2f27dfc83
Akihiko Odaki wrote:
> tap_get_user() used to track the length of iov_iter with another
> variable. We can use iov_iter_count() to determine the current length
> to avoid such chores.
>
> Signed-off-by: Akihiko Odaki
> ---
> drivers/net/tap.c | 9 +
> 1 file changed, 5 insertions(+), 4 d
Akihiko Odaki wrote:
> Decouple the vnet handling code so that we can reuse it for tap.
>
> Signed-off-by: Akihiko Odaki
Reviewed-by: Willem de Bruijn
On Mon, Jan 20, 2025 at 1:37 AM Jason Wang wrote:
>
> On Fri, Jan 17, 2025 at 6:35 PM Akihiko Odaki
> wrote:
> >
> > On 2025/01/17 18:23, Willem de Bruijn wrote:
> > > Akihiko Odaki wrote:
> > >> tun and tap implements the same vnet-related features s
Akihiko Odaki wrote:
> Decouple vnet-related functions from tun_struct so that we can reuse
> them for tap in the future.
>
> Signed-off-by: Akihiko Odaki
Reviewed-by: Willem de Bruijn
I'll review for when you resend.
> ---
> Changes in v4:
> - s/sz/vnet_hdr_len_sz/ for patch "tun: Decouple vnet handling"
> (Willem de Bruijn)
Minor, and sorry my bad: len_sz is duplicative, vnet_hdr_sz is common.
> - Reverted to add CONFIG_TUN_VNET.
> - Link to v
Akihiko Odaki wrote:
> The vnet handling code will be reused by tap.
>
> Signed-off-by: Akihiko Odaki
> ---
> MAINTAINERS| 2 +-
> drivers/net/Makefile | 3 +-
> drivers/net/tun.c | 174 +---
> drivers/net/tun_vnet.c | 175
> +++
Willem de Bruijn wrote:
> Akihiko Odaki wrote:
> > Decouple vnet-related functions from tun_struct so that we can reuse
> > them for tap in the future.
> >
> > Signed-off-by: Akihiko Odaki
> > ---
> > drivers/net/tun.c | 53
> >
Akihiko Odaki wrote:
> hdr_len is repeatedly used so keep it in a local variable.
>
> Signed-off-by: Akihiko Odaki
Reviewed-by: Willem de Bruijn
Akihiko Odaki wrote:
> tun_get_user() used to track the length of iov_iter with another
> variable. We can use iov_iter_count() to determine the current length
> to avoid such chores.
>
> Signed-off-by: Akihiko Odaki
Reviewed-by: Willem de Bruijn
Akihiko Odaki wrote:
> Check IS_ENABLED(CONFIG_TUN_VNET_CROSS_LE) to save some lines and make
> future changes easier.
>
> Signed-off-by: Akihiko Odaki
Reviewed-by: Willem de Bruijn
Akihiko Odaki wrote:
> tun and tap implements the same vnet-related features so reuse the code.
>
> Signed-off-by: Akihiko Odaki
> ---
> drivers/net/Kconfig| 1 +
> drivers/net/Makefile | 6 +-
> drivers/net/tap.c | 152
> +
> drive
Akihiko Odaki wrote:
> Decouple the vnet handling code so that we can reuse it for tap.
>
> Signed-off-by: Akihiko Odaki
> ---
> drivers/net/tun.c | 229
> +++---
> 1 file changed, 133 insertions(+), 96 deletions(-)
>
> diff --git a/drivers/net/t
Akihiko Odaki wrote:
> Decouple vnet-related functions from tun_struct so that we can reuse
> them for tap in the future.
>
> Signed-off-by: Akihiko Odaki
> ---
> drivers/net/tun.c | 53 +++--
> 1 file changed, 27 insertions(+), 26 deletions(-)
>
Michael S. Tsirkin wrote:
> On Thu, Jan 16, 2025 at 05:08:03PM +0900, Akihiko Odaki wrote:
> > When I implemented virtio's hash-related features to tun/tap [1],
> > I found tun/tap does not fill the entire region reserved for the virtio
> > header, leaving some uninitialized hole in the middle of t
Akihiko Odaki wrote:
> On 2025/01/10 17:33, Michael S. Tsirkin wrote:
> > On Fri, Jan 10, 2025 at 01:38:06PM +0900, Akihiko Odaki wrote:
> >> On 2025/01/09 21:46, Willem de Bruijn wrote:
> >>> Akihiko Odaki wrote:
> >>>> On 2025/01/09 16:31, Michael S
Akihiko Odaki wrote:
> The added tests confirm tun can perform RSS and hash reporting, and
> reject invalid configurations for them.
>
> Signed-off-by: Akihiko Odaki
> ---
> tools/testing/selftests/net/Makefile | 2 +-
> tools/testing/selftests/net/tun.c| 558
> +++
Akihiko Odaki wrote:
> Hash reporting
> --
>
> Allow the guest to reuse the hash value to make receive steering
> consistent between the host and guest, and to save hash computation.
>
> RSS
> ---
>
> RSS is a receive steering algorithm that can be negotiated to use with
> virtio_net
Akihiko Odaki wrote:
> They are useful to implement VIRTIO_NET_F_RSS and
> VIRTIO_NET_F_HASH_REPORT.
Toeplitz potentially has users beyond virtio. I wonder if we should
from the start implement this as net/core/rss.c.
> Signed-off-by: Akihiko Odaki
> ---
> include/linux/virtio_net.h | 188
>
Akihiko Odaki wrote:
> This series depends on: "[PATCH v2 0/3] tun: Unify vnet implementation
> and fill full vnet header"
> https://lore.kernel.org/r/20250109-tun-v2-0-388d7d5a2...@daynix.com
As mentioned elsewhere: let's first handle that patch series and
return to this series only when that is
Akihiko Odaki wrote:
> Both tun and tap exposes the same set of virtio-net-related features.
> Unify their implementations to ease future changes.
>
> Signed-off-by: Akihiko Odaki
> ---
> MAINTAINERS| 1 +
> drivers/net/Kconfig| 5 ++
> drivers/net/Makefile | 1 +
> drive
Akihiko Odaki wrote:
> When I implemented virtio's hash-related features to tun/tap [1],
> I found tun/tap does not fill the entire region reserved for the virtio
> header, leaving some uninitialized hole in the middle of the buffer
> after read()/recvmesg().
>
> This series fills the uninitialize
Akihiko Odaki wrote:
> On 2025/01/09 16:31, Michael S. Tsirkin wrote:
> > On Thu, Jan 09, 2025 at 03:58:44PM +0900, Akihiko Odaki wrote:
> >> tun used to simply advance iov_iter when it needs to pad virtio header,
> >> which leaves the garbage in the buffer as is. This is especially
> >> problemati
Mina Almasry wrote:
> Augment dmabuf binding to be able to handle TX. Additional to all the RX
> binding, we also create tx_vec and tx_iter needed for the TX path.
>
> Provide API for sendmsg to be able to send dmabufs bound to this device:
>
> - Provide a new dmabuf_tx_cmsg which includes the dm
Mina Almasry wrote:
> Add support for devmem TX in ncdevmem.
>
> This is a combination of the ncdevmem from the devmem TCP series RFCv1
> which included the TX path, and work by Stan to include the netlink API
> and refactored on top of his generic memory_provider support.
>
> Signed-off-by: Mina
Akihiko Odaki wrote:
> On 2024/10/09 22:55, Willem de Bruijn wrote:
> > Akihiko Odaki wrote:
> >> Both tun and tap exposes the same set of virtio-net-related features.
> >> Unify their implementations to ease future changes.
> >>
> >> Signed-off-b
Akihiko Odaki wrote:
> On 2024/10/09 22:51, Willem de Bruijn wrote:
> > Akihiko Odaki wrote:
> >> They are useful to implement VIRTIO_NET_F_RSS and
> >> VIRTIO_NET_F_HASH_REPORT.
> >>
> >> Signed-off-by: Akihiko Odaki
>
Akihiko Odaki wrote:
> Allow the guest to reuse the hash value to make receive steering
> consistent between the host and guest, and to save hash computation.
>
> Signed-off-by: Akihiko Odaki
> ---
> Documentation/networking/tuntap.rst | 7 +++
> drivers/net/Kconfig | 1 +
>
Akihiko Odaki wrote:
> Both tun and tap exposes the same set of virtio-net-related features.
> Unify their implementations to ease future changes.
>
> Signed-off-by: Akihiko Odaki
> ---
> MAINTAINERS| 1 +
> drivers/net/tap.c | 172 ++--
> d
Akihiko Odaki wrote:
> They are useful to implement VIRTIO_NET_F_RSS and
> VIRTIO_NET_F_HASH_REPORT.
>
> Signed-off-by: Akihiko Odaki
> ---
> include/linux/virtio_net.h | 188
> +
No need for these to be in header files
Akihiko Odaki wrote:
> RSS is a receive steering algorithm that can be negotiated to use with
> virtio_net. Conventionally the hash calculation was done by the VMM.
> However, computing the hash after the queue was chosen defeats the
> purpose of RSS.
>
> Another approach is to use eBPF steering p
Akihiko Odaki wrote:
> Allow the guest to reuse the hash value to make receive steering
> consistent between the host and guest, and to save hash computation.
>
> Signed-off-by: Akihiko Odaki
> ---
> Documentation/networking/tuntap.rst | 7 ++
> drivers/net/Kconfig | 1 +
> d
Akihiko Odaki wrote:
> tap used to simply advance iov_iter when it needs to pad virtio header.
> This leaves the garbage in the buffer as is and prevents telling if the
> header is padded or contains some real data.
>
> In theory, a user of tap can fill the buffer with zero before calling
> read()
Akihiko Odaki wrote:
> They are useful to implement VIRTIO_NET_F_RSS and
> VIRTIO_NET_F_HASH_REPORT.
>
> Signed-off-by: Akihiko Odaki
> ---
> include/linux/virtio_net.h | 198
> +
> 1 file changed, 198 insertions(+)
>
> diff --git a/include/linux/vir
Akihiko Odaki wrote:
> This new extension will be used by tun to carry the hash values and
> types to report with virtio-net headers.
>
> Signed-off-by: Akihiko Odaki
> ---
> include/linux/skbuff.h | 10 ++
> net/core/skbuff.c | 3 +++
> 2 files changed, 13 insertions(+)
>
> diff
47 matches
Mail list logo