From: Flavio Leitner <fbl@redhat.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com
Subject: Re: [patch net-next 1/3] team: remove synchronize_rcu() called during queue override change
Date: Tue, 11 Jun 2013 10:18:56 -0300 [thread overview]
Message-ID: <20130611131856.GA11888@obelix.rh> (raw)
In-Reply-To: <20130611080107.GA1916@minipsycho.brq.redhat.com>
On Tue, Jun 11, 2013 at 10:01:07AM +0200, Jiri Pirko wrote:
> Tue, Jun 11, 2013 at 07:40:46AM CEST, jiri@resnulli.us wrote:
> >Tue, Jun 11, 2013 at 02:48:45AM CEST, fbl@redhat.com wrote:
> >>On Mon, Jun 10, 2013 at 05:42:23PM +0200, Jiri Pirko wrote:
> >>> This patch removes synchronize_rcu() from function
> >>> __team_queue_override_port_del(). That can be done because it is ok to
> >>> do list_del_rcu() and list_add_tail_rcu() on the same list_head member
> >>> without calling synchronize_rcu() in between. A bit of refactoring
> >>> needed to be done because INIT_LIST_HEAD needed to be removed (to not
> >>> kill the forward pointer) as well.
> >>>
> >>> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> >>> ---
> >>> drivers/net/team/team.c | 63 ++++++++++++++++++++++++++++++++++++-------------
> >>> 1 file changed, 47 insertions(+), 16 deletions(-)
> >>>
> >>[...]
> >>
> >>> @@ -1278,17 +1310,16 @@ static int team_queue_id_option_set(struct team *team,
> >>> struct team_gsetter_ctx *ctx)
> >>> {
> >>> struct team_port *port = ctx->info->port;
> >>> + u16 new_queue_id = ctx->data.u32_val;
> >>>
> >>> - if (port->queue_id == ctx->data.u32_val)
> >>> + if (port->queue_id == new_queue_id)
> >>
> >>Since you're passing new_queue_id to port->queue_id and
> >>in the other parts you test against !port->queue_id to see
> >>if it's enable or not, that means queue 0 can't be used.
> >>
> >>Maybe I am missing something, but wouldn't be better to
> >>initialize with -1 and allow 0 to be used as well?
> >
> >0 means default queue. It's done the same was as in bonding code.
>
> + this patch does not change original behaviour...
Jiri explained this bits off list to me, so
Acked-by: Flavio Leitner <fbl@redhat.com>
Thanks,
--
fbl
next prev parent reply other threads:[~2013-06-11 13:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 15:42 [patch net-next 0/3] team: remove sychronize_rcu() calls Jiri Pirko
2013-06-10 15:42 ` [patch net-next 1/3] team: remove synchronize_rcu() called during queue override change Jiri Pirko
2013-06-11 0:48 ` Flavio Leitner
2013-06-11 5:40 ` Jiri Pirko
2013-06-11 8:01 ` Jiri Pirko
2013-06-11 13:18 ` Flavio Leitner [this message]
2013-06-10 15:42 ` [patch net-next 2/3] team: use kfree_rcu instead of synchronize_rcu in team_port_dev Jiri Pirko
2013-06-10 15:42 ` [patch net-next 3/3] team: remove synchronize_rcu() called during port disable Jiri Pirko
2013-06-12 10:10 ` [patch net-next 0/3] team: remove sychronize_rcu() calls David Miller
2013-06-12 11:01 ` Jiri Pirko
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=20130611131856.GA11888@obelix.rh \
--to=fbl@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
/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).