[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1423057029.907.133.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 04 Feb 2015 05:37:09 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Vladimir Kondratiev <QCA_vkondrat@....qualcomm.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Herbert Xu <herbert@...dor.apana.org.au>,
Eric Dumazet <edumazet@...gle.com>,
Tom Herbert <therbert@...gle.com>,
Vlad Yasevich <vyasevic@...hat.com>,
Jiri Pirko <jiri@...nulli.us>,
John Fastabend <john.fastabend@...il.com>,
Joe Perches <joe@...ches.com>
Subject: Re: [RFC] NAPI behavior when (work < weight)
On Wed, 2015-02-04 at 15:22 +0200, Vladimir Kondratiev wrote:
> Hi
>
> I am observing that if driver does not calls napi_complete() when
> less than full budget consumed, various strange things happen.
>
> For example, if driver going to napi_disable(), it may wait forever
> in the loop:
>
> while (test_and_set_bit(NAPI_STATE_SCHED, &n->state))
> msleep(1);
>
> if last NAPI consumed less then full budget, because bit
> NAPI_STATE_SCHED never cleared.
>
> Is it expected that driver calls napi_complete() when less than full
> budget consumed? Documentation does not say so.
>
> What is intended behavior in case above?
A driver must call napi_complete() (or better : napi_complete_done() )
when/if returning work_done < budget
Thats because of the way we have to rearm interrupts in the driver,
_after_ calling napi_complete()
--
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