From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965907AbbJ1Nmr (ORCPT ); Wed, 28 Oct 2015 09:42:47 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:36564 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965846AbbJ1Nmo (ORCPT ); Wed, 28 Oct 2015 09:42:44 -0400 Message-Id: <1446039763.132965.422568409.3FC44B03@webmail.messagingengine.com> X-Sasl-Enc: XiPZ2GIOnhDA2JL8mcVP85FRsAwPy9mytScgcvesG5E6 1446039763 From: Hannes Frederic Sowa To: Dan Streetman , Steffen Klassert Cc: Herbert Xu , "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Dan Streetman MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-48acd4dd In-Reply-To: References: <1445962519-16133-1-git-send-email-dan.streetman@canonical.com> Subject: Re: [PATCH] xfrm: dst_entries_init() per-net dst_ops Date: Wed, 28 Oct 2015 14:42:43 +0100 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, Oct 28, 2015, at 14:32, Dan Streetman wrote: > On Tue, Oct 27, 2015 at 12:15 PM, wrote: > > From: Dan Streetman > > > > The ipv4 and ipv6 xfrms each create a template dst_ops object, and > > perform dst_entries_init() on the template objects. Then each net > > namespace has its net.xfrm.xfrm[46]_dst_ops field set to the template > > values. The problem with that is the dst_ops.pcpuc_entries field is > > a percpu counter and cannot be used correctly by simply copying it to > > another object. How hard would it be to split of the counters from the dst_ops struct? We could make dst_ops instances const and have normal pointers to them and keep the dst_entries as a small array in net namespace? Bye, Hannes