On 5/24/2022 1:49 PM, Steve French wrote:
Or alternatively - the "query network interfaces" ioctl - wonder if
additional flags that could be added (beyond what is defined in
MS-SMB2 2.2.32.5
Huh? I see no reason to expose this over the wire, it's entirely a local
device API question. Zero impact on the far side of the connection.
On Tue, May 24, 2022 at 4:16 AM David Howells <dhowells@xxxxxxxxxx> wrote:
Is there some way for cifs to ask the RDMA layer what it supports?
Yes, and in fact the client and server already fetch it. It's a
standard verbs device attibute.
client fs/cifs/smbdirect.c:
if (info->id->device->attrs.max_send_sge < SMBDIRECT_MAX_SGE) {
log_rdma_event(ERR,
"warning: device max_send_sge = %d too small\n",
info->id->device->attrs.max_send_sge);
log_rdma_event(ERR, "Queue Pair creation may fail\n");
}
if (info->id->device->attrs.max_recv_sge < SMBDIRECT_MAX_SGE) {
log_rdma_event(ERR,
"warning: device max_recv_sge = %d too small\n",
info->id->device->attrs.max_recv_sge);
log_rdma_event(ERR, "Queue Pair creation may fail\n");
}
server fs/ksmbd/transport_rdma.c:
if (device->attrs.max_send_sge < SMB_DIRECT_MAX_SEND_SGES) {
pr_err("warning: device max_send_sge = %d too small\n",
device->attrs.max_send_sge);
return -EINVAL;
}
if (device->attrs.max_recv_sge < SMB_DIRECT_MAX_RECV_SGES) {
pr_err("warning: device max_recv_sge = %d too small\n",
device->attrs.max_recv_sge);
return -EINVAL;
}
Tom.