netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: "Nambiar, Amritha" <amritha.nambiar@intel.com>,
	stephen@networkplumber.org, netdev@vger.kernel.org
Cc: jakub.kicinski@netronome.com, sridhar.samudrala@intel.com,
	jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us
Subject: Re: [iproute2-next PATCH v4] tc: flower: Classify packets based port ranges
Date: Mon, 26 Nov 2018 17:43:03 -0700	[thread overview]
Message-ID: <b6f120b8-b864-654c-6bfe-583932b024cf@gmail.com> (raw)
In-Reply-To: <0bce82ec-4f3c-2a56-7d57-f89005ed766c@intel.com>

On 11/26/18 5:23 PM, Nambiar, Amritha wrote:
>> Can tc flower use something similar to ip ru with single port or port
>> range handled like this?
>>
>>     },{
>>         "priority": 32764,
>>         "src": "172.16.1.0",
>>         "srclen": 24,
>>         "ipproto": "tcp",
>>         "sport": 1100,
>>         "table": "main"
>>     },{
>>         "priority": 32765,
>>         "src": "172.16.1.0",
>>         "srclen": 24,
>>         "ipproto": "tcp",
>>         "sport_start": 1000,
>>         "sport_end": 1010,
>>         "table": "main"
>>     },{
>>
>>
> 
> Does it have to be separate fields "sport_start" and "sport_end"?
> Removing the space and 'range' keyword will make the output format
> consistent with the input format and print as "sport <number>" for
> single port and "sport <start>-<end>" for range.
> Example:
> 
> ... flower ip_proto tcp src_port 12 skip_hw action will print as:
>   ip_proto tcp
>   src_port 12
>   skip_hw
>   not_in_hw
>         action
> 
> ... flower ip_proto tcp src_port 100-200 skip_hw action :
>   ip_proto tcp
>   src_port 100-200
>   skip_hw
>   not_in_hw
>         action

non-json output needs to match what the user gives on the command line.

My comment was about consistency with json output when possible. I am
not a json expert by any means. Other commands have a single key value
pair, so I suspect the json here needs to follow suit (ie., not
"src_port": "1000-1010" but separate start and end entries).

  reply	other threads:[~2018-11-27 11:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21  6:17 [iproute2-next PATCH v4] tc: flower: Classify packets based port ranges Amritha Nambiar
2018-11-21 21:42 ` David Ahern
2018-11-27  0:23   ` Nambiar, Amritha
2018-11-27  0:43     ` David Ahern [this message]
2018-11-27  1:56       ` Nambiar, Amritha
2018-11-27  4:02         ` Stephen Hemminger
2018-11-27 21:47           ` Nambiar, Amritha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6f120b8-b864-654c-6bfe-583932b024cf@gmail.com \
    --to=dsahern@gmail.com \
    --cc=amritha.nambiar@intel.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=sridhar.samudrala@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).