All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Buslov <vladbu@mellanox.com>
To: Davide Caratti <dcaratti@redhat.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH iproute2-next] tc: flower: expose hardware offload count
Date: Wed, 3 Oct 2018 16:25:00 +0000	[thread overview]
Message-ID: <vbfpnwrov58.fsf@reg-r-vrt-018-180.mtr.labs.mlnx> (raw)
In-Reply-To: <9e205b2676a409c7f586f28ce1a26aa26ae119d0.camel@redhat.com>


On Wed 03 Oct 2018 at 16:08, Davide Caratti <dcaratti@redhat.com> wrote:
> On Wed, 2018-10-03 at 18:29 +0300, Vlad Buslov wrote:
>> Recently flower classifier was updated to expose count of devices that
>> filter is offloaded to. Add support to print this counter as 'in_hw_count'.
>> 
>> Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
>> Acked-by: Jiri Pirko <jiri@mellanox.com>
>> ---
>>  tc/f_flower.c | 10 +++++++++-
>>  1 file changed, 9 insertions(+), 1 deletion(-)
>> 
>> diff --git a/tc/f_flower.c b/tc/f_flower.c
>> index 59e5f572c542..cbacc664d397 100644
>
> hello Vlad!
>
>> --- a/tc/f_flower.c
>> +++ b/tc/f_flower.c
>> @@ -1585,8 +1585,16 @@ static int flower_print_opt(struct filter_util *qu, FILE *f,
>>  		if (flags & TCA_CLS_FLAGS_SKIP_SW)
>>  			print_bool(PRINT_ANY, "skip_sw", "\n  skip_sw", true);
>>  
>> -		if (flags & TCA_CLS_FLAGS_IN_HW)
>> +		if (flags & TCA_CLS_FLAGS_IN_HW) {
>>  			print_bool(PRINT_ANY, "in_hw", "\n  in_hw", true);
>> +
>> +			if (tb[TCA_FLOWER_IN_HW_COUNT]) {
>> +				__u32 count = rta_getattr_u32(tb[TCA_FLOWER_IN_HW_COUNT]);
>> +
>> +				print_uint(PRINT_ANY, "in_hw_count",
>> +					   " in_hw_count %d", count);
> ^^ maybe using %u in the format is better?
>
> thanks!

Hello Davide!

Sure. I'll send V2 with "%u".

Thanks,
Vlad

      reply	other threads:[~2018-10-03 23:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 15:29 [PATCH iproute2-next] tc: flower: expose hardware offload count Vlad Buslov
2018-10-03 16:08 ` Davide Caratti
2018-10-03 16:25   ` Vlad Buslov [this message]

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=vbfpnwrov58.fsf@reg-r-vrt-018-180.mtr.labs.mlnx \
    --to=vladbu@mellanox.com \
    --cc=dcaratti@redhat.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.