On 11/16/26 5:40 PM, Jakub Kicinski wrote:
On Mon, 9 Nov 2026 15:55:50 -0800 Mingming Cao wrote:
quoted
+ if (WARN_ON(queue_index < 0 ||
+ queue_index >= adapter->num_rx_queues)) {
You add such checks all over the place, why?
The kernel coding style explicitly recommends against defensive
programming.
No good reason: no caller passes an out-of-range index. They are all
removed in the split series.
quoted
+ if (budget)
+ napi_complete_done(napi, 0);
+ return 0;
+ }
+
+ if (ibmveth_poll_stopping(netdev, napi)) {
Why are you checking if the NAPI is stopping?
Maybe I missed it in the avalanche of words in the commit message,
you mention live resize, which I assume is patch 14. I don't get why
you need to explicitly check this, core already does.
Yes, it was for patch 14's live resize. You're right that the core
already handles it. The check will be removed in the splited series.
quoted
+ if (budget)
+ napi_complete_done(napi, 0);
+ return 0;
+ }
+
while (frames_processed < budget) {
+ if (ibmveth_poll_stopping(netdev, napi))
+ break;
+
if (!ibmveth_rxq_pending_buffer(adapter, queue_index))
break;
smp_rmb();
- correlator = ibmveth_rxq_read_correlator(adapter, queue_index);
if (!ibmveth_rxq_buffer_valid(adapter, queue_index)) {
wmb(); /* suggested by larson1 */
- adapter->rx_invalid_buffer++;
- netdev_dbg(netdev, "recycling invalid buffer\n");
- rc = ibmveth_rxq_harvest_buffer(adapter, queue_index,
- correlator, true);
- if (unlikely(rc)) {
- netdev->stats.rx_dropped++;
+ if (ibmveth_poll_recycle_invalid(netdev, adapter,
+ queue_index))
frames_processed++;
- continue;
- }
} else {
- struct sk_buff *skb, *new_skb;
- int length = ibmveth_rxq_frame_length(adapter,
- queue_index);
- int offset = ibmveth_rxq_frame_offset(adapter,
- queue_index);
- int csum_good = ibmveth_rxq_csum_good(adapter,
- queue_index);
- int lrg_pkt = ibmveth_rxq_large_packet(adapter,
You should really factor out the pure code movement to a separate patch.
Done. The poll split is now movement only, apart from the bad-frame
message naming the queue. The behaviour changes it carried had no
reason of their own, so I dropped them rather than keep them as a
separate patch.
Thanks,
Mingming