From: Pravin Shelar <pshelar@ovn.org>
To: Andy Zhou <azhou@ovn.org>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
Joe Stringer <joe@ovn.org>
Subject: Re: [net-next sample action optimization v2 4/4] Openvswitch: Refactor sample and recirc actions implementation
Date: Thu, 16 Mar 2017 10:29:02 -0700 [thread overview]
Message-ID: <CAOrHB_Dce9dAwatuDf-FFpf6mSr_mpy5RypncEXgFACd8BFf8Q@mail.gmail.com> (raw)
In-Reply-To: <1489532891-33497-5-git-send-email-azhou@ovn.org>
On Tue, Mar 14, 2017 at 4:08 PM, Andy Zhou <azhou@ovn.org> wrote:
> Added execute_or_defer_actions() that both sample and recirc
> action's implementation can use.
>
> Signed-off-by: Andy Zhou <azhou@ovn.org>
> ---
> net/openvswitch/actions.c | 96 +++++++++++++++++++++++++++++------------------
> 1 file changed, 59 insertions(+), 37 deletions(-)
>
> diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
> index 1638370..fd7d903 100644
> --- a/net/openvswitch/actions.c
> +++ b/net/openvswitch/actions.c
...
...
> @@ -1286,6 +1262,52 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,
> return 0;
> }
>
> +static int execute_or_defer_actions(struct datapath *dp, struct sk_buff *skb,
> + struct sw_flow_key *clone,
> + struct sw_flow_key *key,
> + u32 *recirc_id,
> + const struct nlattr *actions, int len)
> +{
The action pointer can be checked if it is recirc or sample action. so
no need to pass pointer to recirc id.
we can pass the last and clone_key flags to this function to clone the
skb and key in this function itself. This would make code bit easy to
read.
next prev parent reply other threads:[~2017-03-16 17:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 23:08 [net-next sample action optimization v2 0/4] Andy Zhou
2017-03-14 23:08 ` [net-next sample action optimization v2 1/4] openvswitch: Deferred fifo API change Andy Zhou
2017-03-16 17:28 ` Pravin Shelar
2017-03-16 19:21 ` Andy Zhou
2017-03-14 23:08 ` [net-next sample action optimization v2 2/4] openvswitch: Refactor recirc key allocation Andy Zhou
2017-03-16 17:28 ` Pravin Shelar
2017-03-14 23:08 ` [net-next sample action optimization v2 3/4] openvswitch: Optimize sample action for the clone use cases Andy Zhou
2017-03-14 23:08 ` [net-next sample action optimization v2 4/4] Openvswitch: Refactor sample and recirc actions implementation Andy Zhou
2017-03-16 17:29 ` Pravin Shelar [this message]
2017-03-16 19:24 ` Pravin Shelar
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=CAOrHB_Dce9dAwatuDf-FFpf6mSr_mpy5RypncEXgFACd8BFf8Q@mail.gmail.com \
--to=pshelar@ovn.org \
--cc=azhou@ovn.org \
--cc=joe@ovn.org \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).