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.