On Monday, January 19, 2026 6:00 PM, Behera, VIVEK <[email protected]> 
wrote:

[...]

>> >@@ -6938,9 +6939,20 @@ int igc_xsk_wakeup(struct net_device *dev, u32
>> >queue_id, u32 flags)
>> >    if (!ring->xsk_pool)
>> >            return -ENXIO;
>> >
>> >-   q_vector = adapter->q_vector[queue_id];
>> >-   if (!napi_if_scheduled_mark_missed(&q_vector->napi))
>> >-           igc_trigger_rxtxq_interrupt(adapter, q_vector);
>> >+   if (flags & XDP_WAKEUP_RX)
>> >+           eics |= igc_sw_irq_prep(ring->q_vector);
>> >+
>> >+   if (flags & XDP_WAKEUP_TX) {
>> >+           /* for IGC_FLAG_QUEUE_PAIRS, this will be NOP as NAPI has
>> >+            * been already marked with NAPIF_STATE_MISSED
>> >+            */
>>
>> The code looked good to me, but I am not understand this comment.
>> Can you help to explain why the NAPI will be marked as NAPIF_STATE_MISSED?
>If the napi was running it will be marked as missed and if napi is not 
>scheduled
>the function would return false preparing the eics value for soft irq trigger

Thanks for the explanation,
the current comment "NAPI has been already marked with NAPIF_STATE_MISSED" is 
misleading
because it implies this always happens for IGC_FLAG_QUEUE_PAIRS. However, this 
only occurs
when NAPI is currently running. Could you revise the comment to be more 
accurate? Something like:

/* For IGC_FLAG_QUEUE_PAIRS, if NAPI is already
 * running from the RX path, it will have been
 * marked as missed, making this TX call a NOP.
 */

>> per my understanding, for IGC_FLAG_QUEUE_PAIRS, rx_ ring->q_vector will be
>> equal to tx_ ring->q_vector, thus, no harm for eics to "OR" the same value 
>> twice.
>> Am I right?
>Yes. Exactly for the IGC_FLAG_QUEUE_PAIRS the q_vector its napi are
>The same for rx and tx so calling napi_if_scheduled_mark_missed
>the second time would not have change anything.
>If IGC_FLAG_QUEUE_PAIRS is not active the q_vector
>extracted from the tx_ring would be different and so would be it's napi which 
>will
>be then
>used as the argument in napi_if_scheduled_mark_missed

Reply via email to