OpenNSL API Guide and Reference Manual
|
#include <sal/compiler.h>
Go to the source code of this file.
Data Structures | |
union | any_t |
Macros | |
#define | BITS2BYTES(x) (((x) + 7) / 8) |
#define | BITS2WORDS(x) (((x) + 31) / 32) |
#define | BYTES2BITS(x) ((x) * 8) |
#define | BYTES2WORDS(x) (((x) + 3) / 4) |
#define | COUNTOF(ary) ((int) (sizeof (ary) / sizeof ((ary)[0]))) |
#define | DONT_CARE 0 |
#define | FALSE 0 |
#define | INT_TO_PTR(x) ((void *)((sal_vaddr_t)(x))) |
#define | NULL 0 |
#define | PTR_HI_TO_INT(x) (0) |
#define | PTR_TO_INT(x) ((uint32)(x)) |
#define | PTR_TO_UINTPTR(x) ((sal_vaddr_t)(x)) |
#define | SAL_AXI_DEV_TYPE 0x00080 /* AXI device */ |
#define | SAL_CPU_DEV_TYPE 0x00400 /* CPU device */ |
#define | SAL_DEV_BDE_MASK 0xff000000 |
#define | SAL_DEV_BUS_ALT 0x04000 /* Alternate access */ |
#define | SAL_DEV_BUS_MSI 0x08000 /* Message-signaled interrupts */ |
#define | SAL_DEV_BUS_RD_16BIT 0x01000 /* 16 bit reads on bus */ |
#define | SAL_DEV_BUS_TYPE_MASK 0xf00ff /* Odd for historical reasons */ |
#define | SAL_DEV_BUS_WR_16BIT 0x02000 /* 16 bit writes on bus */ |
#define | SAL_DEV_FLAG_MASK 0x0f000 |
#define | SAL_DEV_OP_EMMI_INIT 0x0fff1000 |
#define | SAL_DEV_TYPE_MASK 0x00f00 |
#define | SAL_EB_DEV_TYPE 0x00004 /* EB device */ |
#define | SAL_EMMI_DEV_TYPE 0x10000 /* EMMI device */ |
#define | SAL_ET_DEV_TYPE SAL_MII_DEV_TYPE |
#define | SAL_ETHER_DEV_TYPE 0x00200 /* Ethernet device */ |
#define | SAL_I2C_DEV_TYPE 0x00040 /* I2C device */ |
#define | SAL_ICS_DEV_TYPE 0x00008 /* ICS device */ |
#define | SAL_IP6_ADDR_FROM_UINT32(ip6, src) |
#define | SAL_IP6_ADDR_HALF_FROM_UINT32(ip6, src) |
#define | SAL_IP6_ADDR_HALF_TO_UINT32(ip6, dst) |
#define | SAL_IP6_ADDR_TO_UINT32(ip6, dst) |
#define | SAL_IPADDR_STR_LEN 16 /* Formatted IP address */ |
#define | SAL_MAC_ADDR_FROM_UINT32(mac, src) |
#define | SAL_MAC_ADDR_FROM_UINT64(mac, src) |
#define | SAL_MAC_ADDR_LIST(mac) mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] |
#define | SAL_MAC_ADDR_TO_UINT32(mac, dst) |
#define | SAL_MAC_ADDR_TO_UINT64(mac, dst) |
#define | SAL_MACADDR_STR_LEN 18 /* Formatted MAC address */ |
#define | SAL_MII_DEV_TYPE 0x00010 /* MII device */ |
#define | SAL_PCI_DEV_TYPE 0x00001 /* PCI device */ |
#define | SAL_RCPU_DEV_TYPE 0x00020 /* RCPU device */ |
#define | SAL_SPI_DEV_TYPE 0x00002 /* SPI device */ |
#define | SAL_SWITCH_DEV_TYPE 0x00100 /* Switch device */ |
#define | TRUE 1 |
#define | UINTPTR_TO_PTR(x) ((void *)(x)) |
#define | VOL volatile |
#define | WORDS2BITS(x) ((x) * 32) |
#define | WORDS2BYTES(x) ((x) * 4) |
Typedefs | |
typedef signed short | int16 |
typedef signed int | int32 |
typedef COMPILER_INT64 | int64 |
typedef signed char | int8 |
typedef uint32 | sal_ip_addr_t |
typedef uint8 | sal_mac_addr_t [6] |
typedef uint32 | sal_paddr_t |
typedef uint32 | sal_vaddr_t |
typedef unsigned short | uint16 |
typedef unsigned int | uint32 |
typedef COMPILER_UINT64 | uint64 |
typedef unsigned char | uint8 |
#define COUNTOF | ( | ary | ) | ((int) (sizeof (ary) / sizeof ((ary)[0]))) |
#define FALSE 0 |
Definition at line 36 of file types.h.
Referenced by example_is_dnx_device(), example_is_qmx_device(), example_port_default_config(), and example_read_user_choice().
#define INT_TO_PTR | ( | x | ) | ((void *)((sal_vaddr_t)(x))) |
#define NULL 0 |
Definition at line 40 of file types.h.
Referenced by example_knet_intf_create(), example_knet_intf_delete(), example_pkt_send(), example_rx_setup(), initial_qos_service_vlan_action_set(), main(), opennsl_ip_parse(), opennsl_mac_parse(), process_response(), and vxlan_init().
#define PTR_TO_UINTPTR | ( | x | ) | ((sal_vaddr_t)(x)) |
#define SAL_DEV_BUS_MSI 0x08000 /* Message-signaled interrupts */ |
#define SAL_DEV_BUS_RD_16BIT 0x01000 /* 16 bit reads on bus */ |
#define SAL_DEV_BUS_TYPE_MASK 0xf00ff /* Odd for historical reasons */ |
#define SAL_DEV_BUS_WR_16BIT 0x02000 /* 16 bit writes on bus */ |
#define SAL_ET_DEV_TYPE SAL_MII_DEV_TYPE |
#define SAL_IP6_ADDR_FROM_UINT32 | ( | ip6, | |
src | |||
) |
#define SAL_IP6_ADDR_HALF_FROM_UINT32 | ( | ip6, | |
src | |||
) |
#define SAL_IP6_ADDR_HALF_TO_UINT32 | ( | ip6, | |
dst | |||
) |
#define SAL_IP6_ADDR_TO_UINT32 | ( | ip6, | |
dst | |||
) |
#define SAL_MAC_ADDR_FROM_UINT32 | ( | mac, | |
src | |||
) |
#define SAL_MAC_ADDR_FROM_UINT64 | ( | mac, | |
src | |||
) |
#define SAL_MAC_ADDR_LIST | ( | mac | ) | mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] |
#define SAL_MAC_ADDR_TO_UINT32 | ( | mac, | |
dst | |||
) |
#define SAL_MAC_ADDR_TO_UINT64 | ( | mac, | |
dst | |||
) |
#define TRUE 1 |
Definition at line 32 of file types.h.
Referenced by example_is_dnx_device(), example_is_qmx_device(), and example_read_user_choice().
typedef COMPILER_INT64 int64 |
typedef uint32 sal_ip_addr_t |
typedef uint32 sal_paddr_t |
typedef uint32 sal_vaddr_t |
typedef COMPILER_UINT64 uint64 |