All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Stringer <joe@ovn.org>
To: Andy Zhou <azhou@ovn.org>
Cc: netdev <netdev@vger.kernel.org>, pravin shelar <pshelar@ovn.org>
Subject: Re: [RFC net-next sample action optimization 2/3] openvswitch: Refactor recirc key allocation.
Date: Thu, 9 Mar 2017 11:11:02 -0800	[thread overview]
Message-ID: <CAPWQB7FsjZ7aUXBT+uH_ht6gu5b4URhAirkX2UX95jTzOZ7g5w@mail.gmail.com> (raw)
In-Reply-To: <1488932137-120383-3-git-send-email-azhou@ovn.org>

On 7 March 2017 at 16:15, Andy Zhou <azhou@ovn.org> wrote:
> The logic of allocating and copy key for each 'exec_actions_level'
> was specific to execute_recirc(). However, future patches will reuse
> as well.  Refactor the logic into its own function clone_key().
>
> Signed-off-by: Andy Zhou <azhou@ovn.org>
> ---

<snip>

> @@ -83,14 +83,32 @@ struct action_fifo {
>         struct deferred_action fifo[DEFERRED_ACTION_FIFO_SIZE];
>  };
>
> -struct recirc_keys {
> -       struct sw_flow_key key[OVS_DEFERRED_ACTION_THRESHOLD];
> +struct action_flow_keys {
> +       struct sw_flow_key key[OVS_ACTION_RECURSION_THRESHOLD];
>  };

I thought the old struct name was clearer on how it would be used -
for when actions are deferred.

>
>  static struct action_fifo __percpu *action_fifos;
> -static struct recirc_keys __percpu *recirc_keys;
> +static struct action_flow_keys __percpu *flow_keys;
>  static DEFINE_PER_CPU(int, exec_actions_level);
>
> +/* Make a clone of the 'key', using the pre-allocated percpu 'flow_keys'
> + * space. Since the storage is pre-allocated, the caller does not
> + * need to check for NULL return pointer.
> + */

Hmm? if level > OVS_ACTION_RECURSION_THRESHOLD, this function returns NULL.

  reply	other threads:[~2017-03-09 19:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08  0:15 [RFC net-next sample action optimization 0/3] Andy Zhou
2017-03-08  0:15 ` [RFC net-next sample action optimization 1/3] openvswitch: deferred fifo api change Andy Zhou
2017-03-09 19:08   ` Joe Stringer
2017-03-08  0:15 ` [RFC net-next sample action optimization 2/3] openvswitch: Refactor recirc key allocation Andy Zhou
2017-03-09 19:11   ` Joe Stringer [this message]
2017-03-10 21:44     ` Andy Zhou
2017-03-08  0:15 ` [RFC net-next sample action optimization 3/3] openvswitch: Optimize sample action for the clone use cases Andy Zhou
2017-03-09 19:46   ` Joe Stringer
2017-03-10 22:07     ` Andy Zhou
2017-03-10 23:12       ` Joe Stringer

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=CAPWQB7FsjZ7aUXBT+uH_ht6gu5b4URhAirkX2UX95jTzOZ7g5w@mail.gmail.com \
    --to=joe@ovn.org \
    --cc=azhou@ovn.org \
    --cc=netdev@vger.kernel.org \
    --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.