[ovs-discuss] Queries about ovs wildcards

Tahir Rauf tahir.rauf1 at gmail.com
Sun May 29 11:10:29 UTC 2011


I want to clarify some concepts related to wildcards in OVS. My
understanding about wildcards are as follows (Please tell me if I am wrong
at any point)

1. cls_rule.wc.wildcards is a 32-bit filed which holds the wildcards for
in_port, dl_src, dl_dst, dl_type, nw_protocol, tp_src, tp_dst and nw_tos
2. If cls_rule.wc.wildcards =  0x00000040 [ #define FWW_TP_SRC
 ((OVS_FORCE flow_wildcards_t) (1 << 6))]
    then it means that TCP source port is wild carded. i.e. We don't care
about the TCP source port value at all. The incoming packets will match the
flow, whatsoever the value of TCP source port it
    For example, the packet with tp_src value = 2535 and another packet with
tp_src = 3055 both will match (provided that other fields also match with
3. The nw_src, nw_dst, ipv6_src, ipv6_dst, vlan_tci, tun_id all have
seperate mask in struct flow_wildcards.
4. For example, cls_rule.wc.nw_src_mask contains the mask for network source
address. So, if
    cls_rule.wc.nw_src_mask = 0x0000FFFF and
    cls_rule.flow.nw_src = 0xc0a80301(
    then all packets whose network source address starts with "192.168" will
match and corresponding actions will perform on them.

NOTE: I am using 'Next' branch of ovs.

Tahir Rauf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20110529/2e05db11/attachment.html>

More information about the discuss mailing list