From: Jiri Pirko <jiri@resnulli.us>
To: 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 07:40:46 +0200 [thread overview]
Message-ID: <20130611054046.GA1533@minipsycho.orion> (raw)
In-Reply-To: <20130611004845.GF11894@obelix.rh>
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.
>
>fbl
>
>> return 0;
>> - if (ctx->data.u32_val >= team->dev->real_num_tx_queues)
>> + if (new_queue_id >= team->dev->real_num_tx_queues)
>> return -EINVAL;
>> - port->queue_id = ctx->data.u32_val;
>> - team_queue_override_port_refresh(team, port);
>> + team_queue_override_port_change_queue_id(team, port, new_queue_id);
>> return 0;
>> }
>>
>
next prev parent reply other threads:[~2013-06-11 5:40 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 [this message]
2013-06-11 8:01 ` Jiri Pirko
2013-06-11 13:18 ` Flavio Leitner
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=20130611054046.GA1533@minipsycho.orion \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--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).