• Nick Child's avatar
    ibmvnic: Introduce send sub-crq direct · 74839f7a
    Nick Child authored
    Firmware supports two hcalls to send a sub-crq request:
    H_SEND_SUB_CRQ_INDIRECT and H_SEND_SUB_CRQ. The indirect hcall allows
    for submission of batched messages while the other hcall is limited to
    only one message. This protocol is defined in PAPR section 17.2.3.3.
    
    Previously, the ibmvnic xmit function only used the indirect hcall. This
    allowed the driver to batch it's skbs. A single skb can occupy a few
    entries per hcall depending on if FW requires skb header information or
    not. The FW only needs header information if the packet is segmented.
    
    By this logic, if an skb is not GSO then it can fit in one sub-crq
    message and therefore is a candidate for H_SEND_SUB_CRQ.
    Batching skb transmission is only useful when there are more packets
    coming down the line (ie netdev_xmit_more is true).
    
    As it turns out, H_SEND_SUB_CRQ induces less latency than
    H_SEND_SUB_CRQ_INDIRECT. Therefore, use H_SEND_SUB_CRQ where
    appropriate.
    
    Small latency gains seen when doing TCP_RR_150 (request/response
    workload). Ftrace results (graph-time=1):
      Previous:
         ibmvnic_xmit = 29618270.83 us / 8860058.0 hits = AVG 3.34
         ibmvnic_tx_scrq_flush = 21972231.02 us / 6553972.0 hits = AVG 3.35
      Now:
         ibmvnic_xmit = 22153350.96 us / 8438942.0 hits = AVG 2.63
         ibmvnic_tx_scrq_flush = 15858922.4 us / 6244076.0 hits = AVG 2.54
    Signed-off-by: default avatarNick Child <nnac123@linux.ibm.com>
    Link: https://patch.msgid.link/20240807211809.1259563-6-nnac123@linux.ibm.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    74839f7a
ibmvnic.c 184 KB