Advertisement
Guest User

Untitled

a guest
Sep 15th, 2023
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. if (xsk_uses_need_wakeup(tx_q->xsk_pool))
  2. xsk_set_tx_need_wakeup(tx_q->xsk_pool);
  3.  
  4. /* For XSK TX, we try to send as many as possible.
  5. * If XSK work done (XSK TX desc empty and budget still
  6. * available), return "budget - 1" to reenable TX IRQ.
  7. * Else, return "budget" to make NAPI continue polling.
  8. */
  9. work_done = stmmac_xdp_xmit_zc(priv, queue,
  10. STMMAC_XSK_TX_BUDGET_MAX);
  11. if (work_done)
  12. xmits = budget - 1;
  13. else
  14. xmits = budget;
  15. }
  16.  
  17. if (priv->eee_enabled && !priv->tx_path_in_lpi_mode &&
  18. priv->eee_sw_timer_en) {
  19. if (stmmac_enable_eee_mode(priv))
  20. mod_timer(&priv->eee_ctrl_timer, STMMAC_LPI_T(priv->tx_lpi_timer));
  21. }
  22.  
  23. xmits = max(count, xmits);
  24.  
  25. /* We still have pending packets, let's call for a new scheduling */
  26. if (tx_q->dirty_tx != tx_q->cur_tx && likely(xmits) && xmits < budget) {
  27. pr_info("trigger timer %d %d\n", xmits, budget);
  28. hrtimer_start(&tx_q->txtimer,
  29. STMMAC_COAL_TIMER(priv->tx_coal_timer[queue]),
  30. HRTIMER_MODE_REL);
  31. }
  32.  
  33. __netif_tx_unlock_bh(netdev_get_tx_queue(priv->dev, queue));
  34.  
  35. /* Combine decisions from TX clean and XSK TX */
  36. return xmits;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement