Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933173Ab0BPSJF (ORCPT ); Tue, 16 Feb 2010 13:09:05 -0500 Received: from ixro-out-rtc.ixiacom.com ([92.87.192.98]:29825 "EHLO ixro-ex1.ixiacom.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933153Ab0BPSJB (ORCPT ); Tue, 16 Feb 2010 13:09:01 -0500 From: Octavian Purdila Organization: Ixia To: "Eric W. Biederman" Subject: Re: [net-next PATCH v4 0/3] net: reserve ports for applications using fixed port Date: Tue, 16 Feb 2010 20:04:33 +0200 User-Agent: KMail/1.12.2 (Linux/2.6.32-2-686; KDE/4.3.2; i686; ; ) Cc: David Miller , Linux Kernel Network Developers , Linux Kernel Developers , Amerigo Wang References: <1266271241-6293-1-git-send-email-opurdila@ixiacom.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201002162004.33533.opurdila@ixiacom.com> X-OriginalArrivalTime: 16 Feb 2010 18:08:03.0519 (UTC) FILETIME=[FB70F4F0:01CAAF32] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1917 Lines: 42 On Tuesday 16 February 2010 19:25:04 you wrote: > I don't like the /proc interface for this. That is certainly not the > format I would choose for a bitmap. The way you have described this > it looks like you are a set of different individual values instead of > one large value. History says one value per file is the ideal in a > user space facing interface. Intuitively I would not know how to > change your new proc interface after catting the file. The classic > read the file tweak the value and write the new value back will not > work. > > Also we already have a common function for dealing with bitmaps > in /proc. bitmap_parse_user. Used in /proc/irq/NNN/smp_affinity > among other places. > > So can you please use bitmap_parse_user, or break this up into > 64k individual files that we can set individually? > Hi Eric, thanks for going over this. The use case (large bitmaps/lists) is different enough from what we have today (small bitmaps) and that is why I think that we need this new interface. If I get bitmap_parse_user correctly, for a 64k bitmap it expects a 2K comma separated values. That is not the most intuitively way for the user to set a list of ports he wants to reserve. Using 64K files has the same practical issues (the user would have to cat all 64K files to determine which ports are reserved) plus it has issues caused by the large number of files: significant memory overhead and also significant time for registering those files. If this new interface is unacceptable I would rather go with a setsockopt approach, since either of the above approaches are more like machine friendly instead of user friendly. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/