[ovs-dev] [PATCH] OVN: add the possibility to specify tunnel dst port
Numan Siddique
nusiddiq at redhat.com
Fri Jun 28 10:57:02 UTC 2019
On Tue, Jun 25, 2019 at 4:06 PM Lorenzo Bianconi <
lorenzo.bianconi at redhat.com> wrote:
> Introduce dst_port in options column of Encap table in order to add the
> capability to configure destination port used for tunnel encapsulation
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi at redhat.com>
>
Acked-by: Numan Siddique <nusiddiq at redhat.com>
> ---
> ovn/controller/encaps.c | 4 ++++
> ovn/ovn-sb.xml | 8 +++++++-
> 2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/ovn/controller/encaps.c b/ovn/controller/encaps.c
> index 3b3921a73..d4a436df3 100644
> --- a/ovn/controller/encaps.c
> +++ b/ovn/controller/encaps.c
> @@ -156,6 +156,7 @@ tunnel_add(struct tunnel_ctx *tc, const struct
> sbrec_sb_global *sbg,
> struct smap options = SMAP_INITIALIZER(&options);
> smap_add(&options, "remote_ip", encap->ip);
> smap_add(&options, "key", "flow");
> + const char *dst_port = smap_get(&encap->options, "dst_port");
> const char *csum = smap_get(&encap->options, "csum");
> char *tunnel_entry_id = NULL;
>
> @@ -169,6 +170,9 @@ tunnel_add(struct tunnel_ctx *tc, const struct
> sbrec_sb_global *sbg,
> if (csum && (!strcmp(csum, "true") || !strcmp(csum, "false"))) {
> smap_add(&options, "csum", csum);
> }
> + if (dst_port) {
> + smap_add(&options, "dst_port", dst_port);
> + }
>
> /* Add auth info if ipsec is enabled. */
> if (sbg->ipsec) {
> diff --git a/ovn/ovn-sb.xml b/ovn/ovn-sb.xml
> index 1a2bc1da9..2dae2768f 100644
> --- a/ovn/ovn-sb.xml
> +++ b/ovn/ovn-sb.xml
> @@ -364,7 +364,8 @@
> <column name="options">
> <p>
> Options for configuring the encapsulation. Currently, the only
> - option that has been defined is <code>csum</code>.
> + options that has been defined are <code>csum</code> and
> + <code>dst_port</code>.
> </p>
>
> <p>
> @@ -408,6 +409,11 @@
> <code>csum</code> defaults to <code>false</code> for hardware
> VTEPs and
> <code>true</code> for all other cases.
> </p>
> +
> + <p>
> + <code>dst_port</code> is used to define the destination port used
> + in tunnel encapsulation
> + </p>
> </column>
>
> <column name="ip">
> --
> 2.21.0
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
More information about the dev
mailing list