Lines Matching +full:pre +full:- +full:filled

7  * Copyright (c) 2003-2016 Cavium, Inc.
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
28 /* Maximum number of 8-byte words can be sent in a NIC control message.
64 #define MAX_UDD_SIZE(nctrl) (sizeof((nctrl)->udd))
71 * OSI layer passes this as-is to the driver.
114 return ((u32)atomic_read(&oct->instr_queue[q_no]->instr_pending) in octnet_iq_is_full()
115 >= (oct->instr_queue[q_no]->max_count - 2)); in octnet_iq_is_full()
130 ih2 = (struct octeon_instr_ih2 *)&cmd->cmd2.ih2; in octnet_prepare_pci_cmd_o2()
135 ih2->fsz = LIO_PCICMD_O2; in octnet_prepare_pci_cmd_o2()
137 ih2->tagtype = ORDERED_TAG; in octnet_prepare_pci_cmd_o2()
138 ih2->grp = DEFAULT_POW_GRP; in octnet_prepare_pci_cmd_o2()
140 port = (int)oct->instr_queue[setup->s.iq_no]->txpciq.s.port; in octnet_prepare_pci_cmd_o2()
143 ih2->tag = tag; in octnet_prepare_pci_cmd_o2()
145 ih2->tag = LIO_DATA(port); in octnet_prepare_pci_cmd_o2()
147 ih2->raw = 1; in octnet_prepare_pci_cmd_o2()
148 ih2->qos = (port & 3) + 4; /* map qos based on interface */ in octnet_prepare_pci_cmd_o2()
150 if (!setup->s.gather) { in octnet_prepare_pci_cmd_o2()
151 ih2->dlengsz = setup->s.u.datasize; in octnet_prepare_pci_cmd_o2()
153 ih2->gather = 1; in octnet_prepare_pci_cmd_o2()
154 ih2->dlengsz = setup->s.u.gatherptrs; in octnet_prepare_pci_cmd_o2()
157 irh = (struct octeon_instr_irh *)&cmd->cmd2.irh; in octnet_prepare_pci_cmd_o2()
159 irh->opcode = OPCODE_NIC; in octnet_prepare_pci_cmd_o2()
160 irh->subcode = OPCODE_NIC_NW_DATA; in octnet_prepare_pci_cmd_o2()
164 packet_params.s.ip_csum = setup->s.ip_csum; in octnet_prepare_pci_cmd_o2()
165 packet_params.s.transport_csum = setup->s.transport_csum; in octnet_prepare_pci_cmd_o2()
166 packet_params.s.tnl_csum = setup->s.tnl_csum; in octnet_prepare_pci_cmd_o2()
167 packet_params.s.tsflag = setup->s.timestamp; in octnet_prepare_pci_cmd_o2()
169 irh->ossp = packet_params.u32; in octnet_prepare_pci_cmd_o2()
185 ih3 = (struct octeon_instr_ih3 *)&cmd->cmd3.ih3; in octnet_prepare_pci_cmd_o3()
186 pki_ih3 = (struct octeon_instr_pki_ih3 *)&cmd->cmd3.pki_ih3; in octnet_prepare_pci_cmd_o3()
191 ih3->pkind = oct->instr_queue[setup->s.iq_no]->txpciq.s.pkind; in octnet_prepare_pci_cmd_o3()
193 ih3->fsz = LIO_PCICMD_O3; in octnet_prepare_pci_cmd_o3()
195 if (!setup->s.gather) { in octnet_prepare_pci_cmd_o3()
196 ih3->dlengsz = setup->s.u.datasize; in octnet_prepare_pci_cmd_o3()
198 ih3->gather = 1; in octnet_prepare_pci_cmd_o3()
199 ih3->dlengsz = setup->s.u.gatherptrs; in octnet_prepare_pci_cmd_o3()
202 pki_ih3->w = 1; in octnet_prepare_pci_cmd_o3()
203 pki_ih3->raw = 1; in octnet_prepare_pci_cmd_o3()
204 pki_ih3->utag = 1; in octnet_prepare_pci_cmd_o3()
205 pki_ih3->utt = 1; in octnet_prepare_pci_cmd_o3()
206 pki_ih3->uqpg = oct->instr_queue[setup->s.iq_no]->txpciq.s.use_qpg; in octnet_prepare_pci_cmd_o3()
208 port = (int)oct->instr_queue[setup->s.iq_no]->txpciq.s.port; in octnet_prepare_pci_cmd_o3()
211 pki_ih3->tag = tag; in octnet_prepare_pci_cmd_o3()
213 pki_ih3->tag = LIO_DATA(port); in octnet_prepare_pci_cmd_o3()
215 pki_ih3->tagtype = ORDERED_TAG; in octnet_prepare_pci_cmd_o3()
216 pki_ih3->qpg = oct->instr_queue[setup->s.iq_no]->txpciq.s.qpg; in octnet_prepare_pci_cmd_o3()
217 pki_ih3->pm = 0x7; /*0x7 - meant for Parse nothing, uninterpreted*/ in octnet_prepare_pci_cmd_o3()
218 pki_ih3->sl = 8; /* sl will be sizeof(pki_ih3)*/ in octnet_prepare_pci_cmd_o3()
220 irh = (struct octeon_instr_irh *)&cmd->cmd3.irh; in octnet_prepare_pci_cmd_o3()
222 irh->opcode = OPCODE_NIC; in octnet_prepare_pci_cmd_o3()
223 irh->subcode = OPCODE_NIC_NW_DATA; in octnet_prepare_pci_cmd_o3()
227 packet_params.s.ip_csum = setup->s.ip_csum; in octnet_prepare_pci_cmd_o3()
228 packet_params.s.transport_csum = setup->s.transport_csum; in octnet_prepare_pci_cmd_o3()
229 packet_params.s.tnl_csum = setup->s.tnl_csum; in octnet_prepare_pci_cmd_o3()
230 packet_params.s.tsflag = setup->s.timestamp; in octnet_prepare_pci_cmd_o3()
232 irh->ossp = packet_params.u32; in octnet_prepare_pci_cmd_o3()
236 * @param cmd - pointer to instruction to be filled in.
237 * @param setup - pointer to the setup structure
238 * @param q_no - which queue for back pressure
240 * Assumes the cmd instruction is pre-allocated, but no fields are filled in.
254 * @param oct - octeon device pointer
255 * @param cmd - pointer to the command structure, pre-filled for everything
257 * @param rdatasize - size in bytes of the response.
268 * @param oct - octeon device pointer
269 * @param ndata - control structure with queueing, and buffer information
279 * @param oct - octeon device pointer
280 * @param nctrl - control structure with command, timout, and callback info