[ovs-dev] What is the frag_handling used for?

openvswitcher openvswitcher at 163.com
Wed Sep 9 10:29:39 UTC 2015


When I am reading the source of openvswitch I find the logic about fragment.


rule_dpif_lookup_in_table function:


    (...skip...)


    if (frag && ofproto->up.frag_handling == OFPC_FRAG_NORMAL) {
        /* We must pretend that transport ports are unavailable. */
        struct flow ofpc_normal_flow = *flow;
        ofpc_normal_flow.tp_src = htons(0);
        ofpc_normal_flow.tp_dst = htons(0);
        cls_rule = classifier_lookup(cls, &ofpc_normal_flow, wc);
    } else if (frag && ofproto->up.frag_handling == OFPC_FRAG_DROP) {
        cls_rule = &ofproto->drop_frags_rule->up.cr;
        /* Frag mask in wc already set above. */
    } else {
        cls_rule = classifier_lookup(cls, flow, wc);
    }
    (...skip...)


Is this meaning if the frag_handling flag is set to OFPC_FRAG_DROP then all 
the packet with fragment IP header on will be dropped?
So the drop flow will be installed in kernel?


But I also see the default action is OFPC_FRAG_NORMAL, so I wonder in which case the OFPC_FRAG_DROP should be used?


Looking for your reply. Thank you!







More information about the dev mailing list