! ! !
unknown - 5 years ago 2015-10-23 22:26:03
unknown@example.com
ESXi-5.5-GA
841 files changed:
Changeset was too big and was cut off... Show full diff anyway
↑ Collapse Diff ↑
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.vmkplexer", "2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "2.0"
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.vmkplexer", "3.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "3.0"
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,6 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.broadcom.cnic_register", "9.2.1.0");
9
 
VMK_NAMESPACE_PROVIDES("com.broadcom.bnx2", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
11
 
VMK_NAMESPACE_REQUIRED("com.broadcom.cnic_register", "9.2.2.0");
 
new file 100644
1
 

	
2
 
/*
3
 
 * DO NOT EDIT THIS FILE - IT IS GENERATED BY THE DRIVER BUILD.
4
 
 *
5
 
 * If you need to change the driver's name spaces, look in the scons
6
 
 * files for the driver's defineVmkDriver() rule.
7
 
 */
8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.broadcom.cnic", "9.2.2.0");
10
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfcoe", "9.2.2.0");
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfc", "9.2.2.0");
...
 
@@ -6,5 +6,6 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.broadcom.cnic", "9.2.1.0");
10
 
VMK_NAMESPACE_REQUIRED("com.vmware.iscsi_linux", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.broadcom.cnic", "9.2.2.0");
10
 
VMK_NAMESPACE_REQUIRED("com.broadcom.cnic_register", "9.2.2.0");
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.iscsi_linux", "9.2.2.0");
...
 
@@ -6,4 +6,6 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.broadcom.cnic_register", "9.2.1.0");
9
 
VMK_NAMESPACE_PROVIDES("com.broadcom.bnx2x", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
11
 
VMK_NAMESPACE_REQUIRED("com.broadcom.cnic_register", "9.2.2.0");
...
 
@@ -6,6 +6,6 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.broadcom.cnic", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
11
 
VMK_NAMESPACE_REQUIRED("com.broadcom.cnic_register", "9.2.1.0");
9
 
VMK_NAMESPACE_PROVIDES("com.broadcom.cnic", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
11
 
VMK_NAMESPACE_REQUIRED("com.broadcom.cnic_register", "9.2.2.0");
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.broadcom.cnic_register", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
9
 
VMK_NAMESPACE_PROVIDES("com.broadcom.cnic_register", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfc", "9.2.1.0");
10
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfcoe", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfc", "9.2.2.0");
10
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfcoe", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.ipmi", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.ipmi", "9.2.2.0");
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.ipmi", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.ipmi", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.ipmi", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.ipmi", "9.2.2.0");
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.lsi.megaraid_mbox", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
9
 
VMK_NAMESPACE_PROVIDES("com.lsi.megaraid_mbox", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
 
new file 100644
1
 

	
2
 
/*
3
 
 * DO NOT EDIT THIS FILE - IT IS GENERATED BY THE DRIVER BUILD.
4
 
 *
5
 
 * If you need to change the driver's name spaces, look in the scons
6
 
 * files for the driver's defineVmkDriver() rule.
7
 
 */
8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.mellanox.mlx4_core", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
 
new file 100644
1
 

	
2
 
/*
3
 
 * DO NOT EDIT THIS FILE - IT IS GENERATED BY THE DRIVER BUILD.
4
 
 *
5
 
 * If you need to change the driver's name spaces, look in the scons
6
 
 * files for the driver's defineVmkDriver() rule.
7
 
 */
8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.mellanox.mlx4_core", "9.2.2.0");
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.netxen.nx_nic", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
9
 
VMK_NAMESPACE_PROVIDES("com.netxen.nx_nic", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,6 +6,6 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.qla4xxx", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.iscsi_linux", "9.2.1.0");
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.qla4xxx", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.iscsi_linux", "9.2.2.0");
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.random", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.random", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.broadcom.tg3", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
9
 
VMK_NAMESPACE_PROVIDES("com.broadcom.tg3", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
...
 
@@ -44,7 +44,9 @@ static inline struct task_struct *get_current(void)
44 44
 
 *  Pointer to current task of type task_struct  
45 45
 
 *                                           
46 46
 
 */                                          
47
 
/* _VMKLNX_CODECHECK_: current */
47
 
/* If the macro 'current' or its comments are changed please 
48
 
 * update the documentation for 'current' in vmkdrivers/src_92/doc/dummyDefs.doc
49
 
 */
48 50
 
#define current get_current()
49 51
 

	
50 52
 
#else
...
 
@@ -185,11 +185,16 @@ static inline void * phys_to_virt(unsigned long address)
185 185
 

	
186 186
 
/**
187 187
 
 *  page_to_phys - page handle to machine address
188
 
 *  @maddr : machine address
188
 
 *  @page : page handle
189
 
 *
190
 
 *  Gets the machine address that corresponds to the page parameter
189 191
 
 *
190 192
 
 *  ESX Deviation Notes:
191 193
 
 *  None.
192 194
 
 *
195
 
 *  RETURN VALUE:
196
 
 *  A machine address
197
 
 *
193 198
 
 */
194 199
 
/* _VMKLNX_CODECHECK_: page_to_phys */
195 200
 
#define page_to_phys(page)  ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
...
 
@@ -352,9 +352,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
352 352
 
/* _VMKLNX_CODECHECK_: rmb */
353 353
 
#define rmb()	asm volatile("lfence":::"memory")
354 354
 

	
355
 
#ifdef CONFIG_UNORDERED_IO
356
 
#define wmb()	asm volatile("sfence" ::: "memory")
357
 
#else
358 355
 
/**
359 356
 
 *  wmb - write memory barrier 
360 357
 
 *
...
 
@@ -368,9 +365,16 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
368 365
 
 *  RETURN VALUE:
369 366
 
 *  NONE
370 367
 
 */
368
 
/*
369
 
 * VMware : 2013
370
 
 *
371
 
 * As mentioned in PR 891237, CONFIG_UNORDERED_IO was removed from Linux
372
 
 * on 03/25/2006 by Andi Kleen ("x86_64: Remove CONFIG_UNORDERED_IO"). Here
373
 
 * wmb() is being changed to a real sfence instead of just a compile barrier.
374
 
 */
371 375
 
/* _VMKLNX_CODECHECK_: wmb */
372
 
#define wmb()	asm volatile("" ::: "memory")
373
 
#endif
376
 
#define wmb()	asm volatile("sfence" ::: "memory")
377
 

	
374 378
 
#define read_barrier_depends()	do {} while(0)
375 379
 
#define set_mb(var, value) do { (void) xchg(&var, value); } while (0)
376 380
 

	
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.1.0");
10
 
VMK_NAMESPACE_REQUIRED("com.vmware.usbnet", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.2.0");
10
 
VMK_NAMESPACE_REQUIRED("com.vmware.usbnet", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.2.0");
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfcoe", "9.2.1.0");
10
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfc", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfcoe", "9.2.2.0");
10
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfc", "9.2.2.0");
...
 
@@ -6,6 +6,6 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.usbhid", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.1.0");
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.usbhid", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.2.0");
...
 
@@ -8,4 +8,4 @@
8 8
 

	
9 9
 
VMK_NAMESPACE_PROVIDES("com.vmware.iscsi_linux", "9.2.0.0");
10 10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.0.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.iscsi_linux", "9.2.1.0");
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.iscsi_linux", "9.2.2.0");
 
new file 100644
1
 

	
2
 
/*
3
 
 * DO NOT EDIT THIS FILE - IT IS GENERATED BY THE DRIVER BUILD.
4
 
 *
5
 
 * If you need to change the driver's name spaces, look in the scons
6
 
 * files for the driver's defineVmkDriver() rule.
7
 
 */
8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.iscsi_linux", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.iscsi_linux", "9.2.2.0");
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libata", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libata", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
...
 
@@ -8,4 +8,4 @@
8 8
 

	
9 9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libata", "9.2.0.0");
10 10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.0.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.1.0");
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
 
new file 100644
1
 

	
2
 
/*
3
 
 * DO NOT EDIT THIS FILE - IT IS GENERATED BY THE DRIVER BUILD.
4
 
 *
5
 
 * If you need to change the driver's name spaces, look in the scons
6
 
 * files for the driver's defineVmkDriver() rule.
7
 
 */
8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libata", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libata", "9.2.2.0");
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libfc", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libfc", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
...
 
@@ -8,4 +8,4 @@
8 8
 

	
9 9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libfc", "9.2.0.0");
10 10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.0.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfc", "9.2.1.0");
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfc", "9.2.2.0");
 
new file 100644
1
 

	
2
 
/*
3
 
 * DO NOT EDIT THIS FILE - IT IS GENERATED BY THE DRIVER BUILD.
4
 
 *
5
 
 * If you need to change the driver's name spaces, look in the scons
6
 
 * files for the driver's defineVmkDriver() rule.
7
 
 */
8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libfc", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfc", "9.2.2.0");
...
 
