[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090317180826.8f3c596b.akpm@linux-foundation.org>
Date: Tue, 17 Mar 2009 18:08:26 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Alexander Duyck <alexander.h.duyck@...el.com>
Cc: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"gospo@...hat.com" <gospo@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"greg@...ah.com" <greg@...ah.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"Zhao, Yu" <yu.zhao@...el.com>
Subject: Re: [net-next PATCH 1/2] igbvf: add new driver to support 82576
virtual functions
On Tue, 17 Mar 2009 17:12:48 -0700 Alexander Duyck <alexander.h.duyck@...el.com> wrote:
> Thanks for all the comments. I tried to incorporate most of them into
> the igbvf driver and also ended up porting some over to our other
> drivers, specifically igb since the igbvf driver copies much of the code.
>
> I have added my comments inline below.
>
> Thanks,
>
> Alex
>
> Andrew Morton wrote:
> > On Tue, 10 Mar 2009 19:09:28 -0700 Jeff Kirsher <jeffrey.t.kirsher@...el.com> wrote:
> >
> >> From: Alexander Duyck <alexander.h.duyck@...el.com>
> >>
> >> This adds an igbvf driver to handle virtual functions provided
> >> by the igb driver.
> >
> > The drive-by reader is now wondering what a "virtual function" is.
^^ this comment was missed.
I was indirectly asking for an overview (preferably in the changelog) of
what the whole patch actually does.
> >>
> >> +static int igbvf_set_ringparam(struct net_device *netdev,
> >> + struct ethtool_ringparam *ring)
> >> +{
> >> + struct igbvf_adapter *adapter = netdev_priv(netdev);
> >> + struct igbvf_ring *tx_ring, *tx_old;
> >> + struct igbvf_ring *rx_ring, *rx_old;
> >> + int err;
> >> +
> >> + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
> >> + return -EINVAL;
> >> +
> >> + while (test_and_set_bit(__IGBVF_RESETTING, &adapter->state))
> >> + msleep(1);
> >
> > No timeout needed here? Interrupts might not be working, for example..
>
> This bit isn't set in interrupt context. This is always used out of
> interrupt context and is just to prevent multiple setting changes at the
> same time.
Oh. Can't use plain old mutex_lock()?
--
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