• Wen Gu's avatar
    net/smc: add operations to merge sndbuf with peer DMB · 43988882
    Wen Gu authored
    In some scenarios using Emulated-ISM device, sndbuf can share the same
    physical memory region with peer DMB to avoid data copy from one side
    to the other. In such case the sndbuf is only a descriptor that
    describes the shared memory and does not actually occupy memory, it's
    more like a ghost buffer.
    
          +----------+                     +----------+
          | socket A |                     | socket B |
          +----------+                     +----------+
                |                               |
           +--------+                       +--------+
           | sndbuf |                       |  DMB   |
           |  desc  |                       |  desc  |
           +--------+                       +--------+
                |                               |
                |                          +----v-----+
                +-------------------------->  memory  |
                                           +----------+
    
    So here introduces three new SMC-D device operations to check if this
    feature is supported by device, and to {attach|detach} ghost sndbuf to
    peer DMB. For now only loopback-ism supports this.
    Signed-off-by: default avatarWen Gu <guwen@linux.alibaba.com>
    Reviewed-by: default avatarWenjia Zhang <wenjia@linux.ibm.com>
    Reviewed-and-tested-by: default avatarJan Karcher <jaka@linux.ibm.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    43988882
smc_ism.h 2.64 KB