All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Eelco Chaudron <echaudro@redhat.com>
Cc: Florian Westphal <fw@strlen.de>,
	netdev@vger.kernel.org, davem@davemloft.net, dev@openvswitch.org,
	kuba@kernel.org, pabeni@redhat.com, pshelar@ovn.org
Subject: Re: [PATCH net-next 2/2] net: openvswitch: make masks cache size configurable
Date: Thu, 23 Jul 2020 12:15:56 +0200	[thread overview]
Message-ID: <20200723101556.GE23458@breakpoint.cc> (raw)
In-Reply-To: <F147B9A7-3CD7-4F62-9BF4-389FD0FC36BC@redhat.com>

Eelco Chaudron <echaudro@redhat.com> wrote:
> On 22 Jul 2020, at 21:22, Florian Westphal wrote:
> > I see a 0 cache size is legal (turns it off) and that the allocation
> > path has a few sanity checks as well.
> > 
> > Would it make sense to add min/max policy to datapath_policy[] for this
> > as well?
> 
> Yes I could add the following:
> 
> @@ -1906,7 +1906,8 @@ static const struct nla_policy
> datapath_policy[OVS_DP_ATTR_MAX + 1] = {
>         [OVS_DP_ATTR_NAME] = { .type = NLA_NUL_STRING, .len = IFNAMSIZ - 1
> },
>         [OVS_DP_ATTR_UPCALL_PID] = { .type = NLA_U32 },
>         [OVS_DP_ATTR_USER_FEATURES] = { .type = NLA_U32 },
> +       [OVS_DP_ATTR_MASKS_CACHE_SIZE] =  NLA_POLICY_RANGE(NLA_U32, 0,
> +               PCPU_MIN_UNIT_SIZE / sizeof(struct mask_cache_entry)),
>  };
> Let me know your thoughts

I think its a good idea.  When 'max' becomes too restricted one could
rework internal kernel logic to support larger size and userspace
can detect it by probing with a larger size first.

  reply	other threads:[~2020-07-23 10:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22  8:27 [PATCH net-next 0/2] net: openvswitch: masks cache enhancements Eelco Chaudron
2020-07-22  8:27 ` [PATCH net-next 1/2] net: openvswitch: add masks cache hit counter Eelco Chaudron
2020-07-22  8:27 ` [PATCH net-next 2/2] net: openvswitch: make masks cache size configurable Eelco Chaudron
2020-07-22 15:21   ` Jakub Kicinski
2020-07-22 15:31     ` Eelco Chaudron
2020-07-22 17:40   ` kernel test robot
2020-07-22 17:40     ` kernel test robot
2020-07-22 19:22   ` Florian Westphal
2020-07-23  9:59     ` Eelco Chaudron
2020-07-23 10:15       ` Florian Westphal [this message]
2020-07-22  8:37 ` [PATCH net-next 0/2] net: openvswitch: masks cache enhancements Eelco Chaudron

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=20200723101556.GE23458@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=davem@davemloft.net \
    --cc=dev@openvswitch.org \
    --cc=echaudro@redhat.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pshelar@ovn.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.