13dec9fcdSqs148142 /* 23dec9fcdSqs148142 * CDDL HEADER START 33dec9fcdSqs148142 * 43dec9fcdSqs148142 * The contents of this file are subject to the terms of the 53dec9fcdSqs148142 * Common Development and Distribution License (the "License"). 63dec9fcdSqs148142 * You may not use this file except in compliance with the License. 73dec9fcdSqs148142 * 83dec9fcdSqs148142 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 93dec9fcdSqs148142 * or http://www.opensolaris.org/os/licensing. 103dec9fcdSqs148142 * See the License for the specific language governing permissions 113dec9fcdSqs148142 * and limitations under the License. 123dec9fcdSqs148142 * 133dec9fcdSqs148142 * When distributing Covered Code, include this CDDL HEADER in each 143dec9fcdSqs148142 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 153dec9fcdSqs148142 * If applicable, add the following below this CDDL HEADER, with the 163dec9fcdSqs148142 * fields enclosed by brackets "[]" replaced with your own identifying 173dec9fcdSqs148142 * information: Portions Copyright [yyyy] [name of copyright owner] 183dec9fcdSqs148142 * 193dec9fcdSqs148142 * CDDL HEADER END 203dec9fcdSqs148142 */ 213dec9fcdSqs148142 223dec9fcdSqs148142 /* 233dec9fcdSqs148142 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 243dec9fcdSqs148142 * Use is subject to license terms. 253dec9fcdSqs148142 */ 263dec9fcdSqs148142 273dec9fcdSqs148142 #ifndef _HXGE_PFC_H 283dec9fcdSqs148142 #define _HXGE_PFC_H 293dec9fcdSqs148142 303dec9fcdSqs148142 #pragma ident "%Z%%M% %I% %E% SMI" 313dec9fcdSqs148142 323dec9fcdSqs148142 #ifdef __cplusplus 333dec9fcdSqs148142 extern "C" { 343dec9fcdSqs148142 #endif 353dec9fcdSqs148142 363dec9fcdSqs148142 /* 0 and 4095 are reserved */ 373dec9fcdSqs148142 #define VLAN_ID_MIN 1 383dec9fcdSqs148142 #define VLAN_ID_MAX 4094 393dec9fcdSqs148142 #define VLAN_ID_IMPLICIT 0 403dec9fcdSqs148142 413dec9fcdSqs148142 #define HXGE_MAC_DEFAULT_ADDR_SLOT 0 423dec9fcdSqs148142 433dec9fcdSqs148142 #define HASH_BITS 8 443dec9fcdSqs148142 #define NMCFILTER_BITS (1 << HASH_BITS) 453dec9fcdSqs148142 #define HASH_REG_WIDTH 16 463dec9fcdSqs148142 #define NMCFILTER_REGS (NMCFILTER_BITS / HASH_REG_WIDTH) 473dec9fcdSqs148142 /* Number of multicast filter regs */ 483dec9fcdSqs148142 #define MAC_MAX_HASH_ENTRY NMCFILTER_REGS 493dec9fcdSqs148142 503dec9fcdSqs148142 #define REG_PIO_WRITE64(handle, offset, value) \ 513dec9fcdSqs148142 HXGE_REG_WR64((handle), (offset), (value)) 523dec9fcdSqs148142 #define REG_PIO_READ64(handle, offset, val_p) \ 533dec9fcdSqs148142 HXGE_REG_RD64((handle), (offset), (val_p)) 543dec9fcdSqs148142 553dec9fcdSqs148142 #define TCAM_CTL_RWC_TCAM_WR 0x0 563dec9fcdSqs148142 #define TCAM_CTL_RWC_TCAM_CMP 0x2 573dec9fcdSqs148142 #define TCAM_CTL_RWC_RAM_WR 0x4 583dec9fcdSqs148142 #define TCAM_CTL_RWC_RAM_RD 0x5 593dec9fcdSqs148142 #define TCAM_CTL_RWC_RWC_STAT 0x1 603dec9fcdSqs148142 #define TCAM_CTL_RWC_RWC_MATCH 0x1 613dec9fcdSqs148142 623dec9fcdSqs148142 #define WRITE_TCAM_REG_CTL(handle, ctl) \ 633dec9fcdSqs148142 REG_PIO_WRITE64(handle, PFC_TCAM_CTRL, ctl) 643dec9fcdSqs148142 653dec9fcdSqs148142 #define READ_TCAM_REG_CTL(handle, val_p) \ 663dec9fcdSqs148142 REG_PIO_READ64(handle, PFC_TCAM_CTRL, val_p) 673dec9fcdSqs148142 683dec9fcdSqs148142 #define WRITE_TCAM_REG_KEY0(handle, key) \ 693dec9fcdSqs148142 REG_PIO_WRITE64(handle, PFC_TCAM_KEY0, key) 703dec9fcdSqs148142 #define WRITE_TCAM_REG_KEY1(handle, key) \ 713dec9fcdSqs148142 REG_PIO_WRITE64(handle, PFC_TCAM_KEY1, key) 723dec9fcdSqs148142 #define WRITE_TCAM_REG_MASK0(handle, mask) \ 733dec9fcdSqs148142 REG_PIO_WRITE64(handle, PFC_TCAM_MASK0, mask) 743dec9fcdSqs148142 #define WRITE_TCAM_REG_MASK1(handle, mask) \ 753dec9fcdSqs148142 REG_PIO_WRITE64(handle, PFC_TCAM_MASK1, mask) 763dec9fcdSqs148142 773dec9fcdSqs148142 #define READ_TCAM_REG_KEY0(handle, val_p) \ 783dec9fcdSqs148142 REG_PIO_READ64(handle, PFC_TCAM_KEY0, val_p) 793dec9fcdSqs148142 #define READ_TCAM_REG_KEY1(handle, val_p) \ 803dec9fcdSqs148142 REG_PIO_READ64(handle, PFC_TCAM_KEY1, val_p) 813dec9fcdSqs148142 #define READ_TCAM_REG_MASK0(handle, val_p) \ 823dec9fcdSqs148142 REG_PIO_READ64(handle, PFC_TCAM_MASK0, val_p) 833dec9fcdSqs148142 #define READ_TCAM_REG_MASK1(handle, val_p) \ 843dec9fcdSqs148142 REG_PIO_READ64(handle, PFC_TCAM_MASK1, val_p) 853dec9fcdSqs148142 863dec9fcdSqs148142 typedef union _hxge_tcam_res_t { 873dec9fcdSqs148142 uint64_t value; 883dec9fcdSqs148142 struct { 893dec9fcdSqs148142 #if defined(_BIG_ENDIAN) 90*fe930412Sqs148142 uint32_t padding:32; 91*fe930412Sqs148142 uint32_t padding_l:2; 92*fe930412Sqs148142 uint32_t reserved:15; 93*fe930412Sqs148142 uint32_t parity:1; 94*fe930412Sqs148142 uint32_t hit_count:4; 95*fe930412Sqs148142 uint32_t channel_d:2; 96*fe930412Sqs148142 uint32_t channel_c:2; 97*fe930412Sqs148142 uint32_t channel_b:2; 98*fe930412Sqs148142 uint32_t channel_a:2; 99*fe930412Sqs148142 uint32_t source_hash:1; 100*fe930412Sqs148142 uint32_t discard:1; 1013dec9fcdSqs148142 #else 102*fe930412Sqs148142 uint32_t discard:1; 103*fe930412Sqs148142 uint32_t source_hash:1; 104*fe930412Sqs148142 uint32_t channel_a:2; 105*fe930412Sqs148142 uint32_t channel_b:2; 106*fe930412Sqs148142 uint32_t channel_c:2; 107*fe930412Sqs148142 uint32_t channel_d:2; 108*fe930412Sqs148142 uint32_t hit_count:4; 109*fe930412Sqs148142 uint32_t parity:1; 110*fe930412Sqs148142 uint32_t reserved:15; 111*fe930412Sqs148142 uint32_t padding_l:2; 112*fe930412Sqs148142 uint32_t padding:32; 1133dec9fcdSqs148142 #endif 1143dec9fcdSqs148142 } bits; 1153dec9fcdSqs148142 } hxge_tcam_res_t, *p_hxge_tcam_res_t; 1163dec9fcdSqs148142 1173dec9fcdSqs148142 typedef struct tcam_reg { 1183dec9fcdSqs148142 #if defined(_BIG_ENDIAN) 1193dec9fcdSqs148142 uint64_t reg1; /* 99:64 */ 1203dec9fcdSqs148142 uint64_t reg0; /* 63:0 */ 1213dec9fcdSqs148142 #else 1223dec9fcdSqs148142 uint64_t reg0; /* 63:0 */ 1233dec9fcdSqs148142 uint64_t reg1; /* 99:64 */ 1243dec9fcdSqs148142 #endif 1253dec9fcdSqs148142 } hxge_tcam_reg_t; 1263dec9fcdSqs148142 1273dec9fcdSqs148142 typedef struct hxge_tcam_ipv4_S { 1283dec9fcdSqs148142 #if defined(_BIG_ENDIAN) 129*fe930412Sqs148142 uint32_t class_code:4; /* 99:96 */ 130*fe930412Sqs148142 uint32_t class_code_l:1; /* 95:95 */ 1313dec9fcdSqs148142 uint32_t blade_id:4; /* 94:91 */ 1323dec9fcdSqs148142 uint32_t rsrvd2:2; /* 90:89 */ 1333dec9fcdSqs148142 uint32_t noport:1; /* 88 */ 1343dec9fcdSqs148142 uint32_t protocol:8; /* 87:80 */ 135*fe930412Sqs148142 uint32_t l4_hdr:16; /* 79:64 */ 136*fe930412Sqs148142 uint32_t l4_hdr_l:16; /* 63:48 */ 1373dec9fcdSqs148142 uint32_t rsrvd:16; /* 47:32 */ 1383dec9fcdSqs148142 uint32_t ip_daddr; /* 31:0 */ 1393dec9fcdSqs148142 #else 1403dec9fcdSqs148142 uint32_t ip_daddr; /* 31:0 */ 1413dec9fcdSqs148142 uint32_t rsrvd:16; /* 47:32 */ 142*fe930412Sqs148142 uint32_t l4_hdr_l:16; /* 63:48 */ 143*fe930412Sqs148142 uint32_t l4_hdr:16; /* 79:64 */ 1443dec9fcdSqs148142 uint32_t protocol:8; /* 87:80 */ 1453dec9fcdSqs148142 uint32_t noport:1; /* 88 */ 1463dec9fcdSqs148142 uint32_t rsrvd2:2; /* 90:89 */ 1473dec9fcdSqs148142 uint32_t blade_id:4; /* 94:91 */ 148*fe930412Sqs148142 uint32_t class_code_l:1; /* 95:95 */ 149*fe930412Sqs148142 uint32_t class_code:4; /* 99:96 */ 1503dec9fcdSqs148142 #endif 1513dec9fcdSqs148142 } hxge_tcam_ipv4_t; 1523dec9fcdSqs148142 1533dec9fcdSqs148142 typedef struct hxge_tcam_ipv6_S { 1543dec9fcdSqs148142 #if defined(_BIG_ENDIAN) 155*fe930412Sqs148142 uint32_t class_code:4; /* 99:96 */ 156*fe930412Sqs148142 uint32_t class_code_l:1; /* 95:95 */ 1573dec9fcdSqs148142 uint32_t blade_id:4; /* 94:91 */ 158*fe930412Sqs148142 uint32_t rsrvd2:3; /* 90:88 */ 159*fe930412Sqs148142 uint32_t protocol:8; /* 87:80 */ 160*fe930412Sqs148142 uint32_t l4_hdr:16; /* 79:64 */ 161*fe930412Sqs148142 uint32_t l4_hdr_l:16; /* 63:48 */ 162*fe930412Sqs148142 uint32_t rsrvd:16; /* 47:32 */ 163*fe930412Sqs148142 uint32_t rsrvd_l:32; /* 31:0 */ 1643dec9fcdSqs148142 #else 165*fe930412Sqs148142 uint32_t rsrvd_l:32; /* 31:0 */ 166*fe930412Sqs148142 uint32_t rsrvd:16; /* 47:32 */ 167*fe930412Sqs148142 uint32_t l4_hdr_l:16; /* 63:48 */ 168*fe930412Sqs148142 uint32_t l4_hdr:16; /* 79:64 */ 169*fe930412Sqs148142 uint32_t protocol:8; /* 87:80 */ 170*fe930412Sqs148142 uint32_t rsrvd2:3; /* 90:88 */ 1713dec9fcdSqs148142 uint32_t blade_id:4; /* 94:91 */ 172*fe930412Sqs148142 uint32_t class_code_l:1; /* 95:95 */ 173*fe930412Sqs148142 uint32_t class_code:4; /* 99:96 */ 1743dec9fcdSqs148142 #endif 1753dec9fcdSqs148142 } hxge_tcam_ipv6_t; 1763dec9fcdSqs148142 1773dec9fcdSqs148142 typedef struct hxge_tcam_enet_S { 1783dec9fcdSqs148142 #if defined(_BIG_ENDIAN) 179*fe930412Sqs148142 uint8_t class_code:4; /* 99:96 */ 180*fe930412Sqs148142 uint8_t class_code_l:1; /* 95:95 */ 1813dec9fcdSqs148142 uint8_t blade_id:4; /* 94:91 */ 1823dec9fcdSqs148142 uint8_t rsrvd:3; /* 90:88 */ 1833dec9fcdSqs148142 uint8_t eframe[11]; /* 87:0 */ 1843dec9fcdSqs148142 #else 1853dec9fcdSqs148142 uint8_t eframe[11]; /* 87:0 */ 1863dec9fcdSqs148142 uint8_t rsrvd:3; /* 90:88 */ 1873dec9fcdSqs148142 uint8_t blade_id:4; /* 94:91 */ 188*fe930412Sqs148142 uint8_t class_code_l:1; /* 95:95 */ 189*fe930412Sqs148142 uint8_t class_code:4; /* 99:96 */ 1903dec9fcdSqs148142 #endif 1913dec9fcdSqs148142 } hxge_tcam_ether_t; 1923dec9fcdSqs148142 1933dec9fcdSqs148142 typedef struct hxge_tcam_spread_S { 1943dec9fcdSqs148142 #if defined(_BIG_ENDIAN) 195*fe930412Sqs148142 uint32_t unused:28; /* 127:100 */ 196*fe930412Sqs148142 uint32_t class_code:4; /* 99:96 */ 197*fe930412Sqs148142 uint32_t class_code_l:1; /* 95:95 */ 198*fe930412Sqs148142 uint32_t blade_id:4; /* 94:91 */ 199*fe930412Sqs148142 uint32_t wild1:27; /* 90:64 */ 200*fe930412Sqs148142 uint32_t wild; /* 63:32 */ 201*fe930412Sqs148142 uint32_t wild_l; /* 31:0 */ 2023dec9fcdSqs148142 #else 203*fe930412Sqs148142 uint32_t wild_l; /* 31:0 */ 204*fe930412Sqs148142 uint32_t wild; /* 63:32 */ 205*fe930412Sqs148142 uint32_t wild1:27; /* 90:64 */ 206*fe930412Sqs148142 uint32_t blade_id:4; /* 94:91 */ 207*fe930412Sqs148142 uint32_t class_code_l:1; /* 95:95 */ 208*fe930412Sqs148142 uint32_t class_code:4; /* 99:96 */ 209*fe930412Sqs148142 uint32_t unused:28; /* 127:100 */ 2103dec9fcdSqs148142 #endif 2113dec9fcdSqs148142 } hxge_tcam_spread_t; 2123dec9fcdSqs148142 2133dec9fcdSqs148142 typedef struct hxge_tcam_entry_S { 2143dec9fcdSqs148142 union _hxge_tcam_entry { 2153dec9fcdSqs148142 hxge_tcam_ipv4_t ipv4; 2163dec9fcdSqs148142 hxge_tcam_ipv6_t ipv6; 2173dec9fcdSqs148142 hxge_tcam_ether_t enet; 2183dec9fcdSqs148142 hxge_tcam_reg_t regs; 2193dec9fcdSqs148142 hxge_tcam_spread_t spread; 2203dec9fcdSqs148142 } key, mask; 2213dec9fcdSqs148142 hxge_tcam_res_t match_action; 2223dec9fcdSqs148142 uint16_t ether_type; 2233dec9fcdSqs148142 } hxge_tcam_entry_t; 2243dec9fcdSqs148142 2253dec9fcdSqs148142 #define key_reg0 key.regs.reg0 2263dec9fcdSqs148142 #define key_reg1 key.regs.reg1 2273dec9fcdSqs148142 #define mask_reg0 mask.regs.reg0 2283dec9fcdSqs148142 #define mask_reg1 mask.regs.reg1 2293dec9fcdSqs148142 2303dec9fcdSqs148142 #define key0 key.regs.reg0 2313dec9fcdSqs148142 #define key1 key.regs.reg1 2323dec9fcdSqs148142 #define mask0 mask.regs.reg0 2333dec9fcdSqs148142 #define mask1 mask.regs.reg1 2343dec9fcdSqs148142 2353dec9fcdSqs148142 #define ip4_class_key key.ipv4.class_code 236*fe930412Sqs148142 #define ip4_class_key_l key.ipv4.class_code_l 2373dec9fcdSqs148142 #define ip4_blade_id_key key.ipv4.blade_id 2383dec9fcdSqs148142 #define ip4_noport_key key.ipv4.noport 2393dec9fcdSqs148142 #define ip4_proto_key key.ipv4.protocol 2403dec9fcdSqs148142 #define ip4_l4_hdr_key key.ipv4.l4_hdr 241*fe930412Sqs148142 #define ip4_l4_hdr_key_l key.ipv4.l4_hdr_l 2423dec9fcdSqs148142 #define ip4_dest_key key.ipv4.ip_daddr 2433dec9fcdSqs148142 2443dec9fcdSqs148142 #define ip4_class_mask mask.ipv4.class_code 245*fe930412Sqs148142 #define ip4_class_mask_l mask.ipv4.class_code_l 2463dec9fcdSqs148142 #define ip4_blade_id_mask mask.ipv4.blade_id 2473dec9fcdSqs148142 #define ip4_noport_mask mask.ipv4.noport 2483dec9fcdSqs148142 #define ip4_proto_mask mask.ipv4.protocol 2493dec9fcdSqs148142 #define ip4_l4_hdr_mask mask.ipv4.l4_hdr 250*fe930412Sqs148142 #define ip4_l4_hdr_mask_l mask.ipv4.l4_hdr_l 2513dec9fcdSqs148142 #define ip4_dest_mask mask.ipv4.ip_daddr 2523dec9fcdSqs148142 2533dec9fcdSqs148142 #define ip6_class_key key.ipv6.class_code 254*fe930412Sqs148142 #define ip6_class_key_l key.ipv6.class_code_l 2553dec9fcdSqs148142 #define ip6_blade_id_key key.ipv6.blade_id 2563dec9fcdSqs148142 #define ip6_proto_key key.ipv6.protocol 2573dec9fcdSqs148142 #define ip6_l4_hdr_key key.ipv6.l4_hdr 258*fe930412Sqs148142 #define ip6_l4_hdr_key_l key.ipv6.l4_hdr_l 2593dec9fcdSqs148142 2603dec9fcdSqs148142 #define ip6_class_mask mask.ipv6.class_code 261*fe930412Sqs148142 #define ip6_class_mask_l mask.ipv6.class_code_l 2623dec9fcdSqs148142 #define ip6_blade_id_mask mask.ipv6.blade_id 2633dec9fcdSqs148142 #define ip6_proto_mask mask.ipv6.protocol 2643dec9fcdSqs148142 #define ip6_l4_hdr_mask mask.ipv6.l4_hdr 265*fe930412Sqs148142 #define ip6_l4_hdr_mask_l mask.ipv6.l4_hdr_l 2663dec9fcdSqs148142 2673dec9fcdSqs148142 #define ether_class_key key.enet.class_code 268*fe930412Sqs148142 #define ether_class_key_l key.enet.class_code_l 2693dec9fcdSqs148142 #define ether_blade_id_key key.enet.blade_id 2703dec9fcdSqs148142 #define ether_ethframe_key key.enet.eframe 2713dec9fcdSqs148142 2723dec9fcdSqs148142 #define ether_class_mask mask.enet.class_code 273*fe930412Sqs148142 #define ether_class_mask_l mask.enet.class_code_l 2743dec9fcdSqs148142 #define ether_blade_id_mask mask.enet.blade_id 2753dec9fcdSqs148142 #define ether_ethframe_mask mask.enet.eframe 2763dec9fcdSqs148142 2773dec9fcdSqs148142 typedef struct _pfc_errlog { 2783dec9fcdSqs148142 uint32_t tcp_ctrl_drop; /* pfc_drop_log */ 2793dec9fcdSqs148142 uint32_t l2_addr_drop; 2803dec9fcdSqs148142 uint32_t class_code_drop; 2813dec9fcdSqs148142 uint32_t tcam_drop; 2823dec9fcdSqs148142 uint32_t vlan_drop; 2833dec9fcdSqs148142 2843dec9fcdSqs148142 uint32_t vlan_par_err_log; /* pfc_vlan_par_err_log */ 2853dec9fcdSqs148142 uint32_t tcam_par_err_log; /* pfc_tcam_par_err_log */ 2863dec9fcdSqs148142 } pfc_errlog_t, *p_pfc_errlog_t; 2873dec9fcdSqs148142 2883dec9fcdSqs148142 typedef struct _pfc_stats { 2893dec9fcdSqs148142 uint32_t pkt_drop; /* pfc_int_status */ 2903dec9fcdSqs148142 uint32_t tcam_parity_err; 2913dec9fcdSqs148142 uint32_t vlan_parity_err; 2923dec9fcdSqs148142 2933dec9fcdSqs148142 uint32_t bad_cs_count; /* pfc_bad_cs_counter */ 2943dec9fcdSqs148142 uint32_t drop_count; /* pfc_drop_counter */ 2953dec9fcdSqs148142 pfc_errlog_t errlog; 2963dec9fcdSqs148142 } hxge_pfc_stats_t, *p_hxge_pfc_stats_t; 2973dec9fcdSqs148142 2983dec9fcdSqs148142 typedef enum pfc_tcam_class { 2993dec9fcdSqs148142 TCAM_CLASS_INVALID = 0, 3003dec9fcdSqs148142 TCAM_CLASS_DUMMY = 1, 3013dec9fcdSqs148142 TCAM_CLASS_ETYPE_1 = 2, 3023dec9fcdSqs148142 TCAM_CLASS_ETYPE_2, 3033dec9fcdSqs148142 TCAM_CLASS_RESERVED_4, 3043dec9fcdSqs148142 TCAM_CLASS_RESERVED_5, 3053dec9fcdSqs148142 TCAM_CLASS_RESERVED_6, 3063dec9fcdSqs148142 TCAM_CLASS_RESERVED_7, 3073dec9fcdSqs148142 TCAM_CLASS_TCP_IPV4, 3083dec9fcdSqs148142 TCAM_CLASS_UDP_IPV4, 3093dec9fcdSqs148142 TCAM_CLASS_AH_ESP_IPV4, 3103dec9fcdSqs148142 TCAM_CLASS_SCTP_IPV4, 3113dec9fcdSqs148142 TCAM_CLASS_TCP_IPV6, 3123dec9fcdSqs148142 TCAM_CLASS_UDP_IPV6, 3133dec9fcdSqs148142 TCAM_CLASS_AH_ESP_IPV6, 3143dec9fcdSqs148142 TCAM_CLASS_SCTP_IPV6, 3153dec9fcdSqs148142 TCAM_CLASS_ARP, 3163dec9fcdSqs148142 TCAM_CLASS_RARP, 3173dec9fcdSqs148142 TCAM_CLASS_DUMMY_12, 3183dec9fcdSqs148142 TCAM_CLASS_DUMMY_13, 3193dec9fcdSqs148142 TCAM_CLASS_DUMMY_14, 3203dec9fcdSqs148142 TCAM_CLASS_DUMMY_15, 3213dec9fcdSqs148142 TCAM_CLASS_MAX 3223dec9fcdSqs148142 } tcam_class_t; 3233dec9fcdSqs148142 3243dec9fcdSqs148142 typedef struct _tcam_key_cfg_t { 3253dec9fcdSqs148142 boolean_t lookup_enable; 3263dec9fcdSqs148142 boolean_t discard; 3273dec9fcdSqs148142 } tcam_key_cfg_t; 3283dec9fcdSqs148142 3293dec9fcdSqs148142 typedef struct _hash_filter_t { 3303dec9fcdSqs148142 uint_t hash_ref_cnt; 3313dec9fcdSqs148142 uint16_t hash_filter_regs[NMCFILTER_REGS]; 3323dec9fcdSqs148142 uint32_t hash_bit_ref_cnt[NMCFILTER_BITS]; 3333dec9fcdSqs148142 } hash_filter_t, *p_hash_filter_t; 3343dec9fcdSqs148142 3353dec9fcdSqs148142 #define HXGE_ETHER_FLOWS (FLOW_ETHER_DHOST | FLOW_ETHER_SHOST | \ 3363dec9fcdSqs148142 FLOW_ETHER_TYPE) 3373dec9fcdSqs148142 #define HXGE_VLAN_FLOWS (FLOW_ETHER_TPID | FLOW_ETHER_TCI) 3383dec9fcdSqs148142 #define HXGE_ETHERNET_FLOWS (HXGE_ETHER_FLOWS | HXGE_VLAN_FLOWS) 3393dec9fcdSqs148142 #define HXGE_PORT_FLOWS (FLOW_ULP_PORT_REMOTE | FLOW_ULP_PORT_LOCAL) 3403dec9fcdSqs148142 #define HXGE_ADDR_FLOWS (FLOW_IP_REMOTE | FLOW_IP_LOCAL) 3413dec9fcdSqs148142 #define HXGE_IP_FLOWS (FLOW_IP_VERSION | FLOW_IP_PROTOCOL | \ 3423dec9fcdSqs148142 HXGE_PORT_FLOWS | HXGE_ADDR_FLOWS) 3433dec9fcdSqs148142 #define HXGE_SUPPORTED_FLOWS (HXGE_ETHERNET_FLOWS | HXGE_IP_FLOWS) 3443dec9fcdSqs148142 3453dec9fcdSqs148142 #define CLS_CODE_MASK 0x1f 3463dec9fcdSqs148142 #define BLADE_ID_MASK 0xf 3473dec9fcdSqs148142 #define PID_MASK 0xff 3483dec9fcdSqs148142 #define IP_PORT_MASK 0xffff 3493dec9fcdSqs148142 3503dec9fcdSqs148142 #define IP_ADDR_SA_MASK 0xFFFFFFFF 3513dec9fcdSqs148142 #define IP_ADDR_DA_MASK IP_ADDR_SA_MASK 3523dec9fcdSqs148142 #define L4PT_SPI_MASK IP_ADDR_SA_MASK 3533dec9fcdSqs148142 3543dec9fcdSqs148142 #define BLADE_ID_OFFSET 127 /* Last entry in HCR_REG */ 3553dec9fcdSqs148142 3563dec9fcdSqs148142 #ifdef __cplusplus 3573dec9fcdSqs148142 } 3583dec9fcdSqs148142 #endif 3593dec9fcdSqs148142 3603dec9fcdSqs148142 #endif /* !_HXGE_PFC_H */ 361