Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/include/sys/hcad.h
Real path: /usr/include/sys/hcad.h
Zurück
/* * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. */ #ifndef _SYS_HCAD_H #define _SYS_HCAD_H #include <sys/dditypes.h> #include <sys/nvpair.h> #include <sys/param.h> #ifdef __cplusplus extern "C" { #endif /* * HCA Driver Information (text emitted by modinfo(8)) */ #define HCAD_INFO "HCA Driver" /* * HCA Driver Name */ #define HCAD_DRIVER_NAME "hcad" #define HCAD_REG_VER_1 1 /* * HCA register structure */ typedef int (*hcad_cb_t)(void *); typedef int (*hcad_prop_cb_t)(void *, uint16_t, nvlist_t *); typedef struct hcad_reg_info_s { uint32_t version; char devpath[MAXPATHLEN + 1]; dev_info_t *hca_dip; dev_info_t *iov_dip; hcad_cb_t ib_reg_cb; hcad_cb_t ib_unreg_cb; hcad_prop_cb_t ib_set_prop_cb; hcad_prop_cb_t ib_get_prop_cb; void *cb_arg; uint16_t num_vf; uint16_t max_vf; boolean_t iov_vf; } hcad_reg_info_t; /* * The device to open for issuing IOCTLs */ #define HCAD_DEVCTL_DEV "/devices/pseudo/hcad@0:devctl" /* * HCA Common properties */ #define HCA_PROP_LISTS "prop-lists" /* nvlist array */ #define HCA_PROP_NUM_VF "num-vf" /* UINT16 */ #define HCA_PROP_MAX_HW_VF "max-hw-vf" /* UINT16 */ #define HCA_PROP_ACTIVE_VF "active-vf" /* UINT16 */ #define HCA_PROP_ZONE_ID "zone-id" /* INT32 */ #define HCA_PROP_IOV_OWNER "iov-owner" /* STRING */ #define HCA_PROP_NODEGUID "nodeguid" /* UINT64 */ #define HCA_PROP_PORT1GUIDS "port1guids" /* STRING */ #define HCA_PROP_PORT2GUIDS "port2guids" /* STRING */ #define HCA_PROP_PORT1PKEYS "port1pkeys" /* STRING */ #define HCA_PROP_PORT2PKEYS "port2pkeys" /* STRING */ #define HCA_PROP_VF_INDEX "vf-index" /* UINT16 */ #define HCA_PROP_DEVPATH "devpath" /* STRING */ #define HCA_PROP_NUM_VF_CONF "num-vf-conf" /* UINT16 */ #define HCA_PROP_DEVNAME "devname" /* STRING */ #define HCA_PROP_SMI_ENABLED "smi-enabled" /* STRING */ #define HCA_PROPVAL_ON "on" #define HCA_PROPVAL_OFF "off" #define HCA_PROPVAL_RO "readonly" /* * IOCTL codes and data structures. */ /* * HCAD_CTL_REG_IB (PF / VF) * Input: HCA device path * Output: None * HCAD_CTL_IOV_ALLOC (PF only) * Input: * HCA device path * VF Index: 0 means driver alloc one. * VF Properties: nvlist of zone-id, port guid/pkey * Output: * VF index * HCAD_CTL_IOV_FREE (PF only) * Input: * HCA device path * VF index * Output: * None * HCAD_CTL_IOV_SET_PROP (PF only) * Input: * HCA device path * VF index: 0 means PF * Property nvlist * PF list: num-vf * 0: turn off IOV * >0: turn on IOV with maximum num-vf VFs * Output: * None * HCAD_CTL_IOV_GET_PROP (PF only) * Input: * HCA device path * property list buf and length. * Output: * NV list array * [0]: PF nvlist * [1]: VF1 nvlist (empty if VF1 is not active) * [2]: VF2 nvlist * ............... * PF nvlist: max-hw-vf, num-vf, active-vf, iov-owner, guid/pkey, * VF nvlist: vf-index, zone-id, guid/pkey * property length: When buf == NULL */ #define HCAD_IOC (1 << 16) #define HCAD_CTL_REG_IB (HCAD_IOC + 1) /* register HCA to IB framework */ #define HCAD_CTL_IOV_ALLOC (HCAD_IOC + 2) /* alloc VF */ #define HCAD_CTL_IOV_FREE (HCAD_IOC + 3) /* free VF */ #define HCAD_CTL_IOV_SET_PROP (HCAD_IOC + 4) /* Set IOV Properties */ #define HCAD_CTL_IOV_GET_PROP (HCAD_IOC + 5) /* Get IOV Poperties */ #define HCAD_CTL_REP_UNREG (HCAD_IOC + 6) /* report unregistered hca */ typedef struct hcad_ioc_reg_ib_s { char hca_devpath[MAXPATHLEN + 1]; } hcad_ioc_reg_ib_t; typedef struct hcad_ioc_iov_s { uint64_t hca_nvlist_iovprop; uint32_t hca_nvlist_iovprop_sz; uint16_t vf_index; char hca_devpath[MAXPATHLEN + 1]; } hcad_ioc_iov_t; int hcad_register(hcad_reg_info_t *__reg); int hcad_unregister(char *__devpath); #ifdef __cplusplus } #endif #endif /* _SYS_HCAD_H */