• Steve French's avatar
    Query network adapter info at mount time for debugging · c481e9fe
    Steve French authored
    When CONFIG_CIFS_STATS2 enabled query adapter info for debugging
    
    It is easy now in SMB3 to query the information about the server's
    network interfaces (and at least Windows 8 and above do this, if not
    other clients) there are some useful pieces of information you can get
    including:
    
    - all of the network interfaces that the server advertises (not just
    the one you are mounting over), and with SMB3 supporting multichannel
    this helps with more than just failover (also aggregating multiple
    sockets under one mount)
    
    - whether the adapter supports RSS (useful to know if you want to
    estimate whether setting up two or more socket connections to the same
    address is going to be faster due to RSS offload in the adapter)
    
    - whether the server supports RDMA
    
    - whether the server has IPv6 interfaces (if you connected over IPv4
    but prefer IPv6 e.g.)
    
    - what the link speed is (you might want to reconnect over a higher
    speed interface if available)
    
    (Of course we could also rerequest this on every mount cheaplly to the
    same server, as Windows apparently does, so we can update the adapter
    info on new mounts, and also on every reconnect if the network
    interface drops temporarily - so we don't have to rely on info from
    the first mount to this server)
    
    It is trivial to request this information - and certainly will be useful
    when we get to the point of doing multichannel (and eventually RDMA),
    but some of this (linkspeed etc.) info may help for debugging in
    the meantime.  Enable this request when CONFIG_CIFS_STATS2 is on
    (only for smb3 mounts since it is an SMB3 or later ioctl).
    Signed-off-by: default avatarSteve French <smfrench@gmail.com>
    c481e9fe
smb2ops.c 36.8 KB