@@ -6,6 +6,6 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libfcoe", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfc", "9.2.1.0");
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libfcoe", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfc", "9.2.2.0");
...
 
@@ -8,4 +8,4 @@
8 8
 

	
9 9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libfcoe", "9.2.0.0");
10 10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.0.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfcoe", "9.2.1.0");
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfcoe", "9.2.2.0");
 
new file 100644
1
 

	
2
 
/*
3
 
 * DO NOT EDIT THIS FILE - IT IS GENERATED BY THE DRIVER BUILD.
4
 
 *
5
 
 * If you need to change the driver's name spaces, look in the scons
6
 
 * files for the driver's defineVmkDriver() rule.
7
 
 */
8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.libfcoe", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.libfcoe", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.2.0");
...
 
@@ -6,6 +6,6 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.usbstorage", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.1.0");
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.usbstorage", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.2.0");
...
 
@@ -6,4 +6,4 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.1.0");
9
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.2.0");
...
 
@@ -6,5 +6,5 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.usb", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.usb", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
...
 
@@ -6,6 +6,6 @@
6 6
 
 * files for the driver's defineVmkDriver() rule.
7 7
 
 */
8 8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.usbnet", "9.2.1.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.1.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.1.0");
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.usbnet", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.usb", "9.2.2.0");
...
 
@@ -8,4 +8,4 @@
8 8
 

	
9 9
 
VMK_NAMESPACE_PROVIDES("com.vmware.driverAPI", "9.2");
10 10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.vmkplexer", "2.0");
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.vmkplexer", "3.0");
 
new file 100644
1
 

	
2
 
/*
3
 
 * DO NOT EDIT THIS FILE - IT IS GENERATED BY THE DRIVER BUILD.
4
 
 *
5
 
 * If you need to change the driver's name spaces, look in the scons
6
 
 * files for the driver's defineVmkDriver() rule.
7
 
 */
8
 

	
9
 
VMK_NAMESPACE_PROVIDES("com.vmware.driverAPI", "9.2.2.0");
10
 
#define VMKLNX_MY_NAMESPACE_VERSION "9.2.2.0"
11
 
VMK_NAMESPACE_REQUIRED("com.vmware.driverAPI", "9.2");
...
 
