Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1677815

Re: [PATCH 4.4 37/46] r8152: re-schedule napi for tx

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Ben Hutchings <ben.hutchings@codethink.co.uk>
Newsgroups linux.kernel
Subject Re: [PATCH 4.4 37/46] r8152: re-schedule napi for tx
Date Thu, 29 Jun 2017 16:30:04 +0200
Message-ID <tXICg-eR-45@gated-at.bofh.it> (permalink)
References <tSHdL-5vC-7@gated-at.bofh.it> <tSHdO-5vC-75@gated-at.bofh.it>
Organization Codethink Ltd.
Content-Type text/plain; charset="UTF-8"
X-Mailer Evolution 3.12.9-1+b1
MIME-Version 1.0
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 28
X-Original-Cc linux-kernel@vger.kernel.org, stable@vger.kernel.org, "David S. Miller" <davem@davemloft.net>, Sasha Levin <alexander.levin@verizon.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
X-Original-Date Thu, 29 Jun 2017 15:23:32 +0100
X-Original-Message-ID <1498746212.1935.47.camel@codethink.co.uk>
X-Original-References <20170615175218.286057711@linuxfoundation.org> <20170615175220.039719417@linuxfoundation.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1677815

Show key headers only | View raw


On Thu, 2017-06-15 at 19:52 +0200, Greg Kroah-Hartman wrote:
> 4.4-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: hayeswang <hayeswang@realtek.com>
> 
> 
> [ Upstream commit 248b213ad908b88db15941202ef7cb7eb137c1a0 ]
> 
> Re-schedule napi after napi_complete() for tx, if it is necessay.
> 
> In r8152_poll(), if the tx is completed after tx_bottom() and before
> napi_complete(), the scheduling of napi would be lost. Then, no
> one handles the next tx until the next napi_schedule() is called.
[...]

This (and other) tests of list_empty() aren't going to be reliable
unless you take the same spinlock used when enqueueing packets.
Alternately you could count packets added and removed from the driver
internal queues and then you should only need memory barriers for
synchronisation when comparing counters.

Ben.

-- 
Ben Hutchings
Software Developer, Codethink Ltd.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 4.4 37/46] r8152: re-schedule napi for tx Ben Hutchings <ben.hutchings@codethink.co.uk> - 2017-06-29 16:30 +0200

csiph-web