Date: Fri, 24 Nov 2017 12:05:50 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r326159 - projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core Message-ID: <201711241205.vAOC5oHE089850@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Fri Nov 24 12:05:49 2017 New Revision: 326159 URL: https://svnweb.freebsd.org/changeset/base/326159 Log: Compile fix for LINT-NOIP kernel target. Sponsored by: Mellanox Technologies Modified: projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_ud_header.c projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_verbs.c Modified: projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c ============================================================================== --- projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Fri Nov 24 11:37:41 2017 (r326158) +++ projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c Fri Nov 24 12:05:49 2017 (r326159) @@ -168,7 +168,9 @@ roce_gid_update_addr_callback(struct ib_device *device }; struct ipx_entry *entry; struct net_device *idev; +#if defined(INET) || defined(INET6) struct ifaddr *ifa; +#endif union ib_gid gid; int default_gids; u16 index_num; Modified: projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_ud_header.c ============================================================================== --- projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_ud_header.c Fri Nov 24 11:37:41 2017 (r326158) +++ projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_ud_header.c Fri Nov 24 12:05:49 2017 (r326159) @@ -282,6 +282,7 @@ static const struct ib_field deth_table[] = { __sum16 ib_ud_ip4_csum(struct ib_ud_header *header) { +#if defined(INET) || defined(INET6) struct ip iph; iph.ip_hl = 5; @@ -297,6 +298,9 @@ __sum16 ib_ud_ip4_csum(struct ib_ud_header *header) iph.ip_dst.s_addr = header->ip4.daddr; return in_cksum_hdr(&iph); +#else + return 0; +#endif } EXPORT_SYMBOL(ib_ud_ip4_csum); Modified: projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_verbs.c Fri Nov 24 11:37:41 2017 (r326158) +++ projects/bsd_rdma_4_9/sys/ofed/drivers/infiniband/core/ib_verbs.c Fri Nov 24 12:05:49 2017 (r326159) @@ -355,7 +355,9 @@ static int ib_get_header_version(const union rdma_netw */ memcpy(&ip4h_checked, ip4h, sizeof(ip4h_checked)); ip4h_checked.ip_sum = 0; +#if defined(INET) || defined(INET6) ip4h_checked.ip_sum = in_cksum_hdr(&ip4h_checked); +#endif /* if IPv4 header checksum is OK, believe it */ if (ip4h->ip_sum == ip4h_checked.ip_sum) return 4;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711241205.vAOC5oHE089850>