From: John Fastabend <john.fastabend@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>,
Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
Jamal Hadi Salim <jhs@mojatatu.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
hariprasad@chelsio.com, leedom@chelsio.com,
nirranjan@chelsio.com, indranil@chelsio.com
Subject: Re: [PATCH net-next 7/7] cxgb4: add support for drop and redirect actions
Date: Mon, 12 Sep 2016 08:17:08 -0700 [thread overview]
Message-ID: <57D6C6F4.7070307@gmail.com> (raw)
In-Reply-To: <20160912085253.GF2021@nanopsycho>
On 16-09-12 01:52 AM, Jiri Pirko wrote:
> Mon, Sep 12, 2016 at 10:12:40AM CEST, rahul.lakkireddy@chelsio.com wrote:
>> Add support for dropping matched packets in hardware. Also add support
>> for re-directing matched packets to a specified port in hardware.
>>
>> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
>> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
>> ---
[...]
>>
>> +/* Fill ch_filter_specification with parsed action. */
>> +static int fill_action_fields(struct adapter *adap,
>> + struct ch_filter_specification *fs,
>> + struct tc_cls_u32_offload *cls)
>> +{
>> + const struct tc_action *a;
>> + struct tcf_exts *exts;
>> + LIST_HEAD(actions);
>> + unsigned int num_actions = 0;
>> + bool found = false;
>> +
>> + exts = cls->knode.exts;
>> + if (tc_no_actions(exts))
>> + return -EINVAL;
>> +
>> + tcf_exts_to_list(exts, &actions);
>> + list_for_each_entry(a, &actions, list) {
>> + /* Don't allow more than one action per rule. */
>> + if (num_actions)
>> + return -EINVAL;
>
>
> Looking at this, unrelated to this patch, we really need some advanced
> reporting to user about what went wrong. Otherwise he's playing a
> guessing game.
>
+1 my recommendation to new users has been to annotate or read the
kernel source when they get errors which is obviously a failure on
our part to build usable error messages.
Note its not even really related to hardware offload its bad just
with software use case and the hardware offloads make it a bit more
mysterious when an error is returned.
Maybe Jamal can add it to his tc-workshop at netdev conference so
we can get some consensus about how to do this.
.John
next prev parent reply other threads:[~2016-09-12 15:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-12 8:12 [PATCH net-next 0/7] cxgb4: add support for offloading TC u32 filters Rahul Lakkireddy
2016-09-12 8:12 ` [PATCH net-next 1/7] cxgb4: move common filter code to separate file Rahul Lakkireddy
2016-09-12 8:12 ` [PATCH net-next 2/7] cxgb4: add common api support for configuring filters Rahul Lakkireddy
2016-09-12 8:57 ` Jiri Pirko
2016-09-12 8:12 ` [PATCH net-next 3/7] cxgb4: add debugfs support to dump filter debug logs Rahul Lakkireddy
2016-09-12 8:36 ` Jiri Pirko
2016-09-12 8:12 ` [PATCH net-next 4/7] cxgb4: add parser to translate u32 filters to internal spec Rahul Lakkireddy
2016-09-12 8:12 ` [PATCH net-next 5/7] cxgb4: add support for setting u32 filters Rahul Lakkireddy
2016-09-12 8:40 ` Jiri Pirko
2016-09-12 8:12 ` [PATCH net-next 6/7] cxgb4: add support for deleting " Rahul Lakkireddy
2016-09-12 8:47 ` Jiri Pirko
2016-09-12 8:12 ` [PATCH net-next 7/7] cxgb4: add support for drop and redirect actions Rahul Lakkireddy
2016-09-12 8:52 ` Jiri Pirko
2016-09-12 15:17 ` John Fastabend [this message]
2016-09-13 9:07 ` [PATCH net-next 0/7] cxgb4: add support for offloading TC u32 filters Rahul Lakkireddy
2016-09-13 16:12 ` 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=57D6C6F4.7070307@gmail.com \
--to=john.fastabend@gmail.com \
--cc=davem@davemloft.net \
--cc=hariprasad@chelsio.com \
--cc=indranil@chelsio.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=leedom@chelsio.com \
--cc=netdev@vger.kernel.org \
--cc=nirranjan@chelsio.com \
--cc=rahul.lakkireddy@chelsio.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 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).