All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, saeedm@mellanox.com,
	michael.chan@broadcom.com, edwin.peer@broadcom.com,
	emil.s.tantilov@intel.com, alexander.h.duyck@linux.intel.com,
	jeffrey.t.kirsher@intel.com, tariqt@mellanox.com
Subject: Re: [PATCH net-next 4/9] ethtool: add tunnel info interface
Date: Thu, 9 Jul 2020 02:03:43 +0200	[thread overview]
Message-ID: <20200709000343.k22d2kxaq3ix3o5i@lion.mk-sys.cz> (raw)
In-Reply-To: <20200708163049.4414d7d1@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On Wed, Jul 08, 2020 at 04:30:49PM -0700, Jakub Kicinski wrote:
> > > +	ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY,		/* nest - _UDP_ENTRY_* */
> > > +
> > > +	/* add new constants above here */
> > > +	__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT,
> > > +	ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = (__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT - 1)
> > > +};
> > > +
> > > +enum {
> > > +	ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC,
> > > +
> > > +	ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT,		/* be16 */  
> > 
> > Do we get some benefit from passing the port in network byte order? It
> > would be helpful if we expected userspace to copy it e.g. into struct
> > sockaddr_in but that doesn't seem to be the case.

Let's leave it as be16 for consistency then.

> > How big can the message get? Can we be sure the information for one
> > device will always fit into a reasonably sized message? Attribute
> > ETHTOOL_A_TUNNEL_INFO_UDP_PORTS is limited by 65535 bytes (attribute
> > size is u16), can we always fit into this size?
> 
> I don't think I've seen any driver with more than 2 tables 
> or 16 entries total, and they don't seem to be growing in newer
> HW (people tend to use standard ports).
> 
> 188B + 16 * 20B = 508B - so we should be pretty safe with 64k.

So we are safe even if things grow by a factor of 100. Sounds good
enough, thanks.

Michal

  reply	other threads:[~2020-07-09  0:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 21:24 [PATCH net-next 0/9] udp_tunnel: add NIC RX port offload infrastructure Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 1/9] debugfs: make sure we can remove u32_array files cleanly Jakub Kicinski
2020-07-08  7:22   ` Greg Kroah-Hartman
2020-07-07 21:24 ` [PATCH net-next 2/9] udp_tunnel: re-number the offload tunnel types Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 3/9] udp_tunnel: add central NIC RX port offload infrastructure Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 4/9] ethtool: add tunnel info interface Jakub Kicinski
2020-07-08 22:32   ` Michal Kubecek
2020-07-08 23:30     ` Jakub Kicinski
2020-07-09  0:03       ` Michal Kubecek [this message]
2020-07-07 21:24 ` [PATCH net-next 5/9] netdevsim: add UDP tunnel port offload support Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 6/9] selftests: net: add a test for UDP tunnel info infra Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 7/9] ixgbe: convert to new udp_tunnel_nic infra Jakub Kicinski
2020-07-08 17:00   ` Alexander Duyck
2020-07-08 21:25     ` Jakub Kicinski
2020-07-08 23:14       ` Alexander Duyck
2020-07-07 21:24 ` [PATCH net-next 8/9] bnxt: " Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 9/9] mlx4: " Jakub Kicinski

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=20200709000343.k22d2kxaq3ix3o5i@lion.mk-sys.cz \
    --to=mkubecek@suse.cz \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=edwin.peer@broadcom.com \
    --cc=emil.s.tantilov@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=tariqt@mellanox.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.