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

Ben Pfaff blp at nicira.com
Wed Sep 9 15:43:00 UTC 2015


On Wed, Sep 09, 2015 at 06:29:39PM +0800, openvswitcher wrote:
> 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?

Yes.

> So the drop flow will be installed in kernel?

Yes.

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

When an OpenFlow controller configures OFPC_FRAG_DROP mode.



More information about the dev mailing list