From patchwork Tue Jan 14 01:39:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "fan.du" X-Patchwork-Id: 310433 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 CE0C42C0084 for ; Tue, 14 Jan 2014 12:39:50 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753243AbaANBjr (ORCPT ); Mon, 13 Jan 2014 20:39:47 -0500 Received: from mail1.windriver.com ([147.11.146.13]:64683 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753237AbaANBjn (ORCPT ); Mon, 13 Jan 2014 20:39:43 -0500 Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail1.windriver.com (8.14.5/8.14.5) with ESMTP id s0E1deG1008910 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 13 Jan 2014 17:39:40 -0800 (PST) Received: from iamroot-OptiPlex-780.corp.ad.wrs.com (128.224.162.236) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.2.347.0; Mon, 13 Jan 2014 17:39:40 -0800 From: Fan Du To: CC: , Subject: [PATCHv2 net-next 1/4] flowcache: Namespacify flowcache global parameters with xfrm Date: Tue, 14 Jan 2014 09:39:44 +0800 Message-ID: <1389663588-29678-2-git-send-email-fan.du@windriver.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1389663588-29678-1-git-send-email-fan.du@windriver.com> References: <1389663588-29678-1-git-send-email-fan.du@windriver.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Since flowcache is tightly coupled with IPsec, so it would be easier to put flow cache global parameters here into xfrm namespace part. Signed-off-by: Fan Du --- include/net/netns/xfrm.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h index 1006a26..52d0086 100644 --- a/include/net/netns/xfrm.h +++ b/include/net/netns/xfrm.h @@ -6,6 +6,7 @@ #include #include #include +#include struct ctl_table_header; @@ -61,6 +62,16 @@ struct netns_xfrm { spinlock_t xfrm_policy_sk_bundle_lock; rwlock_t xfrm_policy_lock; struct mutex xfrm_cfg_mutex; + + /* flow cache part */ + struct flow_cache flow_cache_global; + struct kmem_cache *flow_cachep; + atomic_t flow_cache_genid; + struct list_head flow_cache_gc_list; + spinlock_t flow_cache_gc_lock; + struct work_struct flow_cache_gc_work; + struct work_struct flow_cache_flush_work; + struct mutex flow_flush_sem; }; #endif