From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Herbert Subject: Re: [PATCH v4 1/1] rps: core implementation Date: Thu, 17 Dec 2009 13:04:01 -0800 Message-ID: <65634d660912171304p751e1698mbc9de50dade4317d@mail.gmail.com> References: <65634d660911201528k5a07135el471b65fff9dd7c9d@mail.gmail.com> <20091120154046.67252d23@nehalam> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: David Miller , Linux Netdev List To: Stephen Hemminger Return-path: Received: from smtp-out.google.com ([216.239.44.51]:31484 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759982AbZLQVEI convert rfc822-to-8bit (ORCPT ); Thu, 17 Dec 2009 16:04:08 -0500 Received: from kpbe17.cbf.corp.google.com (kpbe17.cbf.corp.google.com [172.25.105.81]) by smtp-out.google.com with ESMTP id nBHL43lq019859 for ; Thu, 17 Dec 2009 13:04:04 -0800 Received: from pxi12 (pxi12.prod.google.com [10.243.27.12]) by kpbe17.cbf.corp.google.com with ESMTP id nBHL39B7029902 for ; Thu, 17 Dec 2009 13:04:03 -0800 Received: by pxi12 with SMTP id 12so188371pxi.3 for ; Thu, 17 Dec 2009 13:04:02 -0800 (PST) In-Reply-To: <20091120154046.67252d23@nehalam> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Nov 20, 2009 at 3:40 PM, Stephen Hemminger wrote: > > On Fri, 20 Nov 2009 15:28:58 -0800 > Tom Herbert wrote: > > > +static char *get_token(const char **cp, size_t *len) > > +{ > > + =A0 =A0 const char *bp =3D *cp; > > + =A0 =A0 char *start; > > + > > + =A0 =A0 while (isspace(*bp)) > > + =A0 =A0 =A0 =A0 =A0 =A0 bp++; > > + > > + =A0 =A0 start =3D (char *)bp; > > + =A0 =A0 while (!isspace(*bp) && *bp !=3D '\0') > > + =A0 =A0 =A0 =A0 =A0 =A0 bp++; > > + > > + =A0 =A0 if (start !=3D bp) > > + =A0 =A0 =A0 =A0 =A0 =A0 *len =3D bp - start; > > + =A0 =A0 else > > + =A0 =A0 =A0 =A0 =A0 =A0 start =3D NULL; > > + > > + =A0 =A0 *cp =3D bp; > > + =A0 =A0 return start; > > +} > > > Sysfs is intentionally one value per file. If you need multiple > values, then it is the wrong interface. Are there any good recommendations for a more appropriate interface to use? Would it make sense to expose the NAPI instances in sysfs... like eth0/rx-0/, eth0/rx-1/,... which would hopefully be consistent with interrupts in /proc/interrupts. Thanks, Tom