Re: [PATCH net-next v3 1/4] enetc: Introduce basic PF and VF ENETC ethernet drivers
From: David Miller
Date: Sat Nov 24 2018 - 01:29:18 EST
From: Claudiu Manoil <claudiu.manoil@xxxxxxx>
Date: Fri, 23 Nov 2018 12:46:00 +0200
> +static int enetc_poll(struct napi_struct *napi, int budget)
> +{
> + struct enetc_int_vector
> + *v = container_of(napi, struct enetc_int_vector, napi);
> + bool complete = true;
> + int work_done;
> + int i;
> +
> + for (i = 0; i < v->count_tx_rings; i++) {
> + work_done = enetc_clean_tx_ring(&v->tx_ring[i], budget);
> + if (work_done == budget)
> + complete = false;
> + }
You should not count TX completion processing as NAPI poll "work".
It is relatively "free" compared to RX packet processing.