[ovs-dev] [PATCH 30/41] erspan: Add flow-based erspan options
Ben Pfaff
blp at ovn.org
Thu May 17 23:14:27 UTC 2018
On Thu, May 17, 2018 at 02:15:22PM -0700, Greg Rose wrote:
> From: William Tu <u9012063 at gmail.com>
>
> The patch add supports for flow-based erspan options.
> The erspan_ver, erspan_idx, erspan_dir, and erspan_hwid can be
> set as "flow" so that its value is set by the openflow rule,
> instead of statically configured at port creation time.
>
> Signed-off-by: William Tu <u9012063 at gmail.com>
> ---
> lib/match.c | 8 ++--
> lib/netdev-native-tnl.c | 32 +++++++++++--
> lib/netdev-vport.c | 120 +++++++++++++++++++++++++++++++++--------------
> lib/netdev.h | 5 ++
> ofproto/tunnel.c | 11 +++--
> tests/tunnel-push-pop.at | 35 +++++++++++++-
> tests/tunnel.at | 68 +++++++++++++++++++++++----
> 7 files changed, 221 insertions(+), 58 deletions(-)
>
> diff --git a/lib/match.c b/lib/match.c
> index f1b450c..5305dbd 100644
> --- a/lib/match.c
> +++ b/lib/match.c
> @@ -1288,16 +1288,16 @@ format_flow_tunnel(struct ds *s, const struct match *match)
> ds_put_format(s, "tun_ttl=%"PRIu8",", tnl->ip_ttl);
> }
> if (wc->masks.tunnel.erspan_ver) {
> - ds_put_format(s, "erspan_ver=%"PRIu8",", tnl->erspan_ver);
> + ds_put_format(s, "tun_erspan_ver=%"PRIu8",", tnl->erspan_ver);
> }
> if (wc->masks.tunnel.erspan_idx && tnl->erspan_ver == 1) {
> - ds_put_format(s, "erspan_idx=%#"PRIx32",", tnl->erspan_idx);
> + ds_put_format(s, "tun_erspan_idx=%#"PRIx32",", tnl->erspan_idx);
> }
> if (wc->masks.tunnel.erspan_dir && tnl->erspan_ver == 2) {
> - ds_put_format(s, "erspan_dir=%"PRIu8",", tnl->erspan_dir);
> + ds_put_format(s, "tun_erspan_dir=%"PRIu8",", tnl->erspan_dir);
> }
> if (wc->masks.tunnel.erspan_hwid && tnl->erspan_ver == 2) {
> - ds_put_format(s, "erspan_hwid=%#"PRIx8",", tnl->erspan_hwid);
> + ds_put_format(s, "tun_erspan_hwid=%#"PRIx8",", tnl->erspan_hwid);
> }
> if (wc->masks.tunnel.flags & FLOW_TNL_F_MASK) {
> format_flags_masked(s, "tun_flags", flow_tun_flag_to_string,
I suspect that the above part of the change should be folded into the
previous patch that introduced the erspan fields.
Thanks,
Ben.
More information about the dev
mailing list