From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next 01/17] net: sched: refactor mini_qdisc_pair_swap() to use workqueue Date: Mon, 12 Nov 2018 09:28:09 -0800 (PST) Message-ID: <20181112.092809.744587974364715455.davem@davemloft.net> References: <1542009346-23780-1-git-send-email-vladbu@mellanox.com> <1542009346-23780-2-git-send-email-vladbu@mellanox.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, ast@kernel.org, daniel@iogearbox.net To: vladbu@mellanox.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:57390 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727976AbeKMDWW (ORCPT ); Mon, 12 Nov 2018 22:22:22 -0500 In-Reply-To: <1542009346-23780-2-git-send-email-vladbu@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Vlad Buslov Date: Mon, 12 Nov 2018 09:55:30 +0200 > +void mini_qdisc_pair_swap(struct mini_Qdisc_pair *miniqp, > + struct tcf_proto *tp_head) > +{ > + xchg(&miniqp->tp_head, tp_head); If you are not checking the return value of xchg(), then this is simply a store with optionally a memory barrier of some sort either before or after.