[ovs-dev] [PATCH] conntrack: add display support for sctp

Aaron Conole aconole at redhat.com
Mon May 20 15:20:11 UTC 2019


David Marchand <david.marchand at redhat.com> writes:

> On Fri, May 17, 2019 at 6:05 PM Aaron Conole <aconole at redhat.com> wrote:
>
>  Currently, only the netlink datapath supports SCTP connection tracking,
>  but at least this removes the warning message that will pop up when
>  running something like:
>
>     ovs-appctl dpctl/dump-conntrack
>
>  This doesn't impact any conntrack functionality, just the display.
>
>  Signed-off-by: Aaron Conole <aconole at redhat.com>
>  ---
>  I did the heartbeat states by hardcoding the values in the ENUM since
>  they are fixed in the linux UAPI, and have existed for a long time,
>  but it could also make sense to rework this patch so that those states
>  are omitted by the ifdef rather than defining them (I'll submit a v2
>  if that's preferred approach - but this seems like the more flexible
>  option).
>
>   acinclude.m4            | 12 +++++++
>   configure.ac            |  1 +
>   lib/ct-dpif.c           | 19 +++++++++++
>   lib/ct-dpif.h           | 30 ++++++++++++++++++
>   lib/netlink-conntrack.c | 70 ++++++++++++++++++++++++++++++++++++++++-
>   5 files changed, 131 insertions(+), 1 deletion(-)
>
> [snip]
>
>  @@ -497,6 +503,16 @@ ct_dpif_format_protoinfo_tcp_verbose(struct ds *ds,
>                            tcp_flags);
>   }
>
>  +static void
>  +ct_dpif_format_protoinfo_sctp(struct ds *ds,
>  +                              const struct ct_dpif_protoinfo *protoinfo)
>  +{
>  +    ct_dpif_format_enum(ds, "state=", protoinfo->sctp.state,
>  +                        ct_dpif_sctp_state_string);
>  +    ds_put_format(ds, ",vtag_orig=%u,vtag_reply=%u", protoinfo->sctp.vtag_orig,
>  +                  protoinfo->sctp.vtag_reply);
>
> PRIu32 for both of them?

Sure - that makes sense.  I'll spin a v3.


More information about the dev mailing list