[ovs-dev] Why the IP is not parsed in function parse_8021q_onward

openvswitcher openvswitcher at 163.com
Thu Sep 17 15:43:49 UTC 2015


Hi, all


I want to ask a question about the function parse_8021q_onward.


(...skip...)
    if (!is_mask) {
        if (!(present_attrs & (UINT64_C(1) << OVS_KEY_ATTR_VLAN))) {
            return ODP_FIT_TOO_LITTLE;
        } else if (flow->vlan_tci == htons(0)) {
            /* Corner case for a truncated 802.1Q header. */
            if (fitness == ODP_FIT_PERFECT && nl_attr_get_size(encap)) {
                return ODP_FIT_TOO_MUCH;
            }
            return fitness; ★★★★★★★★★★★★★★★
        } else if (!(flow->vlan_tci & htons(VLAN_CFI))) {
            VLOG_ERR_RL(&rl, "OVS_KEY_ATTR_VLAN 0x%04"PRIx16" is nonzero "
                        "but CFI bit is not set", ntohs(flow->vlan_tci));
            return ODP_FIT_ERROR;
        }
    } 
(...skip...)


Why the ★★★★★★★★★★★★★★★ return directly without parsing the IP and Transport Level header.


Looking forward to your reply.


Thanks.





More information about the dev mailing list