* [PATCH net-next 0/2] net: bcmsysport: utilize newer NAPI APIs
@ 2016-04-20 18:37 Florian Fainelli
2016-04-20 18:37 ` [PATCH net-next 1/2] net: bcmsysport: use __napi_schedule_irqoff() Florian Fainelli
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-04-20 18:37 UTC (permalink / raw)
To: netdev; +Cc: edumazet, pgynther, Florian Fainelli
Hi David, Eric, Petri,
These two patches are very analoguous to what was already submitted for
BCMGENET and switch the SYSTEMPORT driver to utilizing __napi_schedule_irqoff()
and napi_complete_done for the RX NAPI context.
Florian Fainelli (2):
net: bcmsysport: use __napi_schedule_irqoff()
net: bcmsysport: use napi_complete_done()
drivers/net/ethernet/broadcom/bcmsysport.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next 1/2] net: bcmsysport: use __napi_schedule_irqoff()
2016-04-20 18:37 [PATCH net-next 0/2] net: bcmsysport: utilize newer NAPI APIs Florian Fainelli
@ 2016-04-20 18:37 ` Florian Fainelli
2016-04-20 18:37 ` [PATCH net-next 2/2] net: bcmsysport: use napi_complete_done() Florian Fainelli
2016-04-21 19:06 ` [PATCH net-next 0/2] net: bcmsysport: utilize newer NAPI APIs David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-04-20 18:37 UTC (permalink / raw)
To: netdev; +Cc: edumazet, pgynther, Florian Fainelli
Both bcm_sysport_tx_isr() and bcm_sysport_rx_isr() run in hard irq
context, we do not need to block irq again.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/broadcom/bcmsysport.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 993c780bdfab..9e3ec739d860 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -873,7 +873,7 @@ static irqreturn_t bcm_sysport_rx_isr(int irq, void *dev_id)
if (likely(napi_schedule_prep(&priv->napi))) {
/* disable RX interrupts */
intrl2_0_mask_set(priv, INTRL2_0_RDMA_MBDONE);
- __napi_schedule(&priv->napi);
+ __napi_schedule_irqoff(&priv->napi);
}
}
@@ -916,7 +916,7 @@ static irqreturn_t bcm_sysport_tx_isr(int irq, void *dev_id)
if (likely(napi_schedule_prep(&txr->napi))) {
intrl2_1_mask_set(priv, BIT(ring));
- __napi_schedule(&txr->napi);
+ __napi_schedule_irqoff(&txr->napi);
}
}
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next 2/2] net: bcmsysport: use napi_complete_done()
2016-04-20 18:37 [PATCH net-next 0/2] net: bcmsysport: utilize newer NAPI APIs Florian Fainelli
2016-04-20 18:37 ` [PATCH net-next 1/2] net: bcmsysport: use __napi_schedule_irqoff() Florian Fainelli
@ 2016-04-20 18:37 ` Florian Fainelli
2016-04-21 19:06 ` [PATCH net-next 0/2] net: bcmsysport: utilize newer NAPI APIs David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-04-20 18:37 UTC (permalink / raw)
To: netdev; +Cc: edumazet, pgynther, Florian Fainelli
By using napi_complete_done(), we allow fine tuning of
/sys/class/net/ethX/gro_flush_timeout for higher GRO aggregation
efficiency for a Gbit NIC.
Check commit 24d2e4a50737 ("tg3: use napi_complete_done()") for details.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/broadcom/bcmsysport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 9e3ec739d860..30b0c2895a56 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -831,7 +831,7 @@ static int bcm_sysport_poll(struct napi_struct *napi, int budget)
rdma_writel(priv, priv->rx_c_index, RDMA_CONS_INDEX);
if (work_done < budget) {
- napi_complete(napi);
+ napi_complete_done(napi, work_done);
/* re-enable RX interrupts */
intrl2_0_mask_clear(priv, INTRL2_0_RDMA_MBDONE);
}
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next 0/2] net: bcmsysport: utilize newer NAPI APIs
2016-04-20 18:37 [PATCH net-next 0/2] net: bcmsysport: utilize newer NAPI APIs Florian Fainelli
2016-04-20 18:37 ` [PATCH net-next 1/2] net: bcmsysport: use __napi_schedule_irqoff() Florian Fainelli
2016-04-20 18:37 ` [PATCH net-next 2/2] net: bcmsysport: use napi_complete_done() Florian Fainelli
@ 2016-04-21 19:06 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-04-21 19:06 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev, edumazet, pgynther
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Wed, 20 Apr 2016 11:37:07 -0700
> These two patches are very analoguous to what was already submitted for
> BCMGENET and switch the SYSTEMPORT driver to utilizing __napi_schedule_irqoff()
> and napi_complete_done for the RX NAPI context.
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-21 19:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-20 18:37 [PATCH net-next 0/2] net: bcmsysport: utilize newer NAPI APIs Florian Fainelli
2016-04-20 18:37 ` [PATCH net-next 1/2] net: bcmsysport: use __napi_schedule_irqoff() Florian Fainelli
2016-04-20 18:37 ` [PATCH net-next 2/2] net: bcmsysport: use napi_complete_done() Florian Fainelli
2016-04-21 19:06 ` [PATCH net-next 0/2] net: bcmsysport: utilize newer NAPI APIs David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).