All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@netronome.com>
To: Paul Blakey <paulb@mellanox.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	John Fastabend <john.fastabend@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Jiri Pirko <jiri@mellanox.com>,
	Hadar Hen Zion <hadarh@mellanox.com>,
	Or Gerlitz <ogerlitz@mellanox.com>, Roi Dayan <roid@mellanox.com>,
	Roman Mashak <mrv@mojatatu.com>
Subject: Re: [PATCH net-next] net/sched: cls_flower: Add user specified data
Date: Thu, 5 Jan 2017 09:03:21 +0100	[thread overview]
Message-ID: <20170105080320.GA4827@penelope.horms.nl> (raw)
In-Reply-To: <786655e9-de6a-29e9-a043-207afedcedc2@mellanox.com>

On Wed, Jan 04, 2017 at 01:45:28PM +0200, Paul Blakey wrote:
> On 04/01/2017 12:14, Simon Horman wrote:
> >On Tue, Jan 03, 2017 at 02:22:05PM +0200, Paul Blakey wrote:
> >>
> >>On 03/01/2017 13:44, Jamal Hadi Salim wrote:
> >>>On 17-01-02 11:33 PM, John Fastabend wrote:
> >>>>On 17-01-02 05:22 PM, Jamal Hadi Salim wrote:
> >>>[..]
> >>>>>Like all cookie semantics it is for storing state. The receiver
> >>>>>(kernel)
> >>>>>is not just store it and not intepret it. The user when reading it back
> >>>>>simplifies what they have to do for their processing.
> >>>>>
> >>>>>>The tuple <ifindex:qdisc:prio:handle> really should be unique why
> >>>>>>not use this for system wide mappings?
> >>>>>>
> >>>>>I think on a single machine should be enough, however:
> >>>>>typically the user wants to define the value in a manner that
> >>>>>in a distributed system it is unique. It would be trickier to
> >>>>>do so with well defined values such as above.
> >>>>>
> >>>>Just extend the tuple <hostname:ifindex:qdisc:prio:handle> that
> >>>>should be unique in the domain of hostname's, or use some other domain
> >>>>wide machine identifier.
> >>>>
> >>>May work for the case of filter identification. The nice thing for
> >>>allowing cookies is you can let the user define it define their
> >>>own scheme.
> >>>
> >>>>Although actions can be shared so the cookie can be shared across
> >>>>filters. Maybe its useful but it doesn't uniquely identify a filter
> >>>>in the shared case but the user would have to specify that case
> >>>>so maybe its not important.
> >>>>
> >>>Note: the action cookies and filter cookies are unrelated/orthogonal.
> >>>Their basic concept of stashing something in the cookie to help improve
> >>>what user space does (in our case millions of actions of which some are
> >>>used for accounting) is similar.
> >>>I have no objections to the flow cookies; my main concern was it should
> >>>be applicable to all classifiers not just flower. And the arbitrary size
> >>>of the cookie that you pointed out is questionable.
> >>>
> >>>cheers,
> >>>jamal
> >>
> >>Hi all,
> >>Our use case is replacing OVS rules with TC filters for HW offload, and
> >>you're are right the cookie would
> >>have saved us the mapping from OVS rule ufid to the tc filter handle/prio...
> >>that was generated for it.
> >>It also was going to be used to store other info like which OVS output port
> >>corresponds to the ifindex,
> >Possibly off-topic but I am curious to know why you need to store the port.
> >My possibly naïve assumption is that a filter is attached to the netdev
> >corresponding to the input port and mirred or other actions are used to output
> >to netdevs corresponding to output ports.
> 
> Right, its for the output ports, OVS uses ovs port numbers and mirred action
> uses the device ifindex, so there is need
> to translate it back to OVS port on dump.

Understood, that is a tedious abstraction to support.
But I don't see an easy way around it at this time.

If I read Jamal's emails correctly he is working on per-action cookies.
They may be better than per-flow cookies for storing the OvS port number
(though not the UUID of the flow).

...

  reply	other threads:[~2017-01-05  8:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-02 13:13 [PATCH net-next] net/sched: cls_flower: Add user specified data Paul Blakey
2017-01-02 14:59 ` Jamal Hadi Salim
2017-01-02 18:23   ` John Fastabend
2017-01-02 22:21     ` Jamal Hadi Salim
2017-01-02 22:58       ` John Fastabend
2017-01-03  1:22         ` Jamal Hadi Salim
2017-01-03  4:33           ` John Fastabend
2017-01-03 11:44             ` Jamal Hadi Salim
2017-01-03 12:22               ` Paul Blakey
2017-01-04 10:14                 ` Simon Horman
2017-01-04 11:45                   ` Paul Blakey
2017-01-05  8:03                     ` Simon Horman [this message]
2017-01-14 13:06                 ` Jamal Hadi Salim
2017-01-08 17:19       ` Jiri Pirko
2017-01-09 18:23         ` John Fastabend
2017-01-14 12:56           ` Jamal Hadi Salim
2017-01-14 14:48             ` Jiri Pirko
2017-01-14 15:03               ` Jamal Hadi Salim
2017-01-14 15:29                 ` Jiri Pirko
2017-01-14 17:46                   ` Jamal Hadi Salim
2017-01-08 17:15     ` Jiri Pirko
2017-01-08 17:12   ` Jiri Pirko
2017-01-15 17:36     ` Paul Blakey
2017-01-15 19:08       ` John Fastabend
2017-01-16  7:54         ` Paul Blakey
2017-01-16  9:51           ` Jiri Pirko
2017-01-17 11:23             ` Jamal Hadi Salim
2017-01-17 11:53               ` Paul Blakey
2017-01-18 11:06                 ` Jamal Hadi Salim

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=20170105080320.GA4827@penelope.horms.nl \
    --to=simon.horman@netronome.com \
    --cc=davem@davemloft.net \
    --cc=hadarh@mellanox.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@mellanox.com \
    --cc=john.fastabend@gmail.com \
    --cc=mrv@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=paulb@mellanox.com \
    --cc=roid@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.