@@ -129,7 +129,7 @@ static inline void vmk_AtomicDec64(
129 129
 
{
130 130
 
   vmk_AtomicPrologue();
131 131
 
   __asm__ __volatile__(
132
 
      "lock; decl %0"
132
 
      "lock; decq %0"
133 133
 
      : "+m" (*var)
134 134
 
      :
135 135
 
      : "cc"
...
 
@@ -158,7 +158,7 @@ static inline void vmk_AtomicAdd64(
158 158
 
   __asm__ __volatile__(
159 159
 
      "lock; addq %1, %0"
160 160
 
      : "+m" (*var)
161
 
      : "ri" (val)
161
 
      : "re" (val)
162 162
 
      : "cc"
163 163
 
   );
164 164
 
   vmk_AtomicEpilogue();
...
 
@@ -184,7 +184,7 @@ static inline void vmk_AtomicSub64(
184 184
 
   __asm__ __volatile__(
185 185
 
      "lock; subq %1, %0"
186 186
 
      : "+m" (*var)
187
 
      : "ri" (val)
187
 
      : "re" (val)
188 188
 
      : "cc"
189 189
 
   );
190 190
 
   vmk_AtomicEpilogue();
...
 
@@ -211,7 +211,7 @@ static inline void vmk_AtomicOr64(
211 211
 
   __asm__ __volatile__(
212 212
 
      "lock; orq %1, %0"
213 213
 
      : "+m" (*var)
214
 
      : "ri" (val)
214
 
      : "re" (val)
215 215
 
      : "cc"
216 216
 
   );
217 217
 
   vmk_AtomicEpilogue();
...
 
@@ -237,7 +237,7 @@ static inline void vmk_AtomicAnd64(
237 237
 
   __asm__ __volatile__(
238 238
 
      "lock; andq %1, %0"
239 239
 
      : "+m" (*var)
240
 
      : "ri" (val)
240
 
      : "re" (val)
241 241
 
      : "cc"
242 242
 
   );
243 243
 
   vmk_AtomicEpilogue();
...
 
@@ -263,7 +263,7 @@ static inline void vmk_AtomicXor64(
263 263
 
   __asm__ __volatile__(
264 264
 
      "lock; xorq %1, %0"
265 265
 
      : "+m" (*var)
266
 
      : "ri" (val)
266
 
      : "re" (val)
267 267
 
      : "cc"
268 268
 
   );
269 269
 
   vmk_AtomicEpilogue();
1 1
 
/* **********************************************************
2
 
 * Copyright 1998 - 2010 VMware, Inc.  All rights reserved.
2
 
 * Copyright 1998 - 2010,2012 VMware, Inc.  All rights reserved.
3 3
 
 * **********************************************************/
4 4
 

	
5 5
 
/*
...
 
@@ -51,8 +51,11 @@
51 51
 
/** \brief Don't block for file operations. */
52 52
 
#define VMK_CHARDEV_OFLAG_NONBLOCK     0x00000800
53 53
 

	
54
 
/** \brief Synchronous file operations. */
55
 
#define VMK_CHARDEV_OFLAG_SYNC         0x00001000
54
 
/** \brief File integerity for synchronous file I/O. */
55
 
#define VMK_CHARDEV_OFLAG_SYNC         0x00101000
56
 

	
57
 
/** \brief Data integrity for synchronous file I/O. */
58
 
#define VMK_CHARDEV_OFLAG_DSYNC        0x00001000
56 59
 

	
57 60
 
/** \brief Use direct I/O. */
58 61
 
#define VMK_CHARDEV_OFLAG_DIRECT       0x00004000
...
 
@@ -107,24 +110,34 @@ typedef struct vmk_CharDevFdAttr {
107 110
 
} vmk_CharDevFdAttr;
108 111
 

	
109 112
 
/**
110
 
 * \brief Opaque handle to a character device.
113
 
 * \brief Opaque poll token handle.
111 114
 
 */
112
 
typedef struct vmkCharDevInt* vmk_CharDev;
115
 
typedef void *vmk_PollToken;
113 116
 

	
114 117
 
/**
115
 
 * \brief A default initialization value for a vmk_CharDev.
118
 
 * \brief Opaque poll context handle.
116 119
 
 */
117
 
#define VMK_INVALID_CHARDEV (NULL)
120
 
typedef void *vmk_PollContext;
118 121
 

	
119 122
 
/**
120
 
 * \brief Opaque poll token handle.
123
 
 * \brief Identifier for logical graphics devices.
121 124
 
 */
122
 
typedef void *vmk_PollToken;
125
 
#define VMK_CHARDEV_IDENTIFIER_GRAPHICS "com.vmware.graphics"
123 126
 

	
124 127
 
/**
125
 
 * \brief Opaque poll context handle.
128
 
 * \brief Character device driver's entry points.
126 129
 
 */
127
 
typedef void *vmk_PollContext;
130
 
struct vmk_CharDevOps;
131
 

	
132
 
/** \brief Character device registration data. */
133
 
typedef struct vmk_CharDevRegData {
134
 
   /** \brief Module creating this device. */
135
 
   vmk_ModuleID moduleID;
136
 
   /** \brief Device operations. */
137
 
   const struct vmk_CharDevOps *fileOps;
138
 
   /** \brief Device private data. */
139
 
   vmk_AddrCookie devicePrivate;
140
 
} vmk_CharDevRegData;
128 141
 

	
129 142
 
/**
130 143
 
 ***********************************************************************
...
 
@@ -330,93 +343,6 @@ typedef struct vmk_CharDevOps {
330 343
 
   vmk_CharDevWriteFn  write;
331 344
 
} vmk_CharDevOps;
332 345
 

	
333
 
/**
334
 
 ***********************************************************************
335
 
 * vmk_CharDevCleanupFn --                                        */ /**
336
 
 *
337
 
 * \brief Prototype for a character device driver's cleanup callback.
338
 
 *
339
 
 * \param[in]  private  Optional private data to be used by the callback
340
 
 *
341
 
 * \retval VMK_OK The cleanup function executed correctly.
342
 
 *                This is not an indicator of the success or failure of
343
 
 *                the operations in the function, but merely that they
344
 
 *                ran.  Any other return value is not allowed.
345
 
 *
346
 
 ***********************************************************************
347
 
 */
348
 
typedef VMK_ReturnStatus (*vmk_CharDevCleanupFn)(vmk_AddrCookie private);
349
 

	
350
 
/*
351
 
 ***********************************************************************
352
 
 * vmk_CharDevRegister --                                         */ /**
353
 
 *
354
 
 * \brief Register the specified character device, to be invoked from
355
 
 *        user-space.
356
 
 *
357
 
 * \param[in]  module         Module that owns the character device.
358
 
 * \param[in]  name           The name of the device - this must be unique.
359
 
 * \param[in]  fileOps        Table of the driver file operations.
360
 
 *                            Neither open nor close can be supplied 
361
 
 *                            without the other.
362
 
 *                            If read or write operations are supplied, 
363
 
 *                            then open and close must also be supplied.
364
 
 * \param[in]  cleanup        Function automatically invoked to clean up
365
 
 *                            after all file ops have ceased and the 
366
 
 *                            device has been unregistered.  May be NULL.
367
 
 * \param[in]  devicePrivate  Data given to the driver for each file 
368
 
 *                            op and cleaned up after unregistration.
369
 
 * \param[out] assignedHandle Handle to the registered character device.
370
 
 *
371
 
 * \retval VMK_EXISTS         A device with that name is already registered
372
 
 * \retval VMK_FAILURE        Unable to allocate internal slot for the device
373
 
 * \retval VMK_NO_MEMORY      Unable to allocate memory for device metadata
374
 
 * \retval VMK_BAD_PARAM      Module ID was invalid, name was invalid,
375
 
 *                            or one or more specified driver ops are NULL
376
 
 *
377
 
 ***********************************************************************
378
 
 */
379
 
VMK_ReturnStatus vmk_CharDevRegister(
380
 
   vmk_ModuleID module,
381
 
   const char *name,
382
 
   const vmk_CharDevOps *fileOps,
383
 
   vmk_CharDevCleanupFn cleanup,
384
 
   vmk_AddrCookie devicePrivate,
385
 
   vmk_CharDev *assignedHandle);
386
 

	
387
 
/*
388
 
 ***********************************************************************
389
 
 * vmk_CharDevUnregister --                                       */ /**
390
 
 *
391
 
 * \brief Unregister a character device.
392
 
 *
393
 
 * The character device will be unregistered automatically by
394
 
 * the kernel only after all open files to the device have been
395
 
 * closed.  If no files are open when vmk_CharDevUnregister is
396
 
 * called, the device may be unregistered immediately and have the
397
 
 * cleanup function registered with it invoked.  If the device has 
398
 
 * files open, vmk_CharDevUnregister internally defers the device for 
399
 
 * later automatic removal and returns to the caller immediately.  When 
400
 
 * the last file is closed, the device will then be destroyed and the 
401
 
 * cleanup function invoked.
402
 
 * 
403
 
 * \note No new open files to the device can be created after calling
404
 
 *       vmk_CharDevUnregister.
405
 
 * \note The vmkernel will prevent a module from being unloaded while
406
 
 *       it has open files associated with a character device, even
407
 
 *       if that device has been requested to be unregistered.
408
 
 *
409
 
 * \param[in] deviceHandle Handle of device assigned during registration.
410
 
 *
411
 
 * \retval VMK_NOT_FOUND The device does not exist.
412
 
 * \retval VMK_OK The device was either unregistered or internally
413
 
 *                deferred for unregistration once all associated files
414
 
 *                close.
415
 
 *
416
 
 ***********************************************************************
417
 
 */
418
 
VMK_ReturnStatus vmk_CharDevUnregister(vmk_CharDev deviceHandle);
419
 

	
420 346
 
/*
421 347
 
 ***********************************************************************
422 348
 
 * vmk_CharDevWakePollers --                                      */ /**
 
new file 100644
1
 
/* **********************************************************
2
 
 * Copyright 2012 VMware, Inc.  All rights reserved.
3
 
 * **********************************************************/
4
 

	
5
 
/*
6
 
 * @VMKAPIMOD_LICENSE@
7
 
 */
8
 

	
9
 
/*
10
 
 ***********************************************************************
11
 
 * Character Devices                                              */ /**
12
 
 * \addtogroup CharDev 
13
 
 *
14
 
 * Interfaces that allow registration of generic vmkernel character
15
 
 * device nodes.
16
 
 *
17
 
 * @{
18
 
 ***********************************************************************
19
 
 */
20
 

	
21
 
#ifndef _VMKAPI_CHAR_LEGACY_H_
22
 
#define _VMKAPI_CHAR_LEGACY_H_
23
 

	
24
 
/** \cond never */
25
 
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
26
 
#error This vmkapi file should never be included directly but only via vmkapi.h
27
 
#endif
28
 
/** \endcond never */
29
 

	
30
 
/**
31
 
 * \brief Opaque handle to a character device.
32
 
 */
33
 
typedef struct vmkCharDevInt* vmk_CharDev;
34
 

	
35
 
/**
36
 
 * \brief A default initialization value for a vmk_CharDev.
37
 
 */
38
 
#define VMK_INVALID_CHARDEV (NULL)
39
 

	
40
 
/**
41
 
 ***********************************************************************
42
 
 * vmk_CharDevCleanupFn --                                        */ /**
43
 
 *
44
 
 * \brief Prototype for a character device driver's cleanup callback.
45
 
 *
46
 
 * \param[in]  private  Optional private data to be used by the callback
47
 
 *
48
 
 * \retval VMK_OK The cleanup function executed correctly.
49
 
 *                This is not an indicator of the success or failure of
50
 
 *                the operations in the function, but merely that they
51
 
 *                ran.  Any other return value is not allowed.
52
 
 *
53
 
 ***********************************************************************
54
 
 */
55
 
typedef VMK_ReturnStatus (*vmk_CharDevCleanupFn)(vmk_AddrCookie private);
56
 

	
57
 
/*
58
 
 ***********************************************************************
59
 
 * vmk_CharDevRegister --                                         */ /**
60
 
 *
61
 
 * \brief Register the specified character device, to be invoked from
62
 
 *        user-space.
63
 
 *
64
 
 * \nativedriversdisallowed
65
 
 *
66
 
 * \param[in]  module         Module that owns the character device.
67
 
 * \param[in]  name           The name of the device - this must be unique.
68
 
 * \param[in]  fileOps        Table of the driver file operations.
69
 
 *                            Neither open nor close can be supplied 
70
 
 *                            without the other.
71
 
 *                            If read or write operations are supplied, 
72
 
 *                            then open and close must also be supplied.
73
 
 * \param[in]  cleanup        Function automatically invoked to clean up
74
 
 *                            after all file ops have ceased and the 
75
 
 *                            device has been unregistered.  May be NULL.
76
 
 * \param[in]  devicePrivate  Data given to the driver for each file 
77
 
 *                            op and cleaned up after unregistration.
78
 
 * \param[out] assignedHandle Handle to the registered character device.
79
 
 *
80
 
 * \retval VMK_EXISTS         A device with that name is already registered
81
 
 * \retval VMK_FAILURE        Unable to allocate internal slot for the device
82
 
 * \retval VMK_NO_MEMORY      Unable to allocate memory for device metadata
83
 
 * \retval VMK_BAD_PARAM      Module ID was invalid, name was invalid,
84
 
 *                            or one or more specified driver ops are NULL
85
 
 *
86
 
 ***********************************************************************
87
 
 */
88
 
VMK_ReturnStatus vmk_CharDevRegister(
89
 
   vmk_ModuleID module,
90
 
   const char *name,
91
 
   const vmk_CharDevOps *fileOps,
92
 
   vmk_CharDevCleanupFn cleanup,
93
 
   vmk_AddrCookie devicePrivate,
94
 
   vmk_CharDev *assignedHandle);
95
 

	
96
 
/*
97
 
 ***********************************************************************
98
 
 * vmk_CharDevUnregister --                                       */ /**
99
 
 *
100
 
 * \brief Unregister a character device.
101
 
 *
102
 
 * The character device will be unregistered automatically by
103
 
 * the kernel only after all open files to the device have been
104
 
 * closed.  If no files are open when vmk_CharDevUnregister is
105
 
 * called, the device may be unregistered immediately and have the
106
 
 * cleanup function registered with it invoked.  If the device has 
107
 
 * files open, vmk_CharDevUnregister internally defers the device for 
108
 
 * later automatic removal and returns to the caller immediately.  When 
109
 
 * the last file is closed, the device will then be destroyed and the 
110
 
 * cleanup function invoked.
111
 
 * 
112
 
 * \nativedriversdisallowed
113
 
 * \note No new open files to the device can be created after calling
114
 
 *       vmk_CharDevUnregister.
115
 
 * \note The vmkernel will prevent a module from being unloaded while
116
 
 *       it has open files associated with a character device, even
117
 
 *       if that device has been requested to be unregistered.
118
 
 *
119
 
 * \param[in] deviceHandle Handle of device assigned during registration.
120
 
 *
121
 
 * \retval VMK_NOT_FOUND The device does not exist.
122
 
 * \retval VMK_OK The device was either unregistered or internally
123
 
 *                deferred for unregistration once all associated files
124
 
 *                close.
125
 
 *
126
 
 ***********************************************************************
127
 
 */
128
 
VMK_ReturnStatus vmk_CharDevUnregister(vmk_CharDev deviceHandle);
129
 

	
130
 
#endif /* _VMKAPI_CHAR_LEGACY_H_ */
131
 
/** @} */
...
 
@@ -190,6 +190,31 @@ void vmk_HeapDestroy(vmk_HeapID heap);
190 190
 

	
191 191
 
/*
192 192
 
 ***********************************************************************
193
 
 * vmk_HeapDestroySync --                                         */ /**
194
 
 *
195
 
 * \brief Destroy a dynamic heap.  If the heap is non-empty, wait
196
 
 *        for it to become empty before destroying.
197
 
 *
198
 
 * \note  This function may block if the heap is non-empty.
199
 
 *
200
 
 * \param[in] heap      Heap to destroy.
201
 
 * \param[in] timeoutMS Timeout in milliseconds.  Zero means no timeout.
202
 
 *
203
 
 * \retval VMK_OK               Heap was destroyed successfully.
204
 
 * \retval VMK_DEATH_PENDING    World was killed while waiting and the
205
 
 *                              heap was not destroyed.
206
 
 * \retval VMK_WAIT_INTERRUPTED The wait was interrupted and the heap
207
 
 *                              was not destroyed.
208
 
 * \retval VMK_TIMEOUT          The wait timed out and the heap was
209
 
 *                              not destroyed.
210
 
 *
211
 
 ***********************************************************************
212
 
 */
213
 
VMK_ReturnStatus vmk_HeapDestroySync(vmk_HeapID heap,
214
 
                                     vmk_int64 timeoutMS);
215
 

	
216
 
/*
217
 
 ***********************************************************************
193 218
 
 * vmk_HeapFree --                                                */ /**
194 219
 
 *
195 220
 
 * \brief Free memory allocated with vmk_HeapAlloc.
...
 
@@ -204,6 +204,20 @@ VMK_ReturnStatus vmk_LogUnregister(
204 204
 

	
205 205
 
/*
206 206
 
 ***********************************************************************
207
 
 * vmk_LogHeapAllocSize --                                        */ /**
208
 
 *
209
 
 * \brief Amount of heap space needed per registered log component
210
 
 *
211
 
 * \note  This function will not block.
212
 
 *
213
 
 * \retval Number of bytes to set aside in a heap per log component
214
 
 *
215
 
 ***********************************************************************
216
 
 */
217
 
vmk_ByteCount vmk_LogHeapAllocSize(void);
218
 

	
219
 
/*
220
 
 ***********************************************************************
207 221
 
 * vmk_LogGetName --                                              */ /**
208 222
 
 *
209 223
 
 * \brief Get log component name as a printable string.
...
 
@@ -311,7 +325,7 @@ vmk_int32 vmk_LogGetCurrentLogLevel(
311 325
 
#define vmk_Warning(handle, fmt, args...) \
312 326
 
    vmk_LogLevel(VMK_LOG_URGENCY_WARNING, \
313 327
 
                 handle, vmk_LogGetCurrentLogLevel(handle),   \
314
 
                 "%s: %s:%d:" fmt "\n", vmk_LogGetName(handle), \
328
 
                 "%s: %s:%d: " fmt "\n", vmk_LogGetName(handle), \
315 329
 
                 __FUNCTION__, __LINE__, ##args)
316 330
 

	
317 331
 
/*
...
 
@@ -335,7 +349,7 @@ vmk_int32 vmk_LogGetCurrentLogLevel(
335 349
 
#define vmk_Alert(handle, fmt, args...) \
336 350
 
    vmk_LogLevel(VMK_LOG_URGENCY_ALERT, \
337 351
 
                 handle, vmk_LogGetCurrentLogLevel(handle),   \
338
 
                 "%s: %s:%d:" fmt "\n", vmk_LogGetName(handle), \
352
 
                 "%s: %s:%d: " fmt "\n", vmk_LogGetName(handle), \
339 353
 
                 __FUNCTION__, __LINE__, ##args)
340 354
 

	
341 355
 
/*
 
new file 100644
1
 
/* **********************************************************
2
 
 * Copyright 2012 - 2013 VMware, Inc.  All rights reserved.
3
 
 * **********************************************************/
4
 

	
5
 
/*
6
 
 * @VMKAPIMOD_LICENSE@
7
 
 */
8
 

	
9
 
/*
10
 
 ***********************************************************************
11
 
 * Management Interfaces                                          */ /**
12
 
 * \defgroup Mgmt Management
13
 
 *
14
 
 * Interfaces that allow management of vmkapi modules (runtime
15
 
 * parameterization, notifications to modules from user space and
16
 
 * to user space from modules).  
17
 
 *
18
 
 * @{
19
 
 ***********************************************************************
20
 
 */
21
 

	
22
 
/*
23
 
 * vmkapi_mgmt.h --
24
 
 *
25
 
 * 	vmkernel declarations for datatypes & functions used for
26
 
 *	enabling per-module management APIs between user-space and
27
 
 *	vmkernel modules.
28
 
 */
29
 

	
30
 

	
31
 

	
32
 
#ifndef _VMKAPI_MGMT_H_
33
 
#define _VMKAPI_MGMT_H_
34
 

	
35
 
/** \cond never */
36
 
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
37
 
#error This vmkapi file should never be included directly but only via vmkapi.h
38
 
#endif
39
 
/** \endcond never */
40
 

	
41
 
#include "base/vmkapi_mgmt_types.h"
42
 

	
43
 
/** \brief Opaque generic handle allocated by the API */
44
 
typedef struct vmkMgmtHandleInt * vmk_MgmtHandle;
45
 

	
46
 
/**
47
 
 ***********************************************************************
48
 
 * vmk_MgmtCleanupFn --                                           */ /**
49
 
 *
50
 
 * \brief Prototype for a management interface's cleanup callback.
51
 
 *
52
 
 * \param[in]  private  Optional cookie data to be used by the callback,
53
 
 *                      as was originally provided to vmk_MgmtInit().
54
 
 *
55
 
 ***********************************************************************
56
 
 */
57
 
typedef void (*vmk_MgmtCleanupFn)(vmk_uint64 cookie);
58
 

	
59
 
/**
60
 
 ***********************************************************************
61
 
 * vmk_MgmtKeyGetFn --                                            */ /**
62
 
 *
63
 
 * \brief Prototype for get-key function.
64
 
 *
65
 
 * \note  This prototype is for a module-supplied "get" function
66
 
 *        for fetching a key's value, for a key that was registered
67
 
 *        using vmk_MgmtAddKey.
68
 
 *
69
 
 * \param[in]    cookie  Cookie supplied with vmk_MgmtInit.
70
 
 * \param[out]   keyVal  Value of the key that was read.  The type of
71
 
 *                       pointer this represents depends on the type
72
 
 *                       of key that was added using this function.
73
 
 *
74
 
 * \retval VMK_OK The 'get' function executed correctly.
75
 
 *                This is not an indicator of the success or failure of
76
 
 *                the operations in the function, but merely that they
77
 
 *                ran.  
78
 
 *
79
 
 ***********************************************************************
80
 
 */
81
 
typedef VMK_ReturnStatus (*vmk_MgmtKeyGetFn)(vmk_uint64 cookie,
82
 
                                             void *keyVal);
83
 

	
84
 
/**
85
 
 ***********************************************************************
86
 
 * vmk_MgmtKeySetFn --                                            */ /**
87
 
 *
88
 
 * \brief Prototype for set-key function.
89
 
 *
90
 
 * \note  This prototype is for a module-supplied "set" function
91
 
 *        for storing a key's value, for a key that was registered
92
 
 *        using vmk_MgmtAddKey.
93
 
 *
94
 
 * \param[in]    cookie  Cookie supplied with vmk_MgmtKeyValueInit.
95
 
 * \param[in]    keyVal  Value of the key to set.  The type of
96
 
 *     	       	       	 pointer this represents depends on the	type
97
 
 *     	       	       	 of key	that was added using this function.
98
 
 *
99
 
 * \retval VMK_OK The 'set' function executed correctly.
100
 
 *                This is not an indicator of the success or failure of
101
 
 *                the operations in the function, but merely that they
102
 
 *                ran.  
103
 
 *
104
 
 ***********************************************************************
105
 
 */
106
 
typedef VMK_ReturnStatus (*vmk_MgmtKeySetFn)(vmk_uint64 cookie,
107
 
                                             void *keyVal);
108
 

	
109
 
/**
110
 
 ***********************************************************************
111
 
 * vmk_MgmtInit                                                   */ /**
112
 
 *
113
 
 * \brief Initialize the kernel side of a user/kernel management API
114
 
 *
115
 
 * \note The API passed must have an equivalent signature that is passed 
116
 
 *       to the library interface in userland.
117
 
 * 
118
 
 * \param[in]     modId     The module ID of the kernel module registering 
119
 
 *                          the API.
120
 
 * \param[in]     heapId    The heap ID to use for allocating temporary 
121
 
 *                          metadata and parameter passing in event delivery.
122
 
 * \param[in]     sig       The API signature of the API being registered.
123
 
 *                          Callbacks 0 through VMK_MGMT_RESERVED_CALLBACKS
124
 
 *                          are reserved and may not be used.
125
 
 * \param[in]     cleanupFn Optional cleanup function that is executed
126
 
 *                          after the last in-flight operation 
127
 
 *                          concludes.  Note that in-flight management 
128
 
 *                          operations can be going on during a vmk_MgmtDestroy.
129
 
 * \param[in]     cookie    A data cookie that will be provided as the 
130
 
 *                          first argument to all kernel-space callbacks 
131
 
 *                          and the cleanup function that are invoked.
132
 
 * \param[in,out] handle    The handle that will be allocated for accessing 
133
 
 *                          this API.
134
 
 *
135
 
 * \retval VMK_OK         Initialization succeeded.
136
 
 * \retval VMK_BAD_PARAM  Either the modId or signature were invalid.
137
 
 * \retval VMK_NO_MEMORY  Internal metadata for operation could not be 
138
 
 *                        allocated.
139
 
 *
140
 
 ***********************************************************************
141
 
 */
142
 
VMK_ReturnStatus
143
 
vmk_MgmtInit(vmk_ModuleID modId,
144
 
             vmk_HeapID heapId,
145
 
             vmk_MgmtApiSignature *sig,
146
 
             vmk_MgmtCleanupFn cleanupFn,
147
 
             vmk_uint64 cookie,
148
 
             vmk_MgmtHandle *handle);
149
 

	
150
 
/**
151
 
 ***********************************************************************
152
 
 * vmk_MgmtRegisterInstanceCallbacks                              */ /**
153
 
 *
154
 
 * \brief Register instance-specific management callbacks.
155
 
 *
156
 
 * \note  This API registers an instance and instance-specific callbacks
157
 
 *        that will be associated with a given management handle.  If
158
 
 *        you provide instance-specific callbacks, those callbacks will
159
 
 *        be invoked instead of the default corresponding callbacks that
160
 
 *        were originally registered with the handle.  Note that it is
161
 
 *        valid to supply a subset of instance-specific callbacks
162
 
 *        (or even none).
163
 
 *
164
 
 * \param[in]   handle        The management handle that was initialized.
165
 
 * \param[in]   instanceId    The unique instance that will have its
166
 
 *                            callbacks registered.  Must be unique for
167
 
 *                            the current handle, and must not be 0.
168
 
 * \param[in]   modId         The modId of the module where the
169
 
 *                            callbacks reside.
170
 
 * \param[in]   heapId        The heapId from the module where the
171
 
 *                            callbacks reside.
172
 
 * \param[in]   displayName   The name that will be displayed for
173
 
 *                            this instance when it's listed.
174
 
 * \param[in]   numCallbacks  The number of instance-specific
175
 
 *                            callbacks that are being registered.  0
176
 
 *                            is valid, if the instance does not
177
 
 *                            supply instance-specific callbacks.
178
 
 * \param[in]   callbacks     The callback information for each
179
 
 *                            instance-specific callback, corresponding
180
 
 *                            to callbacks that override those
181
 
 *                            registered in the API signature
182
 
 *                            for this handle.
183
 
 *
184
 
 * \retval VMK_OK         Initialization succeeded.
185
 
 * \retval VMK_BAD_PARAM  Parameters couldn't be validated.
186
 
 * \retval VMK_NO_MEMORY  Internal metadata for operation could not be
187
 
 *                        allocated.
188
 
 *
189
 
 ***********************************************************************
190
 
 */
191
 
VMK_ReturnStatus
192
 
vmk_MgmtRegisterInstanceCallbacks(vmk_MgmtHandle handle,
193
 
                                  vmk_uint64 instanceId,
194
 
                                  vmk_ModuleID modId,
195
 
                                  vmk_HeapID heapId,
196
 
                                  vmk_Name *displayName,
197
 
                                  vmk_uint32 numCallbacks,
198
 
                                  vmk_MgmtCallbackInfo *callbacks);
199
 

	
200
 
/**
201
 
 ***********************************************************************
202
 
 * vmk_MgmtUnregisterInstanceCallbacks                            */ /**
203
 
 *
204
 
 * \brief Unregister an instance from being management handle.
205
 
 *
206
 
 * \param[in]  handle      The management handle that was initialized
207
 
 *                         and to which this instance is associated.
208
 
 * \param[in]  instanceId  The unique instance that was already
209
 
 *                         registered for management.
210
 
 *
211
 
 * \retval VMK_OK          Unregistration succeeded.
212
 
 * \retval VMK_BAD_PARAM   The instance was not already registered.
213
 
 *
214
 
 ***********************************************************************
215
 
 */
216
 
VMK_ReturnStatus
217
 
vmk_MgmtUnregisterInstanceCallbacks(vmk_MgmtHandle handle,
218
 
                                    vmk_uint64 instanceId);
219
 

	
220
 

	
221
 
/**
222
 
 ***********************************************************************
223
 
 * vmk_MgmtDestroy                                                */ /**
224
 
 * 
225
 
 * \brief Destroy the kernel side of a user/kernel management API
226
 
 *
227
 
 * \param[in]  handle   The handle that was passed and initialized with 
228
 
 *                      vmk_MgmtInit
229
 
 *
230
 
 * \note The heap that was passed to vmk_MgmtInit should not be
231
 
 *       destroyed until all access to the management channel has stopped,
232
 
 *       and thus the cleanup function has run.  If you call
233
 
 *       vmk_MgmtDestroy during module-unload, you are assured that the
234
 
 *       management channel is not in use & thus you can safely destroy
235
 
 *       the heap immediately.
236
 
 *
237
 
 * \retval VMK_BAD_PARAM   The API has already been destroyed or has
238
 
 *                         already been requested to be destroyed.
239
 
 * \retval VMK_OK          The API will be destroyed once all in-flight
240
 
 *                         operations conclude (may be immediate, if
241
 
 *                         none are currently in-flight).
242
 
 *
243
 
 ***********************************************************************
244
 
 */
245
 
VMK_ReturnStatus
246
 
vmk_MgmtDestroy(vmk_MgmtHandle handle);
247
 

	
248
 
/*
249
 
 ***********************************************************************
250
 
 * vmk_MgmtCallbackInvokeInt --
251
 
 *
252
 
 * This is used by vmk_MgmtCallbackInvoke().  VMKAPI clients should
253
 
 * never call this function directly.
254
 
 *
255
 
 ***********************************************************************
256
 
 */
257
 

	
258
 
/** \cond nodoc */
259
 
VMK_ReturnStatus
260
 
vmk_MgmtCallbackInvokeInt(vmk_MgmtHandle handle,
261
 
                          vmk_uint64 instanceId,
262
 
                          vmk_uint64 callbackId,
263
 
                          vmk_uint32 argCount,
264
 
                          ...);
265
 
/** \endcond */
266
 

	
267
 

	
268
 
/**
269
 
 ***********************************************************************
270
 
 * vmk_MgmtCallbackInvoke                                         */ /**
271
 
 *
272
 
 * \brief Invoke a user-space callback that has zero or more parameters. 
273
 
 * \note The callback will be asynchronously delivered to user-space,
274
 
 *       but only if there currently is a user-space process associated
275
 
 *       with this management handle that is listening for callback
276
 
 *       requests.  This call does not block.
277
 
 * \note Parameters are immediately copied for delivery.  Sizes are 
278
 
 *       determined by the API signature that was registered with 
279
 
 *       vmk_MgmtInit.  Additionally, the data cookie that was 
280
 
 *       registered with the receiver (in user space) will be provided
281
 
 *       as the first argument to the callback that is delivered in
282
 
 *       user space.
283
 
 *
284
 
 * \param[in] handle     The handle that was passed and initialized with 
285
 
 *                       vmk_MgmtInit
286
 
 * \param[in] instanceId The unique instance ID from which this callback
287
 
 *                       is originating.  If this is not an instance-
288
 
 *                       specific invocation, use VMK_MGMT_NO_INSTANCE_ID.
289
 
 * \param[in] callbackId The unique ID corresponding to the callback to
290
 
 *                       invoke, as registered with the API signature.
291
 
 * \param[in] ...        Pointers to the parameters to copy and pass.
292
 
 *                       The number of parameters passed here must match
293
 
 *                       the number used by the callback indicated by
294
 
 *                       callbackId.
295
 
 *
296
 
 * \retval VMK_OK         The callback was prepared for delivery.  This
297
 
                          does not indicate that it has run, however.
298
 
 * \retval VMK_BAD_PARAM  The callback or number of parameters supplied
299
 
 *                        was invalid.
300
 
 * \retval VMK_NO_MEMORY  Temporary storage required to deliver the event
301
 
 *                        was unavailable.
302
 
 * \retval VMK_NOT_FOUND  There is no listening user-space process
303
 
 *                        running that can receive this callback request.
304
 
 *
305
 
 ***********************************************************************
306
 
 */
307
 

	
308
 
#define vmk_MgmtCallbackInvoke(               \
309
 
         /* (vmk_MgmtHandle)   */ handle,     \
310
 
         /* (vmk_uint64)       */ instanceId, \
311
 
         /* (vmk_uint64)       */ callbackId, \
312
 
                                  ...)        \
313
 
   vmk_MgmtCallbackInvokeInt(handle, instanceId, callbackId, VMK_UTIL_NUM_ARGS(__VA_ARGS__), ##__VA_ARGS__)
314
 

	
315
 
/**
316
 
 ***********************************************************************
317
 
 * vmk_MgmtAddKey                                                 */ /**
318
 
 *
319
 
 * \brief Add a key to be managed as a key-value pair.
320
 
 *
321
 
 * \note  This creates a key-value pair that can be managed using
322
 
 *        the vmkmgmt_keyval utility.  The name of the management
323
 
 *        handle that was initialized is the name of the key-value
324
 
 *        instance that would be the "instance" argument to
325
 
 *        vmkmgmt_keyval.  For the get and set functions registered
326
 
 *        here, the cookie that is given back is the cookie that
327
 
 *        was initialized with vmk_MgmtInit.
328
 
 *
329
 
 * \param[in]     handle    The handle that was initialized by
330
 
 *                          vmk_MgmtInit.
331
 
 * \param[in]     keyType   The type of the key being added.
332
 
 * \param[in]     keyName   The name of the key being added.  Must be
333
 
 *                          unique compared to other registered
334
 
 *                          keys for this management handle.
335
 
 * \param[in]     getFn     The function that will be used to get the key
336
 
 *                          value at runtime.
337
 
 * \param[in]     setFn     The function that will be used to set the key
338
 
 *                          value at runtime.
339
 
 *
340
 
 * \note Both the getFn and setFn must be provided.
341
 
 *
342
 
 * \retval VMK_OK         The key was added.
343
 
 * \retval VMK_BAD_PARAM  A bad parameter was given.
344
 
 * \retval VMK_NO_MEMORY  Memory was not available to allocate the required
345
 
 *                        metadata structures.
346
 
 *
347
 
 ***********************************************************************
348
 
 */
349
 
VMK_ReturnStatus
350
 
vmk_MgmtAddKey(vmk_MgmtHandle handle,
351
 
               vmk_MgmtKeyType keyType,
352
 
               vmk_Name *keyName,
353
 
               vmk_MgmtKeyGetFn getFn,
354
 
               vmk_MgmtKeySetFn setFn);
355
 

	
356
 

	
357
 
#endif /* _VMKAPI_MGMT_H_ */
358
 
/** @} */
 
new file 100644
1
 
/* **********************************************************
2
 
 * Copyright 2012 - 2013 VMware, Inc.  All rights reserved.
3
 
 * **********************************************************/
4
 

	
5
 
/*
6
 
 * @VMKAPIMOD_LICENSE@
7
 
 */
8
 

	
9
 
/*
10
 
 *******************************************************************************
11
 
 * Management Types                                                       */ /**
12
 
 * \addtogroup Mgmt
13
 
 *
14
 
 * User-facing interfaces exported by vmkmgmt_lib, for use when communicating
15
 
 * with vmkapi modules using vmk_Mgmt APIs.
16
 
 *
17
 
 * @{
18
 
 *******************************************************************************
19
 
 */
20
 

	
21
 
/*
22
 
 * vmkapi_mgmt_lib.h --
23
 
 *	user-space declarations for datatypes & functions used to interact
24
 
 *      with vmkapi modules that use the vmk_Mgmt APIs.  Note that user-space
25
 
 *      management APIs and user-specific types are prefixed with "vmk_MgmtUser",
26
 
 *      even when they may be used to invoke actions in the kernel.
27
 
 */
28
 

	
29
 
#ifndef _VMKAPI_MGMT_LIB_H_
30
 
#define _VMKAPI_MGMT_LIB_H_
31
 

	
32
 
/** \cond never */
33
 
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
34
 
#error This vmkapi file should never be included directly but only via vmkapi.h
35
 
#endif
36
 
/** \endcond never */
37
 

	
38
 
#include "base/vmkapi_mgmt_types.h"
39
 

	
40
 
/** \brief An opaque handle that is allocated and managed by the library */
41
 
typedef struct vmkMgmtUserHandleInt * vmk_MgmtUserHandle;
42
 

	
43
 
/**
44
 
 ***********************************************************************
45
 
 * vmk_MgmtUserInit                                               */ /**
46
 
 *
47
 
 * \brief Initialize user-space management of a kernel module.
48
 
 *
49
 
 * \note This initializes your application for interaction with a
50
 
 *       kernel module that has an API signature matching the one you
51
 
 *       provide here with vmk_MgmtUserInit.  Note that the kernel side
52
 
 *       of the API must be successfully registered with
53
 
 *       vmk_MgmtInit prior to attempting to initialize the
54
 
 *       user-space side.  There can be multiple applications or
55
 
 *       threads using vmk_MgmtUserInit for the same API signature,
56
 
 *       but only one kernel module can service that API signature.
57
 
 *
58
 
 * \note The signature provided here must be compatible with the
59
 
 *       signature of the API that has been registered with the kernel.
60
 
 *       if "vendor" is specified (non-null) in the signature, a
61
 
 *       connection will only be made if the vendor matches.
62
 
 *
63
 
 * \param[in]     sig         The API signature describing the
64
 
 *                            management operations that can be done.
65
 
 *                            Must match a signature registered in the
66
 
 *                            kernel.
67
 
 * \param[in]     userCookie  A data cookie that will be provided as
68
 
 *                            the first argument to all user-space
69
 
 *                            callbacks.
70
 
 * \param[out]    handle      An opaque handle that will be used for
71
 
 *                            further interaction with the API.
72
 
 *
73
 
 * \retval 0      Initialization succeeded.
74
 
 * \retval other  A UNIX-style error code.
75
 
 *
76
 
 ***********************************************************************
77
 
 */
78
 
int
79
 
vmk_MgmtUserInit(vmk_MgmtApiSignature *sig,
80
 
                 vmk_uint64 userCookie,
81
 
                 vmk_MgmtUserHandle *handle);
82
 

	
83
 
/**
84
 
 ***********************************************************************
85
 
 * vmk_MgmtUserGetInstances                                       */ /**
86
 
 *
87
 
 * \brief Get instance information for all kernel-registered instances.
88
 
 *
89
 
 * \note  The instanceIds populated in the vmk_MgmtInstances structure
90
 
 *        can be subsequently used to send a callback request to a
91
 
 *        specific instance with vmk_MgmtUserCallbackInvoke
92
 
 *
93
 
 * \param[in]  handle     Management handle that was initialized
94
 
 * \param[out] instances  Current instance information for given handle
95
 
 *
96
 
 * \retval 0      Succeeded getting instances.
97
 
 * \retval other  A UNIX-style error code.
98
 
 *
99
 
 ***********************************************************************
100
 
 */
101
 
int
102
 
vmk_MgmtUserGetInstances(vmk_MgmtUserHandle handle,
103
 
                         vmk_MgmtInstances *instances);
104
 

	
105
 
/**
106
 
 ***********************************************************************
107
 
 * vmk_MgmtUserBegin                                              */ /**
108
 
 *
109
 
 * \brief Begin execution of user callbacks.
110
 
 *
111
 
 * \note  This call creates a separate thread to monitor incoming
112
 
 *        callback requests from the kernel for the given management
113
 
 *        handle and immediately begins execution of those callbacks
114
 
 *        as they arrive.
115
 
 * \note  This is not necessary if your application is not meant to
116
 
 *        handle callbacks delivered from the kernel.
117
 
 *
118
 
 *
119
 
 * param[in] handle   Management handle that was initialized
120
 
 *
121
 
 * \retval 0     Succeeded initializing callback execution
122
 
 * \retval other A UNIX-style error code
123
 
 *
124
 
 ***********************************************************************
125
 
 */
126
 
int
127
 
vmk_MgmtUserBegin(vmk_MgmtUserHandle handle);
128
 

	
129
 
/**
130
 
 ***********************************************************************
131
 
 * vmk_MgmtUserContinue                                           */ /**
132
 
 *
133
 
 * \brief Indefinitely continue monitoring and executing incoming kernel
134
 
 *        callback requests in user space.
135
 
 *
136
 
 * \note  vmk_MgmtUserBegin must have been successfully executed prior
137
 
 *        to calling vmk_MgmtUserContinue.
138
 
 * \note  Invoking vmk_MgmtUserContinue effectively makes the current
139
 
 *        (calling) thread run indefinitely, in a monitoring mode.  This
140
 
 *        is typically used by resident CIM providers.  To terminate
141
 
 *        monitoring on a particular management handle after
142
 
 *        vmk_MgmtUserBegin or vmk_MgmtUserContinue has been executed,
143
 
 *        vmk_MgmtUserEnd.  vmk_MgmtUserContinue does not return until
144
 
 *        vmk_MgmtUserEnd is separately executed on the same handle
145
 
 *        from within the same process.  To use vmk_MgmtUserEnd after
146
 
 *        vmk_MgmtUserContinue, you must create a separate pthread that
147
 
 *        will invoke vmk_MgmtUserEnd sometime later after your main
148
 
 *        thread has invoked vmk_MgmtUserContinue.
149
 
 *
150
 
 * \param[in] handle   Management handle that was initialized
151
 
 *
152
 
 * \retval 0           Execution succeeded and was ended without error.
153
 
 *                     This will happen at some future moment in time,
154
 
 *                     after vmk_MgmtUserEnd has been used.
155
 
 * \retval Other       A UNIX error code.  Execution terminated,
156
 
 *                     possibly early with error.
157
 
 *
158
 
 ***********************************************************************
159
 
 */
160
 
int
161
 
vmk_MgmtUserContinue(vmk_MgmtUserHandle handle);
162
 

	
163
 
/**
164
 
 ***********************************************************************
165
 
 * vmk_MgmtUserEnd                                                */ /**
166
 
 *
167
 
 * \brief Terminate monitoring and execution of kernel-to-user callbacks.