All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute] qdisc: Print offload indication
@ 2017-12-26  9:48 Yuval Mintz
  2017-12-26 11:16 ` Jiri Pirko
  2017-12-27 21:55 ` Stephen Hemminger
  0 siblings, 2 replies; 4+ messages in thread
From: Yuval Mintz @ 2017-12-26  9:48 UTC (permalink / raw)
  To: netdev, stephen; +Cc: mlxsw, Yuval Mintz

Use the newly added TCA_HW_OFFLOAD indication from kernel
to print a consistent 'offloaded' message to user when listing qdiscs.

Signed-off-by: Yuval Mintz <yuvalm@mellanox.com>
---
 include/uapi/linux/rtnetlink.h | 1 +
 tc/tc_qdisc.c                  | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index b8335b5..13bf56f 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -557,6 +557,7 @@ enum {
 	TCA_PAD,
 	TCA_DUMP_INVISIBLE,
 	TCA_CHAIN,
+	TCA_HW_OFFLOAD,
 	__TCA_MAX
 };
 
diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c
index 4431d5f..70279b9 100644
--- a/tc/tc_qdisc.c
+++ b/tc/tc_qdisc.c
@@ -266,6 +266,10 @@ int print_qdisc(const struct sockaddr_nl *who,
 	if (t->tcm_info != 1)
 		print_uint(PRINT_ANY, "refcnt", "refcnt %u ", t->tcm_info);
 
+	if (tb[TCA_HW_OFFLOAD] &&
+	    (rta_getattr_u8(tb[TCA_HW_OFFLOAD])))
+		print_bool(PRINT_ANY, "offloaded", "offloaded ", true);
+
 	/* pfifo_fast is generic enough to warrant the hardcoding --JHS */
 	if (strcmp("pfifo_fast", RTA_DATA(tb[TCA_KIND])) == 0)
 		q = get_qdisc_kind("prio");
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH iproute] qdisc: Print offload indication
  2017-12-26  9:48 [PATCH iproute] qdisc: Print offload indication Yuval Mintz
@ 2017-12-26 11:16 ` Jiri Pirko
  2017-12-26 16:14   ` Yuval Mintz
  2017-12-27 21:55 ` Stephen Hemminger
  1 sibling, 1 reply; 4+ messages in thread
From: Jiri Pirko @ 2017-12-26 11:16 UTC (permalink / raw)
  To: Yuval Mintz; +Cc: netdev, stephen, mlxsw

Tue, Dec 26, 2017 at 10:48:45AM CET, yuvalm@mellanox.com wrote:
>Use the newly added TCA_HW_OFFLOAD indication from kernel
>to print a consistent 'offloaded' message to user when listing qdiscs.
>
>Signed-off-by: Yuval Mintz <yuvalm@mellanox.com>

Reviewed-by: Jiri Pirko <jiri@mellanox.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH iproute] qdisc: Print offload indication
  2017-12-26 11:16 ` Jiri Pirko
@ 2017-12-26 16:14   ` Yuval Mintz
  0 siblings, 0 replies; 4+ messages in thread
From: Yuval Mintz @ 2017-12-26 16:14 UTC (permalink / raw)
  To: stephen@networkplumber.org, David Ahern
  Cc: netdev@vger.kernel.org, mlxsw, Jiri Pirko

> >Use the newly added TCA_HW_OFFLOAD indication from kernel
> >to print a consistent 'offloaded' message to user when listing qdiscs.
> >
> >Signed-off-by: Yuval Mintz <yuvalm@mellanox.com>
> 
> Reviewed-by: Jiri Pirko <jiri@mellanox.com>

Just now saw the Stephen's e-mail regarding iproute's net-next branch.
In this case the new uapi needed was pushed to 'net'. Does this mean you're
Going to take it to the master or net-next branch?

If the latter, it doesn't apply cleanly on David's branch since he already
updated the kernel headers in include/uapi/linux/rtnetlink.h.
It's trivial, but tell me if you want a re-spin.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH iproute] qdisc: Print offload indication
  2017-12-26  9:48 [PATCH iproute] qdisc: Print offload indication Yuval Mintz
  2017-12-26 11:16 ` Jiri Pirko
@ 2017-12-27 21:55 ` Stephen Hemminger
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2017-12-27 21:55 UTC (permalink / raw)
  To: Yuval Mintz; +Cc: netdev, mlxsw

On Tue, 26 Dec 2017 11:48:45 +0200
Yuval Mintz <yuvalm@mellanox.com> wrote:

> Use the newly added TCA_HW_OFFLOAD indication from kernel
> to print a consistent 'offloaded' message to user when listing qdiscs.
> 
> Signed-off-by: Yuval Mintz <yuvalm@mellanox.com>

Applied to master (since TCA_HW_OFFLOAD is already present).

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-27 21:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-26  9:48 [PATCH iproute] qdisc: Print offload indication Yuval Mintz
2017-12-26 11:16 ` Jiri Pirko
2017-12-26 16:14   ` Yuval Mintz
2017-12-27 21:55 ` Stephen Hemminger

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.