* [PATCH iproute2 net-next] ip: mroute: Print offload indication
@ 2017-10-08 14:43 Yotam Gigi
2017-10-11 17:55 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Yotam Gigi @ 2017-10-08 14:43 UTC (permalink / raw)
To: netdev; +Cc: stephen, davem, mlxsw, Yotam Gigi
Since kernel net-next commit c7c0bbeae950 ("net: ipmr: Add MFC offload
indication") the kernel indicates on an MFC entry whether it was offloaded
using the RTNH_F_OFFLOAD flag. Update the "ip mroute show" command to
indicate when a route is offloaded, similarly to the "ip route show"
command.
Example output:
$ ip mroute
(0.0.0.0, 239.255.0.1) Iif: sw1p7 Oifs: t_br0 State: resolved offload
(192.168.1.1, 239.255.0.1) Iif: sw1p7 Oifs: sw1p4 State: resolved offload
Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
---
ip/ipmroute.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ip/ipmroute.c b/ip/ipmroute.c
index b51c23c..453a6cf 100644
--- a/ip/ipmroute.c
+++ b/ip/ipmroute.c
@@ -161,6 +161,8 @@ int print_mroute(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
}
fprintf(fp, " State: %s",
r->rtm_flags & RTNH_F_UNRESOLVED ? "unresolved" : "resolved");
+ if (r->rtm_flags & RTNH_F_OFFLOAD)
+ fprintf(fp, " offload");
if (show_stats && tb[RTA_MFC_STATS]) {
struct rta_mfc_stats *mfcs = RTA_DATA(tb[RTA_MFC_STATS]);
--
2.8.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2 net-next] ip: mroute: Print offload indication
2017-10-08 14:43 [PATCH iproute2 net-next] ip: mroute: Print offload indication Yotam Gigi
@ 2017-10-11 17:55 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2017-10-11 17:55 UTC (permalink / raw)
To: Yotam Gigi; +Cc: netdev, davem, mlxsw
On Sun, 8 Oct 2017 17:43:04 +0300
Yotam Gigi <yotamg@mellanox.com> wrote:
> Since kernel net-next commit c7c0bbeae950 ("net: ipmr: Add MFC offload
> indication") the kernel indicates on an MFC entry whether it was offloaded
> using the RTNH_F_OFFLOAD flag. Update the "ip mroute show" command to
> indicate when a route is offloaded, similarly to the "ip route show"
> command.
>
> Example output:
> $ ip mroute
> (0.0.0.0, 239.255.0.1) Iif: sw1p7 Oifs: t_br0 State: resolved offload
> (192.168.1.1, 239.255.0.1) Iif: sw1p7 Oifs: sw1p4 State: resolved offload
>
> Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
Looks good, applied.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-11 17:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-08 14:43 [PATCH iproute2 net-next] ip: mroute: Print offload indication Yotam Gigi
2017-10-11 17: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.