mbox series

[iproute2,v3,0/2] vxlan: option printing

Message ID 20230525165922.9711-1-stephen@networkplumber.org (mailing list archive)
Headers show
Series vxlan: option printing | expand

Message

Stephen Hemminger May 25, 2023, 4:59 p.m. UTC
This patchset makes printing of vxlan details more consistent.
It also adds extra verbose output.

Before:
$ ip -d link show dev vxlan0
4: vxlan0: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether e6:a4:54:b2:34:85 brd ff:ff:ff:ff:ff:ff promiscuity 0  allmulti 0 minmtu 68 maxmtu 65535 
    vxlan id 42 group 239.1.1.1 dev enp2s0 srcport 0 0 dstport 4789 ttl auto ageing 300 udpcsum noudp6zerocsumtx noudp6zerocsumrx addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 64000 gso_max_segs 64 tso_max_size 64000 tso_max_segs 64 gro_max_size 65536 

After:
$ ip -d link show dev vxlan0
4: vxlan0: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether e6:a4:54:b2:34:85 brd ff:ff:ff:ff:ff:ff promiscuity 0  allmulti 0 minmtu 68 maxmtu 65535 
    vxlan id 42 group 239.1.1.1 dev enp2s0 srcport 0 0 dstport 4789 ttl auto ageing 300 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 64000 gso_max_segs 64 tso_max_size 64000 tso_max_segs 64 gro_max_size 65536

To get all settings, use multiple detail flags
$ ip -d -d link show dev vxlan0
4: vxlan0: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether e6:a4:54:b2:34:85 brd ff:ff:ff:ff:ff:ff promiscuity 0  allmulti 0 minmtu 68 maxmtu 65535 
    vxlan noexternal id 42 group 239.1.1.1 dev enp2s0 srcport 0 0 dstport 4789 learning noproxy norsc nol2miss nol3miss ttl auto ageing 300 udp_csum noudp_zero_csum6_tx noudp_zero_csum6_rx noremcsum_tx noremcsum_rx addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 64000 gso_max_segs 64 tso_max_size 64000 tso_max_segs 64 gro_max_size 65536

Stephen Hemminger (2):
  vxlan: use print_nll for gbp and gpe
  vxlan: make option printing more consistent

 include/json_print.h |  9 +++++
 ip/iplink_vxlan.c    | 95 ++++++++++----------------------------------
 lib/json_print.c     | 19 +++++++++
 3 files changed, 48 insertions(+), 75 deletions(-)

Comments

Andrea Claudi May 25, 2023, 9:08 p.m. UTC | #1
On Thu, May 25, 2023 at 09:59:20AM -0700, Stephen Hemminger wrote:
> This patchset makes printing of vxlan details more consistent.
> It also adds extra verbose output.
> 
> Before:
> $ ip -d link show dev vxlan0
> 4: vxlan0: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN mode DEFAULT group default qlen 1000
>     link/ether e6:a4:54:b2:34:85 brd ff:ff:ff:ff:ff:ff promiscuity 0  allmulti 0 minmtu 68 maxmtu 65535 
>     vxlan id 42 group 239.1.1.1 dev enp2s0 srcport 0 0 dstport 4789 ttl auto ageing 300 udpcsum noudp6zerocsumtx noudp6zerocsumrx addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 64000 gso_max_segs 64 tso_max_size 64000 tso_max_segs 64 gro_max_size 65536 
> 
> After:
> $ ip -d link show dev vxlan0
> 4: vxlan0: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN mode DEFAULT group default qlen 1000
>     link/ether e6:a4:54:b2:34:85 brd ff:ff:ff:ff:ff:ff promiscuity 0  allmulti 0 minmtu 68 maxmtu 65535 
>     vxlan id 42 group 239.1.1.1 dev enp2s0 srcport 0 0 dstport 4789 ttl auto ageing 300 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 64000 gso_max_segs 64 tso_max_size 64000 tso_max_segs 64 gro_max_size 65536
> 
> To get all settings, use multiple detail flags
> $ ip -d -d link show dev vxlan0
> 4: vxlan0: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN mode DEFAULT group default qlen 1000
>     link/ether e6:a4:54:b2:34:85 brd ff:ff:ff:ff:ff:ff promiscuity 0  allmulti 0 minmtu 68 maxmtu 65535 
>     vxlan noexternal id 42 group 239.1.1.1 dev enp2s0 srcport 0 0 dstport 4789 learning noproxy norsc nol2miss nol3miss ttl auto ageing 300 udp_csum noudp_zero_csum6_tx noudp_zero_csum6_rx noremcsum_tx noremcsum_rx addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 64000 gso_max_segs 64 tso_max_size 64000 tso_max_segs 64 gro_max_size 65536
> 
> Stephen Hemminger (2):
>   vxlan: use print_nll for gbp and gpe
>   vxlan: make option printing more consistent
> 
>  include/json_print.h |  9 +++++
>  ip/iplink_vxlan.c    | 95 ++++++++++----------------------------------
>  lib/json_print.c     | 19 +++++++++
>  3 files changed, 48 insertions(+), 75 deletions(-)
> 
> -- 
> 2.39.2
> 
>

That's perfect for me, thanks Stephen.

Maybe the PRINT_VXLAN_OPTION macro can be moved to json_print.h to be
reused in other parts of iproute, but we can do that if and when we'll
need it.

Acked-by: Andrea Claudi <aclaudi@redhat.com>