1. kernel: 3.3 removes NETIF_F_NO_CSUM feature bit
(kernel commit
34324dc2bf27c1773045fea63cb11f7e2a6ad2b9)
The only one place uses NETIF_F_NO_CSUM is to check
"(caps & (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM | NETIF_F_HW_CSUM))".
Replace (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
as NETIF_F_ALL_CSUM which was added since kernel 2.6.17
(kernel commit
8648b3053bff39a7ee4c711d74268079c928a657)
2. Kernel 3.1 kills LOOKUP_CONTINUE, LOOKUP_PARENT is equivalent
to it since that.
See kernel commit
49084c3bb2055c401f3493c13edae14d49128ca0
Another minor change is adding "#include <linux/module.h>" to
libcfs/linux/linux-crypto-adler.c, linux-crypto-crc32.c.
Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I4f3621fcb921c866b33881027a4a0a491d676640
Reviewed-on: http://review.whamcloud.com/3398
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
* This is crypto api shash wrappers to zlib_adler32.
*/
+#include <linux/module.h>
#include <linux/zutil.h>
#ifdef HAVE_STRUCT_SHASH_ALG
#include <crypto/internal/hash.h>
* This is crypto api shash wrappers to crc32_le.
*/
+#include <linux/module.h>
#include <linux/crc32.h>
#ifdef HAVE_STRUCT_SHASH_ALG
#include <crypto/internal/hash.h>
int
ksocknal_lib_zc_capable(ksock_conn_t *conn)
{
- int caps = conn->ksnc_sock->sk->sk_route_caps;
+ int caps = conn->ksnc_sock->sk->sk_route_caps;
- if (conn->ksnc_proto == &ksocknal_protocol_v1x)
- return 0;
+ if (conn->ksnc_proto == &ksocknal_protocol_v1x)
+ return 0;
- /* ZC if the socket supports scatter/gather and doesn't need software
- * checksums */
- return ((caps & NETIF_F_SG) != 0 &&
- (caps & (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)) != 0);
+ /* ZC if the socket supports scatter/gather and doesn't need software
+ * checksums */
+ return ((caps & NETIF_F_SG) != 0 && (caps & NETIF_F_ALL_CSUM) != 0);
}
int
#define VM_FAULT_RETRY 0
#endif
+/* Kernel 3.1 kills LOOKUP_CONTINUE, LOOKUP_PARENT is equivalent to it.
+ * seem kernel commit 49084c3bb2055c401f3493c13edae14d49128ca0 */
+#ifndef LOOKUP_CONTINUE
+#define LOOKUP_CONTINUE LOOKUP_PARENT
+#endif
+
/** Only used on client-side for indicating the tail of dir hash/offset. */
#define LL_DIR_END_OFF 0x7fffffffffffffffULL
#define LL_DIR_END_OFF_32BIT 0x7fffffffUL