[ovs-dev] [PATCH 4/5] flow: Only un-wildcard relevant IP headers.
Justin Pettit
jpettit at nicira.com
Fri Jun 28 18:36:45 UTC 2013
On Jun 28, 2013, at 1:00 AM, "Rajahalme, Jarno (NSN - FI/Espoo)" <jarno.rajahalme at nsn.com> wrote:
>> + if (flow->dl_type == htons(ETH_TYPE_IP)) {
>> + memset(&wc->masks.nw_src, 0xff, sizeof wc->masks.nw_src);
>> + memset(&wc->masks.nw_dst, 0xff, sizeof wc->masks.nw_dst);
>> + } else {
>> + memset(&wc->masks.ipv6_src, 0xff, sizeof wc->masks.ipv6_src);
>> + memset(&wc->masks.ipv6_dst, 0xff, sizeof wc->masks.ipv6_dst);
>> + }
>> + if (is_ip_any(flow)) {
>> + memset(&wc->masks.nw_proto, 0xff, sizeof wc->masks.nw_proto);
>> + memset(&wc->masks.tp_src, 0xff, sizeof wc->masks.tp_src);
>> + memset(&wc->masks.tp_dst, 0xff, sizeof wc->masks.tp_dst);
>> + }
>
> Why bother checking for is_ip_any, when you already assume above that it is either IPv4 or IPv6?
Thanks. I've now got a patch in the queue to fix that.
--Justin
More information about the dev
mailing list