X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fenetc%2Fbase%2Fenetc_hw.h;h=fd71155ee8487223626f703f0a29d0af964dbdc1;hb=23ecda2aa5023e4d04c8ed61fb1210c5bc92ac2e;hp=e3738a6953e43ab7bd4c28f1d86994047eed2aac;hpb=45e9be8b6c8d0c655bed7c5c77eeebd31e2348fc;p=dpdk.git diff --git a/drivers/net/enetc/base/enetc_hw.h b/drivers/net/enetc/base/enetc_hw.h index e3738a6953..fd71155ee8 100644 --- a/drivers/net/enetc/base/enetc_hw.h +++ b/drivers/net/enetc/base/enetc_hw.h @@ -78,8 +78,7 @@ enum enetc_bdr_type {TX, RX}; #define ENETC_PSR 0x00004 /* RO */ #define ENETC_PSIPMR 0x00018 #define ENETC_PSIPMR_SET_UP(n) (0x1 << (n)) /* n = SI index */ -#define ENETC_PSIPMR_SET_MP(n) (0x1 << ((n) + 8)) -#define ENETC_PSIPMR_SET_VLAN_MP(n) (0x1 << ((n) + 16)) +#define ENETC_PSIPMR_SET_MP(n) (0x1 << ((n) + 16)) #define ENETC_PSIPMAR0(n) (0x00100 + (n) * 0x20) #define ENETC_PSIPMAR1(n) (0x00104 + (n) * 0x20) #define ENETC_PCAPR0 0x00900 @@ -98,9 +97,18 @@ enum enetc_bdr_type {TX, RX}; #define ENETC_PM0_CMD_CFG 0x08008 #define ENETC_PM0_TX_EN BIT(0) #define ENETC_PM0_RX_EN BIT(1) +#define ENETC_PM0_CRC BIT(6) + +#define ENETC_PAR_PORT_CFG 0x03050 +#define L3_CKSUM BIT(0) +#define L4_CKSUM BIT(1) #define ENETC_PM0_MAXFRM 0x08014 -#define ENETC_SET_MAXFRM(val) ((val) << 16) +#define ENETC_SET_TX_MTU(val) ((val) << 16) +#define ENETC_SET_MAXFRM(val) ((val) & 0xffff) +#define ENETC_PTXMBAR 0x0608 +/* n = TC index [0..7] */ +#define ENETC_PTCMSDUR(n) (0x2020 + (n) * 4) #define ENETC_PM0_STATUS 0x08304 #define ENETC_LINK_MODE 0x0000000000080000ULL @@ -115,8 +123,33 @@ enum enetc_bdr_type {TX, RX}; #define ENETC_G_EIPBRR0 0x00bf8 #define ENETC_G_EIPBRR1 0x00bfc - /* MAC Counters */ +/* Config register to reset counters*/ +#define ENETC_PM0_STAT_CONFIG 0x080E0 +/* Receive frames counter without error */ +#define ENETC_PM0_RFRM 0x08120 +/* Receive packets counter, good + bad */ +#define ENETC_PM0_RPKT 0x08160 +/* Received octets, good + bad */ +#define ENETC_PM0_REOCT 0x08120 +/* Transmit octets, good + bad */ +#define ENETC_PM0_TEOCT 0x08200 +/* Transmit frames counter without error */ +#define ENETC_PM0_TFRM 0x08220 +/* Transmit packets counter, good + bad */ +#define ENETC_PM0_TPKT 0x08260 +/* Dropped not Truncated packets counter */ +#define ENETC_PM0_RDRNTP 0x081C8 +/* Dropped + trucated packets counter */ +#define ENETC_PM0_RDRP 0x08158 +/* Receive packets error counter */ +#define ENETC_PM0_RERR 0x08138 +/* Transmit packets error counter */ +#define ENETC_PM0_TERR 0x08238 + +/* Stats Reset Bit*/ +#define ENETC_CLEAR_STATS BIT(2) + #define ENETC_G_EPFBLPR(n) (0xd00 + 4 * (n)) #define ENETC_G_EPFBLPR1_XGMII 0x80000000 @@ -153,6 +186,7 @@ enum enetc_bdr_type {TX, RX}; #define ENETC_TXBD_FLAGS_F BIT(15) /* ENETC Parsed values (Little Endian) */ +#define ENETC_PARSE_ERROR 0x8000 #define ENETC_PKT_TYPE_ETHER 0x0060 #define ENETC_PKT_TYPE_IPV4 0x0000 #define ENETC_PKT_TYPE_IPV6 0x0020 @@ -181,8 +215,8 @@ struct enetc_hw { }; struct enetc_eth_mac_info { - uint8_t addr[ETHER_ADDR_LEN]; - uint8_t perm_addr[ETHER_ADDR_LEN]; + uint8_t addr[RTE_ETHER_ADDR_LEN]; + uint8_t perm_addr[RTE_ETHER_ADDR_LEN]; uint8_t get_link_status; };