From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [PATCH v3 09/11] net: sched: use reference counting action init Date: Mon, 28 May 2018 17:08:37 +0200 Message-ID: <20180528150837.GG2173@nanopsycho> References: <20180527175739.GA3337@nanopsycho> <1527455849-22327-1-git-send-email-vladbu@mellanox.com> <1527455849-22327-10-git-send-email-vladbu@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, davem@davemloft.net, ast@kernel.org, daniel@iogearbox.net, kliteyn@mellanox.com To: Vlad Buslov Return-path: Received: from mail-wm0-f66.google.com ([74.125.82.66]:53831 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S939457AbeE1PJC (ORCPT ); Mon, 28 May 2018 11:09:02 -0400 Received: by mail-wm0-f66.google.com with SMTP id a67-v6so32824910wmf.3 for ; Mon, 28 May 2018 08:09:01 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1527455849-22327-10-git-send-email-vladbu@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: Sun, May 27, 2018 at 11:17:27PM CEST, vladbu@mellanox.com wrote: >Change action API to assume that action init function always takes >reference to action, even when overwriting existing action. This is >necessary because action API continues to use action pointer after init >function is done. At this point action becomes accessible for concurrent >modifications, so user must always hold reference to it. > >Implement helper put list function to atomically release list of actions >after action API init code is done using them. > >Signed-off-by: Vlad Buslov Signed-off-by: Jiri Pirko