From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [iproute2 PATCH] tc: flower: Classify packets based port ranges Date: Thu, 18 Oct 2018 14:21:36 +0200 Message-ID: <20181018122136.GB4558@nanopsycho.orion> References: <153935248286.11074.7540456677759477097.stgit@anamhost.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: stephen@networkplumber.org, netdev@vger.kernel.org, jakub.kicinski@netronome.com, sridhar.samudrala@intel.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com To: Amritha Nambiar Return-path: Received: from mail-wr1-f65.google.com ([209.85.221.65]:46616 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbeJRU2D (ORCPT ); Thu, 18 Oct 2018 16:28:03 -0400 Received: by mail-wr1-f65.google.com with SMTP id n11-v6so33392405wru.13 for ; Thu, 18 Oct 2018 05:27:15 -0700 (PDT) Content-Disposition: inline In-Reply-To: <153935248286.11074.7540456677759477097.stgit@anamhost.jf.intel.com> Sender: netdev-owner@vger.kernel.org List-ID: Fri, Oct 12, 2018 at 03:54:42PM CEST, amritha.nambiar@intel.com wrote: [...] >@@ -1516,6 +1625,22 @@ static int flower_print_opt(struct filter_util *qu, FILE *f, > if (nl_type >= 0) > flower_print_port("src_port", tb[nl_type]); > >+ if (flower_port_range_attr_type(ip_proto, FLOWER_ENDPOINT_DST, &range) >+ == 0) { >+ flower_print_port_range("dst_port_min", >+ tb[range.min_port_type]); >+ flower_print_port_range("dst_port_max", >+ tb[range.max_port_type]); The input and output of iproute2 utils, tc included should be in sync. So you need to print "range x-y" here. >+ } >+ >+ if (flower_port_range_attr_type(ip_proto, FLOWER_ENDPOINT_SRC, &range) >+ == 0) { >+ flower_print_port_range("src_port_min", >+ tb[range.min_port_type]); >+ flower_print_port_range("src_port_max", >+ tb[range.max_port_type]); >+ } >+ > flower_print_tcp_flags("tcp_flags", tb[TCA_FLOWER_KEY_TCP_FLAGS], > tb[TCA_FLOWER_KEY_TCP_FLAGS_MASK]); > >