From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nambiar, Amritha" Subject: Re: [net-next PATCH v3] net: sched: cls_flower: Classify packets using port ranges Date: Mon, 12 Nov 2018 15:54:47 -0800 Message-ID: References: <154180867008.52041.3062211283036334314.stgit@anamhost.jf.intel.com> <20181110071458.GA2019@nanopsycho.orion> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, davem@davemloft.net, jakub.kicinski@netronome.com, sridhar.samudrala@intel.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com To: Jiri Pirko Return-path: Received: from mga17.intel.com ([192.55.52.151]:2391 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbeKMJuN (ORCPT ); Tue, 13 Nov 2018 04:50:13 -0500 In-Reply-To: <20181110071458.GA2019@nanopsycho.orion> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/9/2018 11:14 PM, Jiri Pirko wrote: > Sat, Nov 10, 2018 at 01:11:10AM CET, amritha.nambiar@intel.com wrote: > > [...] > >> @@ -1026,8 +1122,7 @@ static void fl_init_dissector(struct flow_dissector *dissector, >> FLOW_DISSECTOR_KEY_IPV4_ADDRS, ipv4); >> FL_KEY_SET_IF_MASKED(mask, keys, cnt, >> FLOW_DISSECTOR_KEY_IPV6_ADDRS, ipv6); >> - FL_KEY_SET_IF_MASKED(mask, keys, cnt, >> - FLOW_DISSECTOR_KEY_PORTS, tp); >> + FL_KEY_SET(keys, cnt, FLOW_DISSECTOR_KEY_PORTS, tp); > > You still need to set the key under a condition. Something like: > if (FL_KEY_IS_MASKED(mask, tp) || > FL_KEY_IS_MASKED(mask, tp_min) || > FL_KEY_IS_MASKED(mask, tp_max) > FL_KEY_SET(keys, cnt, FLOW_DISSECTOR_KEY_PORTS, tp); > Yes, will do. Thanks! > >> FL_KEY_SET_IF_MASKED(mask, keys, cnt, >> FLOW_DISSECTOR_KEY_IP, ip); >> FL_KEY_SET_IF_MASKED(mask, keys, cnt, > > [...] >