From: "Samudrala, Sridhar" <sridhar.samudrala@intel.com>
To: David Miller <davem@davemloft.net>
Cc: john.r.fastabend@intel.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net: cls_u32: Add support for skip-sw flag to tc u32 classifier.
Date: Wed, 11 May 2016 16:44:55 -0700 [thread overview]
Message-ID: <5733C3F7.1060800@intel.com> (raw)
In-Reply-To: <20160511.192316.1290350535833930948.davem@davemloft.net>
On 5/11/2016 4:23 PM, David Miller wrote:
> From: Sridhar Samudrala <sridhar.samudrala@intel.com>
> Date: Mon, 9 May 2016 12:18:44 -0700
>
>> On devices that support TC U32 offloads, this flag enables a filter to be
>> added only to HW. skip-sw and skip-hw are mutually exclusive flags. By
>> default without any flags, the filter is added to both HW and SW, but no
>> error checks are done in case of failure to add to HW. With skip-sw,
>> failure to add to HW is treated as an error.
> I really want you to provide a "[PATCH net-next 0/2]" header posting
> explaining what this series is doing, and why.
Sure. Will submit a v2 with a header patch in a day or so after waiting
for any other comments.
>
> This is a core semantic issue, and we have to make sure all amongst us
> that we are all comfortable with exporting the offloadability controls
> in the way you are implementing them.
I tried to implement the semantics based on an earlier discussion about
these flags in this
email thread.
http://thread.gmane.org/gmane.linux.network/401733
>
> Also:
>
>> @@ -871,10 +889,15 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
>> return err;
>> }
>>
>> + err = u32_replace_hw_knode(tp, new, flags);
>> + if (err) {
>> + u32_destroy_key(tp, new, false);
>> + return err;
>> + }
>> +
>> u32_replace_knode(tp, tp_c, new);
>> tcf_unbind_filter(tp, &n->res);
>> call_rcu(&n->rcu, u32_delete_key_rcu);
>> - u32_replace_hw_knode(tp, new, flags);
>> return 0;
>> }
>>
> Are you sure this reordering is OK?
I think so. This reordering is required to support skip-sw semantic of
returning error in case of failure to add to hardware.
It doesn't break the default semantics of adding to both hw and sw as
u32_replace_hw_knode() will not return err if skip-sw is not set.
Thanks
Sridhar
next prev parent reply other threads:[~2016-05-11 23:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 19:18 [PATCH net-next 1/2] net: sched: Move TCA_CLS_FLAGS_SKIP_HW to uapi header file Sridhar Samudrala
2016-05-09 19:18 ` [PATCH net-next 2/2] net: cls_u32: Add support for skip-sw flag to tc u32 classifier Sridhar Samudrala
2016-05-11 23:23 ` David Miller
2016-05-11 23:44 ` Samudrala, Sridhar [this message]
2016-05-12 4:15 ` David Miller
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=5733C3F7.1060800@intel.com \
--to=sridhar.samudrala@intel.com \
--cc=davem@davemloft.net \
--cc=john.r.fastabend@intel.com \
--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 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.