[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190215234623.565166a4@redhat.com>
Date: Fri, 15 Feb 2019 23:46:23 +0100
From: Stefano Brivio <sbrivio@...hat.com>
To: Vlad Buslov <vladbu@...lanox.com>
Cc: netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
jiri@...nulli.us, davem@...emloft.net
Subject: Re: [PATCH net-next 06/12] net: sched: flower: handle concurrent
mask insertion
On Thu, 14 Feb 2019 09:47:06 +0200
Vlad Buslov <vladbu@...lanox.com> wrote:
> @@ -1327,19 +1330,36 @@ static int fl_check_assign_mask(struct cls_fl_head *head,
> int ret = 0;
>
> rcu_read_lock();
> - fnew->mask = rhashtable_lookup_fast(&head->ht, mask, mask_ht_params);
> +
> + /* Insert mask as temporary node to prevent concurrent creation of mask
> + * with same key. Any concurrent lookups with same key will return
> + * EAGAIN because mask's refcnt is zero. It is safe to insert
Nit: -EAGAIN
--
Stefano
Powered by blists - more mailing lists