From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [iproute2-next PATCH v3 2/2] man: tc-flower: Add explanation for range option Date: Tue, 20 Nov 2018 15:56:56 -0700 Message-ID: <1c2cee31-af86-e285-c9d9-09a3105daa4b@gmail.com> References: <154232971379.10668.16416943966699679792.stgit@anamhost.jf.intel.com> <154232971889.10668.16009642596079446767.stgit@anamhost.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: jakub.kicinski@netronome.com, sridhar.samudrala@intel.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us To: Amritha Nambiar , stephen@networkplumber.org, netdev@vger.kernel.org Return-path: Received: from mail-pl1-f194.google.com ([209.85.214.194]:40907 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725887AbeKUJ2f (ORCPT ); Wed, 21 Nov 2018 04:28:35 -0500 Received: by mail-pl1-f194.google.com with SMTP id b22-v6so2447635pls.7 for ; Tue, 20 Nov 2018 14:57:00 -0800 (PST) In-Reply-To: <154232971889.10668.16009642596079446767.stgit@anamhost.jf.intel.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/15/18 5:55 PM, Amritha Nambiar wrote: > Add details explaining filtering based on port ranges. > > Signed-off-by: Amritha Nambiar > --- > man/man8/tc-flower.8 | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/man/man8/tc-flower.8 b/man/man8/tc-flower.8 > index 8be8882..768bfa1 100644 > --- a/man/man8/tc-flower.8 > +++ b/man/man8/tc-flower.8 > @@ -56,8 +56,10 @@ flower \- flow based traffic control filter > .IR MASKED_IP_TTL " | { " > .BR dst_ip " | " src_ip " } " > .IR PREFIX " | { " > -.BR dst_port " | " src_port " } " > -.IR port_number " } | " > +.BR dst_port " | " src_port " } { " > +.IR port_number " | " > +.B range > +.IR min_port_number-max_port_number " } | " > .B tcp_flags > .IR MASKED_TCP_FLAGS " | " > .B type > @@ -227,6 +229,12 @@ Match on layer 4 protocol source or destination port number. Only available for > .BR ip_proto " values " udp ", " tcp " and " sctp > which have to be specified in beforehand. > .TP > +.BI range " MIN_VALUE-MAX_VALUE" > +Match on a range of layer 4 protocol source or destination port number. Only > +available for > +.BR ip_proto " values " udp ", " tcp " and " sctp > +which have to be specified in beforehand. > +.TP > .BI tcp_flags " MASKED_TCP_FLAGS" > Match on TCP flags represented as 12bit bitfield in in hexadecimal format. > A mask may be optionally provided to limit the bits which are matched. A mask > This prints as: dst_port NUMBER src_port NUMBER Match on layer 4 protocol source or destination port number. Only available for ip_proto values udp, tcp and sctp which have to be specified in beforehand. range MIN_VALUE-MAX_VALUE Match on a range of layer 4 protocol source or destination port number. Only available for ip_proto values udp, tcp and sctp which have to be specified in beforehand. ### That makes it look like range is a standalone option - independent of dst_port/src_port. It seems to me the dst_port / src_port should be updated to: dst_port {NUMBER | range MIN_VALUE-MAX_VALUE} with the description updated for both options and indented under dst_port / src_port