All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Parav Pandit <parav@nvidia.com>
Cc: "stephen@networkplumber.org" <stephen@networkplumber.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	David Ahern <dsahern@gmail.com>
Subject: Re: [iproute2-next v2 4/4] vdpa: Enable user to set mtu of the vdpa device
Date: Mon, 20 Dec 2021 07:02:58 -0500	[thread overview]
Message-ID: <20211220070136-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <PH0PR12MB548189EBA8346A960A0A409FDC7B9@PH0PR12MB5481.namprd12.prod.outlook.com>

On Mon, Dec 20, 2021 at 03:49:21AM +0000, Parav Pandit wrote:
> 
> 
> > From: Michael S. Tsirkin <mst@redhat.com>
> > Sent: Sunday, December 19, 2021 3:37 AM
> > 
> > On Sat, Dec 18, 2021 at 01:53:01PM -0700, David Ahern wrote:
> > > On 12/17/21 1:08 AM, Parav Pandit wrote:
> > > > @@ -204,6 +217,8 @@ static void vdpa_opts_put(struct nlmsghdr *nlh,
> > struct vdpa *vdpa)
> > > >  	if (opts->present & VDPA_OPT_VDEV_MAC)
> > > >  		mnl_attr_put(nlh, VDPA_ATTR_DEV_NET_CFG_MACADDR,
> > > >  			     sizeof(opts->mac), opts->mac);
> > > > +	if (opts->present & VDPA_OPT_VDEV_MTU)
> > > > +		mnl_attr_put_u16(nlh, VDPA_ATTR_DEV_NET_CFG_MTU,
> > opts->mtu);
> > >
> > > Why limit the MTU to a u16? Eric for example is working on "Big TCP"
> > > where IPv6 can work with Jumbograms where mtu can be > 64k.
> > >
> > > https://datatracker.ietf.org/doc/html/rfc2675
> > 
> > Well it's 16 bit at the virtio level, though we can extend that of course. Making
> > it match for now removes need for validation.
> > --
> As Michael mentioned virtio specification limits the mtu to 64k-1. Hence 16-bit.
> First we need to update the virtio spec to support > 64K mtu.
> However, when/if (I don't know when) that happens, we need to make this also u32.
> So may be we can make it u32 now, but still restrict the mtu value to 64k-1 in kernel, until the spec is updated.
> 
> Let me know, if you think that's future proofing is better, I first need to update the kernel to take nla u32.
> 
> > MST

After consideration, this future proofing seems like a good thing to have.

-- 
MST

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Parav Pandit <parav@nvidia.com>
Cc: David Ahern <dsahern@gmail.com>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org" 
	<virtualization@lists.linux-foundation.org>,
	"jasowang@redhat.com" <jasowang@redhat.com>
Subject: Re: [iproute2-next v2 4/4] vdpa: Enable user to set mtu of the vdpa device
Date: Mon, 20 Dec 2021 07:02:58 -0500	[thread overview]
Message-ID: <20211220070136-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <PH0PR12MB548189EBA8346A960A0A409FDC7B9@PH0PR12MB5481.namprd12.prod.outlook.com>

On Mon, Dec 20, 2021 at 03:49:21AM +0000, Parav Pandit wrote:
> 
> 
> > From: Michael S. Tsirkin <mst@redhat.com>
> > Sent: Sunday, December 19, 2021 3:37 AM
> > 
> > On Sat, Dec 18, 2021 at 01:53:01PM -0700, David Ahern wrote:
> > > On 12/17/21 1:08 AM, Parav Pandit wrote:
> > > > @@ -204,6 +217,8 @@ static void vdpa_opts_put(struct nlmsghdr *nlh,
> > struct vdpa *vdpa)
> > > >  	if (opts->present & VDPA_OPT_VDEV_MAC)
> > > >  		mnl_attr_put(nlh, VDPA_ATTR_DEV_NET_CFG_MACADDR,
> > > >  			     sizeof(opts->mac), opts->mac);
> > > > +	if (opts->present & VDPA_OPT_VDEV_MTU)
> > > > +		mnl_attr_put_u16(nlh, VDPA_ATTR_DEV_NET_CFG_MTU,
> > opts->mtu);
> > >
> > > Why limit the MTU to a u16? Eric for example is working on "Big TCP"
> > > where IPv6 can work with Jumbograms where mtu can be > 64k.
> > >
> > > https://datatracker.ietf.org/doc/html/rfc2675
> > 
> > Well it's 16 bit at the virtio level, though we can extend that of course. Making
> > it match for now removes need for validation.
> > --
> As Michael mentioned virtio specification limits the mtu to 64k-1. Hence 16-bit.
> First we need to update the virtio spec to support > 64K mtu.
> However, when/if (I don't know when) that happens, we need to make this also u32.
> So may be we can make it u32 now, but still restrict the mtu value to 64k-1 in kernel, until the spec is updated.
> 
> Let me know, if you think that's future proofing is better, I first need to update the kernel to take nla u32.
> 
> > MST

After consideration, this future proofing seems like a good thing to have.

-- 
MST


  reply	other threads:[~2021-12-20 12:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17  8:08 [iproute2-next v2 0/4] vdpa tool to query and set config layout Parav Pandit via Virtualization
2021-12-17  8:08 ` Parav Pandit
2021-12-17  8:08 ` [iproute2-next v2 1/4] vdpa: Update kernel headers Parav Pandit via Virtualization
2021-12-17  8:08   ` Parav Pandit
2021-12-17  8:08 ` [iproute2-next v2 2/4] vdpa: Enable user to query vdpa device config layout Parav Pandit via Virtualization
2021-12-17  8:08   ` Parav Pandit
2021-12-17  8:08 ` [iproute2-next v2 3/4] vdpa: Enable user to set mac address of vdpa device Parav Pandit via Virtualization
2021-12-17  8:08   ` Parav Pandit
2021-12-17  8:08 ` [iproute2-next v2 4/4] vdpa: Enable user to set mtu of the " Parav Pandit via Virtualization
2021-12-17  8:08   ` Parav Pandit
2021-12-18 20:53   ` David Ahern
2021-12-18 20:53     ` David Ahern
2021-12-18 22:07     ` Michael S. Tsirkin
2021-12-18 22:07       ` Michael S. Tsirkin
2021-12-20  3:49       ` Parav Pandit via Virtualization
2021-12-20  3:49         ` Parav Pandit
2021-12-20 12:02         ` Michael S. Tsirkin [this message]
2021-12-20 12:02           ` Michael S. Tsirkin
2021-12-20 19:11           ` Parav Pandit via Virtualization
2021-12-20 19:11             ` Parav Pandit
2021-12-20 21:11             ` David Ahern
2021-12-20 21:11               ` David Ahern
2021-12-20 23:06               ` Michael S. Tsirkin
2021-12-20 23:06                 ` Michael S. Tsirkin

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=20211220070136-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=parav@nvidia.com \
    --cc=stephen@networkplumber.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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.