Thread (8 messages) flat view 8 messages, 5 authors, 2022-10-20

Re: [PATCH net-next 2/2] net: wwan: t7xx: Add NAPI support

From: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Date: 2022-09-13 10:46:18

On Fri, 9 Sep 2022, Sreehari Kancharla wrote:
From: Haijun Liu <haijun.liu@mediatek.com>

Replace the work queue based RX flow with a NAPI implementation
Remove rx_thread and dpmaif_rxq_work.
Introduce dummy network device. its responsibility is
    - Binds one NAPI object for each DL HW queue and acts as
      the agent of all those network devices.
    - Use NAPI object to poll DL packets.
    - Helps to dispatch each packet to the network interface.
It would be useful to mention that GRO is also enabled.
 static int t7xx_ccmni_open(struct net_device *dev)
 {
 	struct t7xx_ccmni *ccmni = wwan_netdev_drvpriv(dev);
+	struct t7xx_ccmni_ctrl *ccmni_ctl = ccmni->ctlb;
 
 	netif_carrier_on(dev);
 	netif_tx_start_all_queues(dev);
+	if (!atomic_read(&ccmni_ctl->napi_usr_refcnt)) {
+		t7xx_ccmni_enable_napi(ccmni_ctl);
+		atomic_set(&ccmni_ctl->napi_usr_refcnt, 1);
+	} else {
+		atomic_inc(&ccmni_ctl->napi_usr_refcnt);
+	}
atomic_fetch_inc() ?

-- 
 i.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help