lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1301576720.10056.112.camel@localhost>
Date:	Thu, 31 Mar 2011 14:05:20 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Amit Salecha <amit.salecha@...gic.com>
Cc:	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Ameen Rahman <ameen.rahman@...gic.com>,
	Anirban Chakraborty <anirban.chakraborty@...gic.com>
Subject: RE: [PATCH] net: ethtool support to configure number of RX rings

On Thu, 2011-03-31 at 00:55 -0500, Amit Salecha wrote:
> > o Ethtool hook to configure number of RX rings.
> > o Implementation is scalable to support configuring TX rings.
> > o There exist ETHTOOL_GRXRINGS command for getting number of RX rings,
> >   but it is tigtly coupled with RX flow hash configuration.
> > o Patches for qlcnic and netxen_nic driver supporting this features
> >   will follow soon.
> >
> > Signed-off-by: Amit Kumar Salecha <amit.salecha@...gic.com>
> > ---
> >  include/linux/ethtool.h |   20 ++++++++++++++++++++
> >  net/core/ethtool.c      |   33 +++++++++++++++++++++++++++++++++
> >  2 files changed, 53 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> > index aac3e2e..de0decd 100644
> > --- a/include/linux/ethtool.h
> > +++ b/include/linux/ethtool.h
> > @@ -226,6 +226,21 @@ struct ethtool_ringparam {
> >       __u32   tx_pending;
> >  };
> >
> > +/* for configuring number of RX ring */
> > +struct ethtool_ring {
> > +     __u32   cmd;    /* ETHTOOL_{G,S}RING */
> > +
> > +     /* Read only attributes.  These indicate the maximum number
> > +      * of RX rings the driver will allow the user to set.
> > +      */
> > +     __u32   rx_max;
> > +
> > +     /* Values changeable by the user.  The valid values are
> > +      * in the range 1 to the "*_max" counterpart above.
> > +      */
> > +     __u32   rx_pending;
> > +};
> > +
> 
> Current implementation can't scale to support TX rings. Because once
> structure is defined, that can't be changed.
> As tools will have dependency on it.
> If configuring tx rings need to be supported, I need to define Tx
> parameters in struct ethtool_ring now.
> Currently qlcnic and netxen_nic driver doesn't have requirement to
> configure number of tx rings.
> Should I define tx parameters in struct ethtool_ring ?

You could take this patch: http://patchwork.ozlabs.org/patch/65202/
but drop the affinity control from it.

Your implementation of set_channels() would then refuse all changes to
the numbers of TX/other/combined channels.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