Compile fix for LINT-NOIP kernel target.
Sponsored by: Mellanox Technologies
This commit is contained in:
parent
fd9e423c88
commit
e5806bf466
@ -168,7 +168,9 @@ roce_gid_update_addr_callback(struct ib_device *device, u8 port,
|
||||
};
|
||||
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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -355,7 +355,9 @@ static int ib_get_header_version(const union rdma_network_hdr *hdr)
|
||||
*/
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user