From patchwork Sat Jan 15 11:23:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changli Gao X-Patchwork-Id: 79048 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 100D3B7043 for ; Sat, 15 Jan 2011 22:23:26 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752488Ab1AOLXS (ORCPT ); Sat, 15 Jan 2011 06:23:18 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:41765 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275Ab1AOLXR (ORCPT ); Sat, 15 Jan 2011 06:23:17 -0500 Received: by iyj18 with SMTP id 18so3256015iyj.19 for ; Sat, 15 Jan 2011 03:23:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=XrNciYPH8EYWcmTiKlHpoEytHZCpB1oEiUBxUZC6idM=; b=D7I6hl8LOfJkgRV15upWICU/U+aFe+x7Jm1qtIdsstAnkR2xLHTOI92P8VwV/IvKKK ns1aebsUNdg0GCYyXM2t6eGCCGzq5HN47fKV0RBVMZ6aQVNjmonCjeGV/DCgPOnw8JwX cp0cTGlnNK8/S/1Thuus0B6apl19wyTTUzdpc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=NUpiv5p18b/Xn8qW2872RR2cyJj1E3SixOkm9hDLXXv7C68i//0OMrIcIbZ3wGU8Ka KVF099SaXbMCjKVfK1ow5Qg4JVckaUkSSZFwL+96SW/y2oQZuznphQCB6HK9uHhSLpXq UOky0N7OurE3mOpunU9mbnxYSDCezPd11NiIw= Received: by 10.42.229.130 with SMTP id ji2mr2017968icb.204.1295090596880; Sat, 15 Jan 2011 03:23:16 -0800 (PST) Received: from localhost.localdomain ([111.164.178.81]) by mx.google.com with ESMTPS id d21sm1878069ibg.9.2011.01.15.03.23.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 15 Jan 2011 03:23:15 -0800 (PST) From: Changli Gao To: Patrick McHardy Cc: "David S. Miller" , netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, Changli Gao , Tim Gardner , Eric Dumazet Subject: [PATCH v2 resend] netfilter: remove an atomic bit operation Date: Sat, 15 Jan 2011 19:23:00 +0800 Message-Id: <1295090580-14472-1-git-send-email-xiaosuo@gmail.com> X-Mailer: git-send-email 1.7.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org As this ct won't be seen by the others, we don't need to set the IPS_CONFIRMED_BIT in atomic way. Signed-off-by: Changli Gao Cc: Tim Gardner Cc: Eric Dumazet --- v2: IPS_CONFIRMED_BIT is changed to IPS_CONFIRMED. net/netfilter/nf_conntrack_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 27a5ea6..c708248 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -486,7 +486,7 @@ __nf_conntrack_confirm(struct sk_buff *skb) ct->timeout.expires += jiffies; add_timer(&ct->timeout); atomic_inc(&ct->ct_general.use); - set_bit(IPS_CONFIRMED_BIT, &ct->status); + ct->status |= IPS_CONFIRMED; /* Since the lookup is lockless, hash insertion must be done after * starting the timer and setting the CONFIRMED bit. The RCU barriers