• Bart Van Assche's avatar
    IB/srpt: Change default behavior from using SRQ to using RC · dea26209
    Bart Van Assche authored
    Although in the RC mode more resources are needed that mode has three
    advantages over SRQ:
    - It works with all RDMA adapters, even those that do not support
      SRQ.
    - Posting WRs and polling WCs does not trigger lock contention
      because only one thread at a time accesses a WR or WC queue in
      non-SRQ mode.
    - The end-to-end flow control mechanism is used.
    
    >From the IB spec:
    
        C9-150.2.1: For QPs that are not associated with an SRQ, each HCA
        receive queue shall generate end-to-end flow control credits. If
        a QP is associated with an SRQ, the HCA receive queue shall not
        generate end-to-end flow control credits.
    
    Add new configfs attributes that allow to configure which mode to use
    (/sys/kernel/config/target/srpt/$GUID/$GUID/attrib/use_srq). Note:
    only the attribute for port 1 is relevant on multi-port adapters.
    Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    dea26209
ib_srpt.h 12.4 KB