2 * Copyright (C) 2009-2012 Cray, Inc.
4 * Author: Nic Henke <nic@cray.com>
5 * Author: James Shimek <jshimek@cray.com>
7 * This file is part of Lustre, http://www.lustre.org.
9 * Lustre is free software; you can redistribute it and/or
10 * modify it under the terms of version 2 of the GNU General Public
11 * License as published by the Free Software Foundation.
13 * Lustre is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with Lustre; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #ifndef _GNILND_HSS_OPS_H
24 #define _GNILND_HSS_OPS_H
26 #include <linux/typecheck.h>
28 #if defined(GNILND_USE_RCA)
29 /* for krca nid & nic translation */
32 /* it isn't exported, so just point directly to it */
33 extern void send_hb_2_l0(void);
41 /* we use RCA types here to get the compiler to whine when we have
44 kgnilnd_nid_to_nicaddrs(rca_nid_t nid, int numnic, nic_addr_t *nicaddrs)
48 /* compile time checks to ensure that the RCA types match
49 * the LNet idea of NID and NIC */
50 typecheck(__u32, nid);
51 typecheck(__u32, *nicaddrs);
53 rc = krca_nid_to_nicaddrs(nid, numnic, nicaddrs);
55 CDEBUG(D_NETTRACE, "RCA nid %d -> nic 0x%x, rc: %d\n",
56 nid, nicaddrs[0], rc);
62 kgnilnd_nicaddr_to_nid(nic_addr_t nicaddr, rca_nid_t *nid)
64 /* compile time checks to ensure that the RCA types match
65 * the LNet idea of NID and NIC */
66 typecheck(__u32, nicaddr);
67 typecheck(__u32, nid[0]);
69 return krca_nicaddr_to_nid(nicaddr, nid);
73 kgnilnd_setup_nic_translation(__u32 device_id)
78 #endif /* GNILND_USE_RCA */
80 #endif /* _GNILND_HSS_OPS_H */