cifsglob.h (be9aac187433af6abba5fcc2e73d91d0794ba360) | cifsglob.h (2991b77409891e14a10b96899755c004b0c07edb) |
---|---|
1/* SPDX-License-Identifier: LGPL-2.1 */ 2/* 3 * 4 * Copyright (C) International Business Machines Corp., 2002,2008 5 * Author(s): Steve French (sfrench@us.ibm.com) 6 * Jeremy Allison (jra@samba.org) 7 * 8 */ --- 956 unchanged lines hidden (view full) --- 965{ 966 struct cifs_server_iface *iface = container_of(ref, 967 struct cifs_server_iface, 968 refcount); 969 list_del_init(&iface->iface_head); 970 kfree(iface); 971} 972 | 1/* SPDX-License-Identifier: LGPL-2.1 */ 2/* 3 * 4 * Copyright (C) International Business Machines Corp., 2002,2008 5 * Author(s): Steve French (sfrench@us.ibm.com) 6 * Jeremy Allison (jra@samba.org) 7 * 8 */ --- 956 unchanged lines hidden (view full) --- 965{ 966 struct cifs_server_iface *iface = container_of(ref, 967 struct cifs_server_iface, 968 refcount); 969 list_del_init(&iface->iface_head); 970 kfree(iface); 971} 972 |
973/* 974 * compare two interfaces a and b 975 * return 0 if everything matches. 976 * return 1 if a has higher link speed, or rdma capable, or rss capable 977 * return -1 otherwise. 978 */ 979static inline int 980iface_cmp(struct cifs_server_iface *a, struct cifs_server_iface *b) 981{ 982 int cmp_ret = 0; 983 984 WARN_ON(!a || !b); 985 if (a->speed == b->speed) { 986 if (a->rdma_capable == b->rdma_capable) { 987 if (a->rss_capable == b->rss_capable) { 988 cmp_ret = memcmp(&a->sockaddr, &b->sockaddr, 989 sizeof(a->sockaddr)); 990 if (!cmp_ret) 991 return 0; 992 else if (cmp_ret > 0) 993 return 1; 994 else 995 return -1; 996 } else if (a->rss_capable > b->rss_capable) 997 return 1; 998 else 999 return -1; 1000 } else if (a->rdma_capable > b->rdma_capable) 1001 return 1; 1002 else 1003 return -1; 1004 } else if (a->speed > b->speed) 1005 return 1; 1006 else 1007 return -1; 1008} 1009 | |
1010struct cifs_chan { 1011 unsigned int in_reconnect : 1; /* if session setup in progress for this channel */ 1012 struct TCP_Server_Info *server; 1013 struct cifs_server_iface *iface; /* interface in use */ 1014 __u8 signkey[SMB3_SIGN_KEY_SIZE]; 1015}; 1016 1017/* --- 1208 unchanged lines hidden --- | 973struct cifs_chan { 974 unsigned int in_reconnect : 1; /* if session setup in progress for this channel */ 975 struct TCP_Server_Info *server; 976 struct cifs_server_iface *iface; /* interface in use */ 977 __u8 signkey[SMB3_SIGN_KEY_SIZE]; 978}; 979 980/* --- 1208 unchanged lines hidden --- |