All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Yotam Gigi <yotamg@mellanox.com>
Cc: Jiri Pirko <jiri@resnulli.us>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Ido Schimmel <idosch@mellanox.com>, Elad Raz <eladr@mellanox.com>,
	Nogah Frankel <nogahf@mellanox.com>,
	Or Gerlitz <ogerlitz@mellanox.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	"geert+renesas@glider.be" <geert+renesas@glider.be>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Roopa Prabhu <roopa@cumulusnetworks.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Simon Horman <simon.horman@netronome.com>,
	Roman Mashak <mrv@mojatatu.com>
Subject: Re: [patch net-next v2 2/4] net/sched: Introduce sample tc action
Date: Mon, 30 Jan 2017 21:57:11 -0800	[thread overview]
Message-ID: <CAM_iQpUK7OiQ0+521W+uoR-O8=BAO5=BU1oNkB7qTd8vo3B57A@mail.gmail.com> (raw)
In-Reply-To: <DB3PR05MB0764257D27CD1EFA14207705AC4B0@DB3PR05MB0764.eurprd05.prod.outlook.com>

On Mon, Jan 30, 2017 at 8:49 AM, Yotam Gigi <yotamg@mellanox.com> wrote:
>
> Cong, after some thinking I think I don't really need the tcf_lock here. I
> don't really care if the truncate, trunc_size, rate and tcf_action are
> consistent among themselves - the only parameter that I care about is the
> psample_group pointer, and it is protected via RCU. As far as I see, there is
> no need to lock here.

OK, I trust you, you should know the logic better than me.

>
> I do need to take the tcf_lock to protect the statistics update in the
> tcf_sample_act code, as far as I see.
>

Hm? You use percpu stats, so you don't need spinlock.

  reply	other threads:[~2017-01-31  5:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 10:07 [patch net-next v2 0/4] Add support for offloading packet-sampling Jiri Pirko
2017-01-23 10:07 ` [patch net-next v2 1/4] net: Introduce psample, a new genetlink channel for packet sampling Jiri Pirko
2017-01-24  8:32   ` Simon Horman
2017-01-24  8:37     ` Jiri Pirko
2017-01-24 11:48       ` Simon Horman
2017-01-23 10:07 ` [patch net-next v2 2/4] net/sched: Introduce sample tc action Jiri Pirko
2017-01-24  8:33   ` Simon Horman
2017-01-24  8:39     ` Yotam Gigi
2017-01-24 11:49       ` Simon Horman
2017-01-25 23:29   ` Cong Wang
2017-01-27  6:09     ` Yotam Gigi
2017-01-30 16:49     ` Yotam Gigi
2017-01-31  5:57       ` Cong Wang [this message]
2017-01-23 10:07 ` [patch net-next v2 3/4] mlxsw: reg: add the Monitoring Packet Sampling Configuration Register Jiri Pirko
2017-01-23 10:07 ` [patch net-next v2 4/4] mlxsw: spectrum: Add packet sample offloading support Jiri Pirko
2017-01-24 18:44 ` [patch net-next v2 0/4] Add support for offloading packet-sampling David Miller

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='CAM_iQpUK7OiQ0+521W+uoR-O8=BAO5=BU1oNkB7qTd8vo3B57A@mail.gmail.com' \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eladr@mellanox.com \
    --cc=geert+renesas@glider.be \
    --cc=idosch@mellanox.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --cc=linux@roeck-us.net \
    --cc=mrv@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=nogahf@mellanox.com \
    --cc=ogerlitz@mellanox.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=simon.horman@netronome.com \
    --cc=stephen@networkplumber.org \
    --cc=yotamg@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.