[ovs-dev] [warnings2 1/4] ofp-util: Also force nw_tos to be wildcarded for ARP flows.

Ethan Jackson ethan at nicira.com
Wed May 18 01:35:47 UTC 2011


Looks Good.

Ethan

On Tue, May 10, 2011 at 09:07, Ben Pfaff <blp at nicira.com> wrote:
> OVS doesn't fill nw_tos with anything meaningful for ARP flows so we should
> also force nw_tos to be wildcarded for ARP.
> ---
>  lib/ofp-util.c     |    2 +-
>  tests/ofp-print.at |    6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/ofp-util.c b/lib/ofp-util.c
> index 3afdf3f..b47f306 100644
> --- a/lib/ofp-util.c
> +++ b/lib/ofp-util.c
> @@ -2060,7 +2060,7 @@ normalize_wildcards(const struct ofp_match *m)
>             wc |= htonl(OFPFW_TP);
>         }
>     } else if (m->dl_type == htons(ETH_TYPE_ARP)) {
> -        wc |= htonl(OFPFW_TP);
> +        wc |= htonl(OFPFW_TP | OFPFW_NW_TOS);
>     } else {
>         wc |= htonl(OFPFW_NW | OFPFW_TP);
>     }
> diff --git a/tests/ofp-print.at b/tests/ofp-print.at
> index 417ef48..604267a 100644
> --- a/tests/ofp-print.at
> +++ b/tests/ofp-print.at
> @@ -287,11 +287,11 @@ AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
>  00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
>  00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
>  " 2], [0], [dnl
> -OFPT_FLOW_MOD (xid=0x0): ADD priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2,nw_tos=0 idle:5 buf:0x10e actions=output:3
> +OFPT_FLOW_MOD (xid=0x0): ADD priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2 idle:5 buf:0x10e actions=output:3
>  ], [dnl
>  ofp_util|INFO|normalization changed ofp_match, details:
>  ofp_util|INFO| pre: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2,nw_tos=0,tp_src=0,tp_dst=0
> -ofp_util|INFO|post: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2,nw_tos=0
> +ofp_util|INFO|post: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2
>  ])
>  AT_CLEANUP
>
> @@ -309,7 +309,7 @@ OFPT_FLOW_MOD (xid=0x0): ADD arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50
>  ], [dnl
>  ofp_util|INFO|normalization changed ofp_match, details:
>  ofp_util|INFO| pre: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2,nw_tos=0,tp_src=0,tp_dst=0
> -ofp_util|INFO|post: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2,nw_tos=0
> +ofp_util|INFO|post: arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=2
>  ])
>  AT_CLEANUP
>
> --
> 1.7.4.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>



More information about the dev mailing list