Go to the documentation of this file.
20 #ifndef _VNIC_DEVCMD_H_
21 #define _VNIC_DEVCMD_H_
24 #define _CMD_VTYPEBITS 10
25 #define _CMD_FLAGSBITS 6
26 #define _CMD_DIRBITS 2
28 #define _CMD_NMASK ((1 << _CMD_NBITS)-1)
29 #define _CMD_VTYPEMASK ((1 << _CMD_VTYPEBITS)-1)
30 #define _CMD_FLAGSMASK ((1 << _CMD_FLAGSBITS)-1)
31 #define _CMD_DIRMASK ((1 << _CMD_DIRBITS)-1)
34 #define _CMD_VTYPESHIFT (_CMD_NSHIFT+_CMD_NBITS)
35 #define _CMD_FLAGSSHIFT (_CMD_VTYPESHIFT+_CMD_VTYPEBITS)
36 #define _CMD_DIRSHIFT (_CMD_FLAGSSHIFT+_CMD_FLAGSBITS)
41 #define _CMD_DIR_NONE 0U
42 #define _CMD_DIR_WRITE 1U
43 #define _CMD_DIR_READ 2U
44 #define _CMD_DIR_RW (_CMD_DIR_WRITE | _CMD_DIR_READ)
49 #define _CMD_FLAGS_NONE 0U
50 #define _CMD_FLAGS_NOWAIT 1U
55 #define _CMD_VTYPE_NONE 0U
56 #define _CMD_VTYPE_ENET 1U
57 #define _CMD_VTYPE_FC 2U
58 #define _CMD_VTYPE_SCSI 4U
59 #define _CMD_VTYPE_ALL (_CMD_VTYPE_ENET | _CMD_VTYPE_FC | _CMD_VTYPE_SCSI)
64 #define _CMDCF(dir, flags, vtype, nr) \
65 (((dir) << _CMD_DIRSHIFT) | \
66 ((flags) << _CMD_FLAGSSHIFT) | \
67 ((vtype) << _CMD_VTYPESHIFT) | \
68 ((nr) << _CMD_NSHIFT))
69 #define _CMDC(dir, vtype, nr) _CMDCF(dir, 0, vtype, nr)
70 #define _CMDCNW(dir, vtype, nr) _CMDCF(dir, _CMD_FLAGS_NOWAIT, vtype, nr)
75 #define _CMD_DIR(cmd) (((cmd) >> _CMD_DIRSHIFT) & _CMD_DIRMASK)
76 #define _CMD_FLAGS(cmd) (((cmd) >> _CMD_FLAGSSHIFT) & _CMD_FLAGSMASK)
77 #define _CMD_VTYPE(cmd) (((cmd) >> _CMD_VTYPESHIFT) & _CMD_VTYPEMASK)
78 #define _CMD_N(cmd) (((cmd) >> _CMD_NSHIFT) & _CMD_NMASK)
352 #define CMD_ENABLE2_ACTIVE 0x1
355 #define CMD_OPENF_OPROM 0x1
358 #define CMD_INITF_DEFAULT_MAC 0x1
361 #define CMD_PFILTER_DIRECTED 0x01
362 #define CMD_PFILTER_MULTICAST 0x02
363 #define CMD_PFILTER_BROADCAST 0x04
364 #define CMD_PFILTER_PROMISCUOUS 0x08
365 #define CMD_PFILTER_ALL_MULTICAST 0x10
368 #define IG_VLAN_REWRITE_MODE_DEFAULT_TRUNK 0
369 #define IG_VLAN_REWRITE_MODE_UNTAG_DEFAULT_VLAN 1
370 #define IG_VLAN_REWRITE_MODE_PRIORITY_TAG_DEFAULT_VLAN 2
371 #define IG_VLAN_REWRITE_MODE_PASS_THRU 3
423 #define VNIC_STF_FATAL_ERR 0x0001
424 #define VNIC_STF_STD_PAUSE 0x0002
425 #define VNIC_STF_PFC_PAUSE 0x0004
427 #define VNIC_STF_ALL (VNIC_STF_FATAL_ERR |\
428 VNIC_STF_STD_PAUSE |\
429 VNIC_STF_PFC_PAUSE |\
452 #define VNIC_DEVCMD_NARGS 15