X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Finclude%2Flnet%2Fnal.h;fp=lnet%2Finclude%2Flnet%2Fnal.h;h=1f925c1685e2e0e1074db42edbc43fa935077bba;hb=944a01f5d1adb1ab5f7721d5c2d1cafcd3b2c915;hp=5b72046cd8b7be04fde8825759e99acde389bfe0;hpb=d79fc607ddc94e1b5bfcee6c0ebe4ad6045f2823;p=fs%2Flustre-release.git diff --git a/lnet/include/lnet/nal.h b/lnet/include/lnet/nal.h index 5b72046..1f925c1 100644 --- a/lnet/include/lnet/nal.h +++ b/lnet/include/lnet/nal.h @@ -18,32 +18,29 @@ typedef struct nal_t nal_t; struct nal_t { - ptl_ni_t ni; - int refct; - void *nal_data; - int *timeout; /* for libp30api users */ - int (*forward) (nal_t * nal, int index, /* Function ID */ - void *args, size_t arg_len, void *ret, size_t ret_len); + int nal_refct; + void *nal_data; - int (*shutdown) (nal_t * nal, int interface); + int (*startup) (nal_t *nal, ptl_pid_t requested_pid, + ptl_ni_limits_t *req, ptl_ni_limits_t *actual); + + void (*shutdown) (nal_t *nal); - int (*validate) (nal_t * nal, void *base, size_t extent); + int (*forward) (nal_t *nal, int index, /* Function ID */ + void *args, size_t arg_len, void *ret, size_t ret_len); - int (*yield) (nal_t * nal, unsigned long *flags, int milliseconds); + int (*yield) (nal_t *nal, unsigned long *flags, int milliseconds); - void (*lock) (nal_t * nal, unsigned long *flags); + void (*lock) (nal_t *nal, unsigned long *flags); - void (*unlock) (nal_t * nal, unsigned long *flags); + void (*unlock) (nal_t *nal, unsigned long *flags); }; -typedef nal_t *(ptl_interface_t) (int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid); -extern nal_t *PTL_IFACE_IP(int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid); -extern nal_t *PTL_IFACE_MYR(int, ptl_pt_index_t, ptl_ac_index_t, ptl_pid_t requested_pid); - extern nal_t *ptl_hndl2nal(ptl_handle_any_t * any); -#ifndef PTL_IFACE_DEFAULT -#define PTL_IFACE_DEFAULT (PTL_IFACE_IP) +#ifdef __KERNEL__ +extern int ptl_register_nal(ptl_interface_t interface, nal_t *nal); +extern void ptl_unregister_nal(ptl_interface_t interface); #endif #endif