lkml.org 
[lkml]   [2023]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH net-next v2 3/4] octeon_ep: implement xmit_more in transmit
    On Tue, 24 Oct 2023 07:51:18 -0700 Shinas Rasheed wrote:
    > iq->host_write_index = wi;
    > + if (xmit_more &&
    > + (atomic_read(&iq->instr_pending) <
    > + (iq->max_count - OCTEP_WAKE_QUEUE_THRESHOLD)) &&
    > + iq->fill_cnt < iq->fill_threshold)
    > + return NETDEV_TX_OK;

    Does this guarantee that a full-sized skb can be accommodated?
    If so - consider stopping stopping the queue when the condition
    is not true. The recommended way of implementing 'driver flow control'
    is to stop the queue once next packet may not fit, and then use
    netif_xmit_stopped() when deciding whether we need to flush or we can
    trust xmit_more. see
    https://www.kernel.org/doc/html/next/networking/driver.html#transmit-path-guidelines

    > /* Flush the hw descriptor before writing to doorbell */
    > wmb();
    > -
    > - /* Ring Doorbell to notify the NIC there is a new packet */
    > - writel(1, iq->doorbell_reg);
    > - iq->stats.instr_posted++;
    > + /* Ring Doorbell to notify the NIC of new packets */
    > + writel(iq->fill_cnt, iq->doorbell_reg);
    > + iq->stats.instr_posted += iq->fill_cnt;
    > + iq->fill_cnt = 0;
    > return NETDEV_TX_OK;

    \
     
     \ /
      Last update: 2023-10-25 02:22    [W:4.811 / U:0.676 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site