📄 mpltaskvlaninternal.h
字号:
//**********************************************************************
//
// MPLTASKVLANINTERNAL.H
//
// Copyright (c) 2004 National Semiconductor Corporation.
// All Rights Reserved
//
// This is the internal file with definitions meant for VLAN task
//
//**********************************************************************
#ifndef _MPL_TASK_VLAN_INTERNAL_H
#define _MPL_TASK_VLAN_INTERNAL_H
// Defines table size - This ensure perfect match (total VLAN-id
// bits = 12
#define MAX_VLAN_FILTER_ROWS 512
#define MAX_VLAN_FILTER_COLS 8
#define VLAN_MAX_PRIORITY 7
#define VLAN_MAX_ID 4095
// VTCI Format = (msb) vlanid[7:0], prio[2:0], CFI, vlanid[11:8] (lsb)
#define VLAN_MAKE_TAG(pktId, pktPri) \
(((((pktId) & 0xff) << 8) | (((pktId) & 0xf00) >> 8)) | (((pktPri) & 0x7) << 5));
#define VLAN_BREAK_TAG(extSts, ppktId, ppktPri) \
*ppktId = ((((extSts) & 0xff00) >> 8) | (((extSts) & 0x000f) << 8)); \
*ppktPri = (((extSts) & 0xe0) >> 5);
typedef struct MPL_TASK_VLAN_CTX {
NS_BOOLEAN enable; // Feature enable tracker
NS_UINT cfg; // Current config
NS_UINT8 filterTable[MAX_FILTER_ROWS][MAX_FILTER_COLS];
} MPL_TASK_VLAN_CTX;
#endif //_MPL_TASK_VLAN_INTERNAL_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -