Re: [PATCH net-next v7 04/10] enic: add admin CQ service with MSI-X interrupt and NAPI polling

From: Jakub Kicinski

Date: Mon May 18 2026 - 21:37:46 EST


On Wed, 13 May 2026 08:15:41 -0700 Satish Kharat wrote:
> @@ -296,6 +296,14 @@ struct enic {
> struct vnic_rq admin_rq;
> struct vnic_cq admin_cq[2];
> struct vnic_intr admin_intr;
> + struct napi_struct admin_napi;

please do not use NAPI for FW communication channels
NAPI is for packet processing, you can use a work/tasklet
for what you're doing

> + unsigned int admin_intr_index;
> + struct work_struct admin_msg_work;
> + spinlock_t admin_msg_lock; /* protects admin_msg_list */
> + struct list_head admin_msg_list;
> + u64 admin_msg_drop_cnt;
> + void (*admin_rq_handler)(struct enic *enic, void *buf,
> + unsigned int len);
> };

> +unsigned int enic_admin_wq_cq_service(struct enic *enic)
> +{
> + struct vnic_cq *cq = &enic->admin_cq[0];
> + unsigned int work = 0;
> + void *desc;
> +
> + desc = vnic_cq_to_clean(cq);
> + while (enic_admin_cq_color(desc, cq->ring.desc_size) !=
> + cq->last_color) {
> + /* Ensure color bit is read before descriptor fields */
> + rmb();

AI review points out that this barrier is pointless or the comment
is wrong - nothing reads desc in the loop after this point.

> + vnic_cq_inc_to_clean(cq);
> + work++;
> + desc = vnic_cq_to_clean(cq);
> + }
> +
> + return work;
--
pw-bot: cr