test: uti: add tofu examples
Change-Id: I1c55c872d125201e60b4fe744af74106e1c5d3a4
This commit is contained in:
236
test/uti/tofu/include/tof_test.h
Normal file
236
test/uti/tofu/include/tof_test.h
Normal file
@@ -0,0 +1,236 @@
|
||||
/* tof_test.h COPYRIGHT FUJITSU LIMITED 2021 */
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "tof_uapi.h"
|
||||
|
||||
#define ST_RDWR 0x0
|
||||
#define ST_RDONLY 0x1
|
||||
#define ST_LPG 0x2
|
||||
|
||||
#define mb() asm volatile("dmb ish" ::: "memory")
|
||||
static inline void BRK(void) {asm volatile ("brk #0");}
|
||||
#define TOF_EXIT() (printf("ERROR:errorno=%d:line%d\n", errno, __LINE__),fflush(stdout),BRK(),exit(1))
|
||||
#define TOF_NG(str, ...) printf("TOF_NG ##### line%d "str"\n", __LINE__, ##__VA_ARGS__);
|
||||
#define TOF_OK(str, ...) printf("TOF_OK ##### line%d "str"\n", __LINE__, ##__VA_ARGS__);
|
||||
#define MMAP(len) ({\
|
||||
void *buf; \
|
||||
buf = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_POPULATE, -1, 0); \
|
||||
if(buf == MAP_FAILED){TOF_EXIT();} /* printf("mmap(%d)=%p\n", len, buf); */ buf;})
|
||||
#define PROGRESS() (printf("PROGRESS:%d\n", __LINE__))
|
||||
#define MALLOC(len) ({\
|
||||
void *buf; \
|
||||
buf = malloc(len); \
|
||||
if(buf == NULL){ \
|
||||
TOF_EXIT(); \
|
||||
} \
|
||||
buf;})
|
||||
|
||||
#define IOCTL(fd, id, req) ({ \
|
||||
int res; \
|
||||
res = ioctl(fd, id, req); \
|
||||
if(res != 0){ \
|
||||
TOF_EXIT(); \
|
||||
} \
|
||||
res;})
|
||||
|
||||
enum {
|
||||
TOF_ICC_TOQ_NOP,
|
||||
TOF_ICC_TOQ_PUT,
|
||||
TOF_ICC_TOQ_WRITE_PIGGYBACK_BUFFER,
|
||||
TOF_ICC_TOQ_PUT_PIGGYBACK,
|
||||
TOF_ICC_TOQ_GET,
|
||||
TOF_ICC_TOQ_GETL,
|
||||
TOF_ICC_TOQ_ATOMIC_READ_MODIFY_WRITE = 0xe,
|
||||
TOF_ICC_TOQ_TRANSMIT_RAW_PACKET1 = 0x10,
|
||||
TOF_ICC_TOQ_TRANSMIT_RAW_PACKET2,
|
||||
TOF_ICC_TOQ_TRANSMIT_SYSTEM_PACKET1,
|
||||
TOF_ICC_TOQ_TRANSMIT_SYSTEM_PACKET2,
|
||||
|
||||
TOF_ICC_TOQ_NCOMMANDS,
|
||||
};
|
||||
|
||||
enum {
|
||||
TOF_ICC_MRQ_ATOMIC_READ_MODIFY_WRITE_HALFWAY_NOTICE = 0x1,
|
||||
TOF_ICC_MRQ_ATOMIC_READ_MODIFY_WRITE_NOTICE,
|
||||
TOF_ICC_MRQ_ATOMIC_READ_MODIFY_WRITE_REMOTE_ERROR,
|
||||
TOF_ICC_MRQ_PUT_HALFWAY_NOTICE,
|
||||
TOF_ICC_MRQ_PUT_LAST_HALFWAY_NOTICE,
|
||||
TOF_ICC_MRQ_GET_HALFWAY_NOTICE,
|
||||
TOF_ICC_MRQ_GET_LAST_HALFWAY_NOTICE,
|
||||
TOF_ICC_MRQ_PUT_NOTICE,
|
||||
TOF_ICC_MRQ_PUT_LAST_NOTICE,
|
||||
TOF_ICC_MRQ_GET_NOTICE,
|
||||
TOF_ICC_MRQ_GET_LAST_NOTICE,
|
||||
TOF_ICC_MRQ_PUT_REMOTE_ERROR,
|
||||
TOF_ICC_MRQ_PUT_LAST_REMOTE_ERROR,
|
||||
TOF_ICC_MRQ_GET_REMOTE_ERROR,
|
||||
TOF_ICC_MRQ_GET_LAST_REMOTE_ERROR,
|
||||
|
||||
TOF_ICC_MRQ_NCOMMANDS,
|
||||
};
|
||||
|
||||
struct tof_icc_cq_stag_offset {
|
||||
uint64_t offset:40;
|
||||
uint64_t stag:18;
|
||||
uint64_t cqid:6;
|
||||
};
|
||||
|
||||
struct tof_icc_toq_common_header1 {
|
||||
uint8_t interrupt:1;
|
||||
uint8_t res1:4;
|
||||
uint8_t source_type:2;
|
||||
uint8_t flip:1;
|
||||
uint8_t command;
|
||||
union {
|
||||
uint8_t mtu;
|
||||
struct {
|
||||
uint8_t res:4;
|
||||
uint8_t op:4;
|
||||
} armw;
|
||||
} mtuop;
|
||||
uint8_t sps:4;
|
||||
uint8_t pa:1;
|
||||
uint8_t pb:2;
|
||||
uint8_t pc:1;
|
||||
uint8_t rx;
|
||||
uint8_t ry;
|
||||
uint8_t rz;
|
||||
uint8_t ra:1;
|
||||
uint8_t rb:2;
|
||||
uint8_t rc:1;
|
||||
uint8_t res3:1;
|
||||
uint8_t ri:3;
|
||||
};
|
||||
|
||||
struct tof_icc_toq_common_header2 {
|
||||
uint8_t gap;
|
||||
uint8_t s:1;
|
||||
uint8_t r:1;
|
||||
uint8_t q:1;
|
||||
uint8_t p:1;
|
||||
uint8_t res1:1;
|
||||
uint8_t j:1;
|
||||
uint8_t res2:2;
|
||||
uint16_t edata;
|
||||
union{
|
||||
struct {
|
||||
uint32_t length:24;
|
||||
uint32_t res:8;
|
||||
} normal;
|
||||
struct {
|
||||
uint32_t length:6;
|
||||
uint32_t res:26;
|
||||
} piggyback;
|
||||
} len;
|
||||
};
|
||||
|
||||
struct tof_icc_toq_put {
|
||||
struct tof_icc_toq_common_header1 head1;
|
||||
struct tof_icc_toq_common_header2 head2;
|
||||
struct tof_icc_cq_stag_offset remote;
|
||||
struct tof_icc_cq_stag_offset local;
|
||||
};
|
||||
|
||||
struct tof_icc_toq_get {
|
||||
struct tof_icc_toq_common_header1 head1;
|
||||
struct tof_icc_toq_common_header2 head2;
|
||||
struct tof_icc_cq_stag_offset remote;
|
||||
struct tof_icc_cq_stag_offset local;
|
||||
};
|
||||
|
||||
struct tof_icc_tcq_descriptor {
|
||||
uint8_t res1:5;
|
||||
uint8_t counter_unmatch:1;
|
||||
uint8_t res2:1;
|
||||
uint8_t flip:1;
|
||||
uint8_t rcode;
|
||||
uint8_t res3[2];
|
||||
union{
|
||||
struct {
|
||||
uint32_t length:24;
|
||||
uint32_t res:8;
|
||||
} normal;
|
||||
struct {
|
||||
uint32_t length:6;
|
||||
uint32_t res:26;
|
||||
} piggyback;
|
||||
} len;
|
||||
};
|
||||
|
||||
struct tof_icc_mrq_common_header1 {
|
||||
uint8_t res1:7;
|
||||
uint8_t flip:1;
|
||||
uint8_t id;
|
||||
uint8_t rcode;
|
||||
uint8_t res2:4;
|
||||
uint8_t pa:1;
|
||||
uint8_t pb:2;
|
||||
uint8_t pc:1;
|
||||
uint8_t x;
|
||||
uint8_t y;
|
||||
uint8_t z;
|
||||
uint8_t a:1;
|
||||
uint8_t b:2;
|
||||
uint8_t c:1;
|
||||
uint8_t res3:1;
|
||||
uint8_t i:3;
|
||||
};
|
||||
|
||||
struct tof_icc_mrq_common_header2 {
|
||||
uint8_t res1;
|
||||
uint8_t res2:4;
|
||||
uint8_t initial:1;
|
||||
uint8_t res3:3;
|
||||
uint16_t edata;
|
||||
union {
|
||||
struct {
|
||||
uint32_t length:11;
|
||||
uint32_t res:21;
|
||||
} normal;
|
||||
struct {
|
||||
uint32_t op:4;
|
||||
uint32_t res:28;
|
||||
} armw;
|
||||
} lenop;
|
||||
};
|
||||
|
||||
struct tof_icc_mrq_descriptor {
|
||||
struct tof_icc_mrq_common_header1 head1;
|
||||
struct tof_icc_mrq_common_header2 head2;
|
||||
struct tof_icc_cq_stag_offset cso1;
|
||||
struct tof_icc_cq_stag_offset cso2;
|
||||
};
|
||||
|
||||
static inline void get_position(struct tof_addr *addr){
|
||||
int fd;
|
||||
char buf[256];
|
||||
ssize_t res;
|
||||
|
||||
fd = open("/proc/tofu/position", O_RDWR);
|
||||
if(fd < 0){
|
||||
TOF_EXIT();
|
||||
}
|
||||
res = read(fd, buf, 256);
|
||||
if(res <= 0){
|
||||
TOF_EXIT();
|
||||
}
|
||||
buf[res] = '0';
|
||||
if(sscanf(buf, "%d %d %d %d %d %d", &addr->x, &addr->y, &addr->z, &addr->a, &addr->b, &addr->c) != 6){
|
||||
TOF_EXIT();
|
||||
}
|
||||
|
||||
close(fd);
|
||||
}
|
||||
|
||||
static inline uint64_t get_timestamp(void){
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
return (uint64_t)ts.tv_sec * 1000000 + (uint64_t)ts.tv_nsec / 1000;
|
||||
}
|
||||
345
test/uti/tofu/include/tof_uapi.h
Normal file
345
test/uti/tofu/include/tof_uapi.h
Normal file
@@ -0,0 +1,345 @@
|
||||
/* tof_uapi.h COPYRIGHT FUJITSU LIMITED 2021 */
|
||||
#ifndef _TOF_UAPI_H_
|
||||
#define _TOF_UAPI_H_
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
enum tof_sig_errno_cq {
|
||||
TOF_TOQ_DIRECT_DESCRIPTOR_EXCEPTION,
|
||||
TOF_TOQ_SOURCE_TYPE_EXCEPTION,
|
||||
TOF_MRQ_OVERFLOW,
|
||||
};
|
||||
|
||||
enum tof_sig_errno_bg {
|
||||
TOF_NODE_ADDRESS_UNMATCH,
|
||||
TOF_BSEQ_UNMATCH,
|
||||
TOF_SIGNAL_STATE_ERROR,
|
||||
TOF_ERROR_SYNCHRONIZATION_ACKNOWLEDGE,
|
||||
};
|
||||
|
||||
#define TOF_UAPI_VERSION 0x2a00
|
||||
|
||||
struct tof_init_cq {
|
||||
uint16_t version;
|
||||
uint8_t session_mode;
|
||||
uint8_t toq_size;
|
||||
uint8_t mrq_size;
|
||||
uint8_t num_stag;
|
||||
uint8_t tcq_cinj;
|
||||
uint8_t mrq_cinj;
|
||||
void *toq_mem;
|
||||
void *tcq_mem;
|
||||
void *mrq_mem;
|
||||
};
|
||||
|
||||
struct tof_alloc_stag {
|
||||
uint32_t flags;
|
||||
int stag;
|
||||
uint64_t offset;
|
||||
void *va;
|
||||
uint64_t len;
|
||||
};
|
||||
|
||||
struct tof_free_stags {
|
||||
uint16_t num;
|
||||
int *stags;
|
||||
};
|
||||
|
||||
struct tof_addr {
|
||||
uint8_t pa;
|
||||
uint8_t pb;
|
||||
uint8_t pc;
|
||||
uint8_t x;
|
||||
uint8_t y;
|
||||
uint8_t z;
|
||||
uint8_t a;
|
||||
uint8_t b;
|
||||
uint8_t c;
|
||||
};
|
||||
|
||||
struct tof_set_bg {
|
||||
int tni;
|
||||
int gate;
|
||||
int source_lgate;
|
||||
struct tof_addr source_raddr;
|
||||
int source_rtni;
|
||||
int source_rgate;
|
||||
int dest_lgate;
|
||||
struct tof_addr dest_raddr;
|
||||
int dest_rtni;
|
||||
int dest_rgate;
|
||||
};
|
||||
|
||||
struct tof_enable_bch {
|
||||
void *addr;
|
||||
int bseq;
|
||||
int num;
|
||||
struct tof_set_bg *bgs;
|
||||
};
|
||||
|
||||
struct tof_set_subnet {
|
||||
int res0;
|
||||
int res1;
|
||||
uint8_t nx;
|
||||
uint8_t sx;
|
||||
uint8_t lx;
|
||||
uint8_t ny;
|
||||
uint8_t sy;
|
||||
uint8_t ly;
|
||||
uint8_t nz;
|
||||
uint8_t sz;
|
||||
uint8_t lz;
|
||||
};
|
||||
|
||||
struct tof_reg_user {
|
||||
uid_t uid;
|
||||
uint32_t gpid;
|
||||
struct tof_set_subnet subnet;
|
||||
uint64_t *cqmask;
|
||||
uint64_t *bgmask;
|
||||
};
|
||||
|
||||
struct tof_notify_linkdown {
|
||||
int num;
|
||||
struct {
|
||||
uint8_t x;
|
||||
uint8_t y;
|
||||
uint8_t z;
|
||||
uint8_t a;
|
||||
uint8_t b;
|
||||
uint8_t c;
|
||||
uint16_t ports;
|
||||
} *items;
|
||||
};
|
||||
|
||||
struct tof_get_port_stat {
|
||||
int port_no;
|
||||
uint64_t mask;
|
||||
uint64_t pa[31];
|
||||
};
|
||||
|
||||
struct tof_get_cq_stat {
|
||||
int tni;
|
||||
int cqid;
|
||||
uint64_t txbyte;
|
||||
uint64_t rxbyte;
|
||||
};
|
||||
|
||||
struct tof_load_register {
|
||||
uint64_t pa;
|
||||
uint64_t len;
|
||||
void *buf;
|
||||
};
|
||||
|
||||
struct tof_load_resource {
|
||||
uint64_t rsc_id;
|
||||
uint64_t offset;
|
||||
uint64_t len;
|
||||
void *buf;
|
||||
};
|
||||
|
||||
union tof_trans_table_bitfield {
|
||||
struct {
|
||||
uint64_t start:36;
|
||||
uint64_t len:27;
|
||||
uint64_t ps_code:1;
|
||||
} bits;
|
||||
uint64_t atomic;
|
||||
};
|
||||
|
||||
struct tof_trans_table {
|
||||
union tof_trans_table_bitfield steering;
|
||||
union tof_trans_table_bitfield mbpt;
|
||||
};
|
||||
|
||||
void tof_utofu_set_linkdown_callback(void (*callback)(int, const void *));
|
||||
void tof_utofu_unset_linkdown_callback(void);
|
||||
|
||||
#define TOF_MMAP_CQ_REGISTER 0
|
||||
#ifdef __KERNEL__
|
||||
#define TOF_MMAP_CQ_TRANSTABLE (PAGE_SIZE)
|
||||
#else
|
||||
#define TOF_MMAP_CQ_TRANSTABLE (sysconf(_SC_PAGESIZE))
|
||||
#endif
|
||||
#define TOF_MMAP_BCH_REGISTER 0
|
||||
#define TOF_MMAP_XB_STQ 0
|
||||
|
||||
#define TOF_ST_RDWR 0x0
|
||||
#define TOF_ST_RDONLY 0x1
|
||||
#define TOF_ST_LPG 0x2
|
||||
|
||||
#define TOF_STAG_TRANS_PS_CODE_64KB 0
|
||||
#define TOF_STAG_TRANS_PS_CODE_2MB 1
|
||||
|
||||
#define TOF_IOC_MAGIC 'd'
|
||||
#define TOF_IOCTL_INIT_CQ _IOWR(TOF_IOC_MAGIC, 0, long)
|
||||
#define TOF_IOCTL_ALLOC_STAG _IOWR(TOF_IOC_MAGIC, 1, long)
|
||||
#define TOF_IOCTL_FREE_STAGS _IOWR(TOF_IOC_MAGIC, 2, long)
|
||||
#define TOF_IOCTL_ENABLE_BCH _IOWR(TOF_IOC_MAGIC, 3, long)
|
||||
#define TOF_IOCTL_DISABLE_BCH _IOWR(TOF_IOC_MAGIC, 4, long)
|
||||
#define TOF_IOCTL_SET_RT_SIGNAL _IOWR(TOF_IOC_MAGIC, 5, long)
|
||||
#define TOF_IOCTL_SET_SUBNET _IOWR(TOF_IOC_MAGIC, 6, long)
|
||||
#define TOF_IOCTL_REG_USER _IOWR(TOF_IOC_MAGIC, 7, long)
|
||||
#define TOF_IOCTL_NOTIFY_LINKDOWN _IOWR(TOF_IOC_MAGIC, 8, long)
|
||||
#define TOF_IOCTL_GET_PORT_STAT _IOWR(TOF_IOC_MAGIC, 9, long)
|
||||
#define TOF_IOCTL_GET_CQ_STAT _IOWR(TOF_IOC_MAGIC, 10, long)
|
||||
#define TOF_IOCTL_LOAD_REGISTER _IOWR(TOF_IOC_MAGIC, 11, long)
|
||||
#define TOF_IOCTL_LOAD_RESOURCE _IOWR(TOF_IOC_MAGIC, 12, long)
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#define TOF_INIT_CQ TOF_IOCTL_INIT_CQ
|
||||
#define TOF_ALLOC_STAG TOF_IOCTL_ALLOC_STAG
|
||||
#define TOF_FREE_STAGS TOF_IOCTL_FREE_STAGS
|
||||
#define TOF_ENABLE_BCH TOF_IOCTL_ENABLE_BCH
|
||||
#define TOF_DISABLE_BCH TOF_IOCTL_DISABLE_BCH
|
||||
#define TOF_SET_RT_SIGNAL TOF_IOCTL_SET_RT_SIGNAL
|
||||
#define TOF_SET_SUBNET TOF_IOCTL_SET_SUBNET
|
||||
#define TOF_REG_USER TOF_IOCTL_REG_USER
|
||||
#define TOF_NOTIFY_LINKDOWN TOF_IOCTL_NOTIFY_LINKDOWN
|
||||
#define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SC_TNI0_STEERINGTABLE4, TOF_RSC_TNI0_STEERINGTABLE5,
|
||||
TOF_RSC_TNI0_STEERINGTABLE6, TOF_RSC_TNI0_STEERINGTABLE7, TOF_RSC_TNI0_STEERINGTABLE8,
|
||||
TOF_RSC_TNI0_STEERINGTABLE9, TOF_RSC_TNI0_STEERINGTABLE10, TOF_RSC_TNI0_STEERINGTABLE11,
|
||||
TOF_RSC_TNI1_STEERINGTABLE0, TOF_RSC_TNI1_STEERINGTABLE1, TOF_RSC_TNI1_STEERINGTABLE2,
|
||||
TOF_RSC_TNI1_STEERINGTABLE3, TOF_RSC_TNI1_STEERINGTABLE4, TOF_RSC_TNI1_STEERINGTABLE5,
|
||||
TOF_RSC_TNI1_STEERINGTABLE6, TOF_RSC_TNI1_STEERINGTABLE7, TOF_RSC_TNI1_STEERINGTABLE8,
|
||||
TOF_RSC_TNI1_STEERINGTABLE9, TOF_RSC_TNI1_STEERINGTABLE10, TOF_RSC_TNI1_STEERINGTABLE11,
|
||||
TOF_RSC_TNI2_STEERINGTABLE0, TOF_RSC_TNI2_STEERINGTABLE1, TOF_RSC_TNI2_STEERINGTABLE2,
|
||||
TOF_RSC_TNI2_STEERINGTABLE3, TOF_RSC_TNI2_STEERINGTABLE4, TOF_RSC_TNI2_STEERINGTABLE5,
|
||||
TOF_RSC_TNI2_STEERINGTABLE6, TOF_RSC_TNI2_STEERINGTABLE7, TOF_RSC_TNI2_STEERINGTABLE8,
|
||||
TOF_RSC_TNI2_STEERINGTABLE9, TOF_RSC_TNI2_STEERINGTABLE10, TOF_RSC_TNI2_STEERINGTABLE11,
|
||||
TOF_RSC_TNI3_STEERINGTABLE0, TOF_RSC_TNI3_STEERINGTABLE1, TOF_RSC_TNI3_STEERINGTABLE2,
|
||||
TOF_RSC_TNI3_STEERINGTABLE3, TOF_RSC_TNI3_STEERINGTABLE4, TOF_RSC_TNI3_STEERINGTABLE5,
|
||||
TOF_RSC_TNI3_STEERINGTABLE6, TOF_RSC_TNI3_STEERINGTABLE7, TOF_RSC_TNI3_STEERINGTABLE8,
|
||||
TOF_RSC_TNI3_STEERINGTABLE9, TOF_RSC_TNI3_STEERINGTABLE10, TOF_RSC_TNI3_STEERINGTABLE11,
|
||||
TOF_RSC_TNI4_STEERINGTABLE0, TOF_RSC_TNI4_STEERINGTABLE1, TOF_RSC_TNI4_STEERINGTABLE2,
|
||||
TOF_RSC_TNI4_STEERINGTABLE3, TOF_RSC_TNI4_STEERINGTABLE4, TOF_RSC_TNI4_STEERINGTABLE5,
|
||||
TOF_RSC_TNI4_STEERINGTABLE6, TOF_RSC_TNI4_STEERINGTABLE7, TOF_RSC_TNI4_STEERINGTABLE8,
|
||||
TOF_RSC_TNI4_STEERINGTABLE9, TOF_RSC_TNI4_STEERINGTABLE10, TOF_RSC_TNI4_STEERINGTABLE11,
|
||||
TOF_RSC_TNI5_STEERINGTABLE3, TOF_RSC_TNI5_STEERINGTABLE4, TOF_RSC_TNI5_STEERINGTABLE5,
|
||||
TOF_RSC_TNI5_STEERINGTABLE6, TOF_RSC_TNI5_STEERINGTABLE7, TOF_RSC_TNI5_STEERINGTABLE8,
|
||||
TOF_RSC_TNI5_STEERINGTABLE9, TOF_RSC_TNI5_STEERINGTABLE10, TOF_RSC_TNI5_STEERINGTABLE11,
|
||||
|
||||
/* MBTABLE (300 - 371) */
|
||||
TOF_RSC_TNI0_MBTABLE0, TOF_RSC_TNI0_MBTABLE1, TOF_RSC_TNI0_MBTABLE2,
|
||||
TOF_RSC_TNI0_MBTABLE3, TOF_RSC_TNI0_MBTABLE4, TOF_RSC_TNI0_MBTABLE5,
|
||||
TOF_RSC_TNI0_MBTABLE6, TOF_RSC_TNI0_MBTABLE7, TOF_RSC_TNI0_MBTABLE8,
|
||||
TOF_RSC_TNI0_MBTABLE9, TOF_RSC_TNI0_MBTABLE10, TOF_RSC_TNI0_MBTABLE11,
|
||||
TOF_RSC_TNI1_MBTABLE0, TOF_RSC_TNI1_MBTABLE1, TOF_RSC_TNI1_MBTABLE2,
|
||||
TOF_RSC_TNI1_MBTABLE3, TOF_RSC_TNI1_MBTABLE4, TOF_RSC_TNI1_MBTABLE5,
|
||||
TOF_RSC_TNI1_MBTABLE6, TOF_RSC_TNI1_MBTABLE7, TOF_RSC_TNI1_MBTABLE8,
|
||||
TOF_RSC_TNI1_MBTABLE9, TOF_RSC_TNI1_MBTABLE10, TOF_RSC_TNI1_MBTABLE11,
|
||||
TOF_RSC_TNI2_MBTABLE0, TOF_RSC_TNI2_MBTABLE1, TOF_RSC_TNI2_MBTABLE2,
|
||||
TOF_RSC_TNI2_MBTABLE3, TOF_RSC_TNI2_MBTABLE4, TOF_RSC_TNI2_MBTABLE5,
|
||||
TOF_RSC_TNI2_MBTABLE6, TOF_RSC_TNI2_MBTABLE7, TOF_RSC_TNI2_MBTABLE8,
|
||||
TOF_RSC_TNI2_MBTABLE9, TOF_RSC_TNI2_MBTABLE10, TOF_RSC_TNI2_MBTABLE11,
|
||||
TOF_RSC_TNI3_MBTABLE0, TOF_RSC_TNI3_MBTABLE1, TOF_RSC_TNI3_MBTABLE2,
|
||||
TOF_RSC_TNI3_MBTABLE3, TOF_RSC_TNI3_MBTABLE4, TOF_RSC_TNI3_MBTABLE5,
|
||||
TOF_RSC_TNI3_MBTABLE6, TOF_RSC_TNI3_MBTABLE7, TOF_RSC_TNI3_MBTABLE8,
|
||||
TOF_RSC_TNI3_MBTABLE9, TOF_RSC_TNI3_MBTABLE10, TOF_RSC_TNI3_MBTABLE11,
|
||||
TOF_RSC_TNI4_MBTABLE0, TOF_RSC_TNI4_MBTABLE1, TOF_RSC_TNI4_MBTABLE2,
|
||||
TOF_RSC_TNI4_MBTABLE3, TOF_RSC_TNI4_MBTABLE4, TOF_RSC_TNI4_MBTABLE5,
|
||||
TOF_RSC_TNI4_MBTABLE6, TOF_RSC_TNI4_MBTABLE7, TOF_RSC_TNI4_MBTABLE8,
|
||||
TOF_RSC_TNI4_MBTABLE9, TOF_RSC_TNI4_MBTABLE10, TOF_RSC_TNI4_MBTABLE11,
|
||||
TOF_RSC_TNI5_MBTABLE0, TOF_RSC_TNI5_MBTABLE1, TOF_RSC_TNI5_MBTABLE2,
|
||||
TOF_RSC_TNI5_MBTABLE3, TOF_RSC_TNI5_MBTABLE4, TOF_RSC_TNI5_MBTABLE5,
|
||||
TOF_RSC_TNI5_MBTABLE6, TOF_RSC_TNI5_MBTABLE7, TOF_RSC_TNI5_MBTABLE8,
|
||||
TOF_RSC_TNI5_MBTABLE9, TOF_RSC_TNI5_MBTABLE10, TOF_RSC_TNI5_MBTABLE11,
|
||||
|
||||
TOF_RSC_NUM /* 372 */
|
||||
};
|
||||
#define TOF_RSC_TOQ(TNI, CQID) (TOF_RSC_TNI0_TOQ0 + (TNI * 12) + CQID)
|
||||
#define TOF_RSC_TCQ(TNI, CQID) (TOF_RSC_TNI0_TCQ0 + (TNI * 12) + CQID)
|
||||
#define TOF_RSC_MRQ(TNI, CQID) (TOF_RSC_TNI0_MRQ0 + (TNI * 12) + CQID)
|
||||
#define TOF_RSC_PBQ(TNI) (TOF_RSC_TNI0_PBQ + TNI)
|
||||
#define TOF_RSC_PRQ(TNI) (TOF_RSC_TNI0_PRQ + TNI)
|
||||
#define TOF_RSC_STT(TNI, CQID) (TOF_RSC_TNI0_STEERINGTABLE0 + (TNI * 12) + CQID)
|
||||
#define TOF_RSC_MBT(TNI, CQID) (TOF_RSC_TNI0_MBTABLE0 + (TNI * 12) + CQID)
|
||||
|
||||
#endif
|
||||
|
||||
/* vim: set noet ts=8 sw=8 sts=0 tw=0 : */
|
||||
|
||||
Reference in New Issue
Block a user