1/* 2 * Copyright (c) 2011, ETH Zurich. All rights reserved. 3 * 4 * This file is distributed under the terms in the attached LICENSE file. 5 * If you do not find this file, copies can be found by writing to: 6 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 7 */ 8 9/* 10 * e10k_q.dev 11 * 12 * DESCRIPTION: Intel 82599 10 GbE Controller Queues 13 * 14 * Numbers in comments refer to the Intel 82599 10 GbE Controller Datasheet 15 * 322429-007, Revison 2.6, December 2010 16 */ 17 18device e10k_q lsbfirst () "Intel 82599 10 GbE Controller Queues" { 19 20 /************************************ 21 * 7.1.5 - 7.1.6 Recieve Descriptors 22 ***********************************/ 23 24 // 7.1.5 25 datatype rdesc_legacy "Legacy Receive Descriptor" { 26 buffer 64 "Buffer Address"; 27 length 16 "Length Field"; 28 checksum 16 "Fragment Checksum"; 29 30 // Recieve Status 31 dd 1 "Descriptor Done"; 32 eop 1 "End of Packet"; 33 _ 1 rsvd; 34 vp 1 "VLAN Packet"; 35 udpcs 1 "UDP Checksum"; 36 l4cs 1 "L4 Checksum"; 37 ipcs 1 "Ipv4 Checksum"; 38 pif 1 "Non Unicast Address"; 39 40 // Error Field 41 rxe 1 "MAC error"; 42 _ 5 rsvd; 43 tcpe 1 "TCP/UDP Checksum Error"; 44 ipe 1 "Ipv4 Checksum Error"; 45 46 vlan_tag 16 "VLAN Tag"; 47 }; 48 49 // 7.1.6.1 50 datatype rdesc_adv_rd "Advanced Receive Descriptor (read)" { 51 buffer 64 "Packet Buffer Address"; 52 hdr_buffer 64 "Header Buffer Address"; 53 }; 54 55 // 7.1.6.2 56 datatype rdesc_adv_wb "Advanced Receive Descriptor (write-back)" { 57 rss_type 4 "RSS type"; 58 59 // Packet type 60 pt_ipv4 1 "IPv4 header present"; 61 pt_ipv4e 1 "IPv4 with extensions"; 62 pt_ipv6 1 "IPv6 header present"; 63 pt_ipv6e 1 "IPv6 with extensions"; 64 pt_tcp 1 "TCP header present"; 65 pt_udp 1 "UDP header present"; 66 pt_sctp 1 "SCTP header"; 67 pt_nfs 1 "NFS header"; 68 pt_isesp 1 "IPSec ESP - IPSec encapsulation"; 69 pt_isah 1 "IPSec AH - IPSec encapsulation"; 70 pt_linksec 1 "LinkSec encapsulation"; 71 pt_l2packet 1 "L2 packet"; 72 _ 1; 73 74 rsccnt 4 "RSC Packet Count"; 75 hdr_len 10 "Packet header length"; 76 sph 1 "Split Header"; 77 param 32 "RSS Hash/Fragement CS/Fdir Flt ID/..."; 78 79 // Extended status 80 dd 1 "Descriptor Done Status"; 81 eop 1 "End of Packet"; 82 flm 1 "Flow director filter match"; 83 vp 1 "VLAN Packet"; 84 udpcs 1 "UDP Checksum"; 85 l4i 1 "L4 Integrity"; 86 ipcs 1 "IPv4 Checksum"; 87 pif 1 "Non Unicast Address"; 88 _ 1; 89 vext 1 "Outer-VLAN found in double VLAN packet"; 90 udpv 1 "UDP Checksum Valid"; 91 llint 1 "Low Latency Interrupt"; 92 _ 4; 93 ts 1 "Time Stamp"; 94 secp 1 "Security Processing bit"; 95 lb 1 "Loopback status indication"; 96 _ 1; 97 98 // Extended error 99 fdirerr_len 3 "FDIRErr/FCERR"; 100 hbo 1 "Header Buffer Overflow"; 101 _ 3; 102 secerr 2 "Security error indication (LinkSec, IPSec)"; 103 rxe 1 "MAC error"; 104 l4e 1 "L4 integrity error"; 105 ipe 1 "IPv4 checksum error"; 106 107 pkt_len 16 "Number of bytes posted to packet buffer"; 108 vlan_tag 16 "VLAN Tag"; 109 }; 110 111 datatype rdesc_adv_wb_nl "Advanced Receive Descriptor (write-back) for non-last" { 112 _ 17; 113 rsccnt 4 "RSC Packet Count"; 114 _ 43; 115 116 // Extended status 117 dd 1 "Descriptor Done Status"; 118 eop 1 "End of Packet"; 119 _ 2; 120 nextp 16 "Next Descriptor Pointer"; 121 122 // Extended error 123 _ 12; 124 125 pkt_len 16 "Number of bytes posted to packet buffer"; 126 _ 16; 127 }; 128 129 /************************************ 130 * 7.2.3 Transmit Descriptors 131 ***********************************/ 132 133 // 7.2.3.2.2 134 datatype tdesc_legacy "Legacy Transmit Descriptor Format" { 135 buffer 64 "Buffer Address"; 136 length 16 "Length"; 137 cso 8 "Checksum Offset"; 138 139 // Command Byte 140 eop 1 "End of Packet"; 141 ifcs 1 "Insert FCS"; 142 ic 1 "Insert Checksum"; 143 rs 1 "Report Status"; 144 _ 1 rsvd; 145 dext 1 "Descriptor extension"; 146 vle 1 "VLAN Packet Enable"; 147 _ 1 rsvd; 148 149 // Status 150 dd 1 " Descriptor Done Status"; 151 _ 3 rsvd; 152 153 _ 4 rsvd; 154 css 8 "Checksum Start"; 155 vlan 16 "VLAN Field"; 156 }; 157 158 // 7.2.3.2.3 159 constants l4_type "L4 Packet type" { 160 udp = 0b00 "UDP"; 161 tcp = 0b01 "TCP"; 162 sctp = 0b10 "SCTP"; 163 }; 164 datatype tdesc_adv_ctx "Advanced Transmit Context Descriptor (write-back)" { 165 iplen 9 "IP header length"; 166 maclen 7 "MAC header length"; 167 vlan 16 "VLAN tag to be inserted"; 168 ipsec_saidx 10 "Ipsec SA IDX"; 169 fcoef 6 "FCoEF"; 170 _ 16; 171 ips_esp_len 9 "Size of ESP trailer and ESP ICV (ipsec)"; 172 173 // TUCMD 174 snap 1 "SNAP indication"; 175 ipv4 1 "IPv4 Packet type (1=ipv4, 0=ipv6)"; 176 l4t 2 type(l4_type) "L4 Packet type"; 177 ipsec_type 1 "IPSEC_TYPE"; 178 encryption 1 "ESP encryption offload"; 179 fcoe 1 "FCoE"; 180 _ 4; 181 182 dtyp 4 type(tdesc_dtyp) "Descriptor type: adv_ctx"; 183 _ 5; 184 dext 1 "Descriptor Extension (must be 1)"; 185 bcntlen 6 "Must be 0x3F for rate limited queues"; 186 idx 1 "Index into the hardware context table"; 187 _ 3; 188 l4len 8 "L4 header length"; 189 mss 16 "Maximum Segment Size"; 190 }; 191 192 // 7.2.3.2.4 193 datatype tdesc_adv_rd "Advanced Transmit Data Descriptor (read)" { 194 buffer 64 "Buffer Address"; 195 dtalen 16 "Bytes to be fetched for this descriptor"; 196 197 _ 2; 198 mac_ilsec 1 "Apply LinkSec on packet"; 199 mac_1588 1 "IEEE1588 time stamp packet"; 200 dtyp 4 type(tdesc_dtyp) "Descriptor type: adv_data"; 201 202 // DCMD 203 eop 1 "End of Packet"; 204 ifcs 1 "Insert FCS"; 205 _ 1; 206 rs 1 "Report Status"; 207 _ 1; 208 dext 1 "Descriptor Extension (must be 1)"; 209 vle 1 "VLAN Packet Enable"; 210 tse 1 "Transmit Segmentation Enable"; 211 212 // Status 213 dd 1 "Descriptor Done"; 214 _ 3; 215 216 idx 3 "Index into the hardware context table"; 217 cc 1 "Check Context bit"; 218 219 // POPTS 220 ixsm 1 "Insert IP Checksum"; 221 txsm 1 "Insert TCP/UDP Checksum"; 222 ipsec 1 "Ipsec offload request"; 223 _ 3; 224 225 paylen 18 "Size in bytes of whole packet (only first descriptor)"; 226 }; 227 228 datatype tdesc_adv_wb "Advanced Transmit Data Descriptor (write-back)" { 229 _ 64; 230 _ 32; 231 232 // Status 233 dd 1; 234 _ 3; 235 236 _ 28; 237 }; 238 239 constants tdesc_dtyp "TX Descriptor Type" { 240 adv_ctx = 0b0010 "Advanced context descriptor"; 241 adv_data = 0b0011 "Advanced data descriptor"; 242 }; 243 244}; 245