/** * struct pkt_instr_hdr - Packet Instruction Header * @g: Gather used * When [G] is set and [GSZ] != 0, the instruction is * indirect gather instruction. * When [G] is set and [GSZ] = 0, the instruction is * direct gather instruction. * @gsz: Number of pointers in the indirect gather list * @ihi: When set hardware duplicates the 1st 8 bytes of pkt_instr_hdr * and adds them to the packet after the pkt_instr_hdr but before any UDD * @ssz: Not used by the input hardware. But can become slc_store_int[SSZ] * when [IHI] is set. * @fsz: The number of front data bytes directly included in the * PCIe instruction. * @tlen: The length of the input packet in bytes, include: * - 16B pkt_hdr * - Inline context bytes if any, * - UDD if any, * - packet payload bytes
*/ union pkt_instr_hdr {
__be64 bev;
u64 value; struct { #ifdefined(__BIG_ENDIAN_BITFIELD)
u64 raz_48_63 : 16;
u64 g : 1;
u64 gsz : 7;
u64 ihi : 1;
u64 ssz : 7;
u64 raz_30_31 : 2;
u64 fsz : 6;
u64 raz_16_23 : 8;
u64 tlen : 16; #else
u64 tlen : 16;
u64 raz_16_23 : 8;
u64 fsz : 6;
u64 raz_30_31 : 2;
u64 ssz : 7;
u64 ihi : 1;
u64 gsz : 7;
u64 g : 1;
u64 raz_48_63 : 16; #endif
} s;
};
/** * struct pkt_hdr - Packet Input Header * @opcode: Request opcode (Major) * @arg: Request opcode (Minor) * @ctxc: Context control. * @unca: When set [UNC] is the uncertainty count for an input packet. * The hardware uses uncertainty counts to predict * output buffer use and avoid deadlock. * @info: Not used by input hardware. Available for use * during SE processing. * @destport: The expected destination port/ring/channel for the packet. * @unc: Uncertainty count for an input packet. * @grp: SE group that will process the input packet. * @ctxl: Context Length in 64-bit words. * @uddl: User-defined data (UDD) length in bytes. * @ctxp: Context pointer. CTXP<63,2:0> must be zero in all cases.
*/ union pkt_hdr {
__be64 bev[2];
u64 value[2]; struct { #ifdefined(__BIG_ENDIAN_BITFIELD)
u64 opcode : 8;
u64 arg : 8;
u64 ctxc : 2;
u64 unca : 1;
u64 raz_44 : 1;
u64 info : 3;
u64 destport : 9;
u64 unc : 8;
u64 raz_19_23 : 5;
u64 grp : 3;
u64 raz_15 : 1;
u64 ctxl : 7;
u64 uddl : 8; #else
u64 uddl : 8;
u64 ctxl : 7;
u64 raz_15 : 1;
u64 grp : 3;
u64 raz_19_23 : 5;
u64 unc : 8;
u64 destport : 9;
u64 info : 3;
u64 raz_44 : 1;
u64 unca : 1;
u64 ctxc : 2;
u64 arg : 8;
u64 opcode : 8; #endif
__be64 ctxp;
} s;
};
/** * struct slc_store_info - Solicited Paceket Output Store Information. * @ssz: The number of scatterlist pointers for the solicited output port * packet. * @rptr: The result pointer for the solicited output port packet. * If [SSZ]=0, [RPTR] must point directly to a buffer on the remote * host that is large enough to hold the entire output packet. * If [SSZ]!=0, [RPTR] must point to an array of ([SSZ]+3)/4 * sglist components at [RPTR] on the remote host.
*/ union slc_store_info {
__be64 bev[2];
u64 value[2]; struct { #ifdefined(__BIG_ENDIAN_BITFIELD)
u64 raz_39_63 : 25;
u64 ssz : 7;
u64 raz_0_31 : 32; #else
u64 raz_0_31 : 32;
u64 ssz : 7;
u64 raz_39_63 : 25; #endif
__be64 rptr;
} s;
};
/** * struct nps_pkt_instr - NPS Packet Instruction of SE cores. * @dptr0 : Input pointer points to buffer in remote host. * @ih: Packet Instruction Header (8 bytes) * @irh: Packet Input Header (16 bytes) * @slc: Solicited Packet Output Store Information (16 bytes) * @fdata: Front data * * 64-Byte Instruction Format
*/ struct nps_pkt_instr {
__be64 dptr0; union pkt_instr_hdr ih; union pkt_hdr irh; union slc_store_info slc;
u64 fdata[2];
};
/** * struct aqmq_command_s - The 32 byte command for AE processing. * @opcode: Request opcode * @param1: Request control parameter 1 * @param2: Request control parameter 2 * @dlen: Input length * @dptr: Input pointer points to buffer in remote host * @rptr: Result pointer points to buffer in remote host * @grp: AQM Group (0..7) * @cptr: Context pointer
*/ struct aqmq_command_s {
__be16 opcode;
__be16 param1;
__be16 param2;
__be16 dlen;
__be64 dptr;
__be64 rptr; union {
__be64 word3; #ifdefined(__BIG_ENDIAN_BITFIELD)
u64 grp : 3;
u64 cptr : 61; #else
u64 cptr : 61;
u64 grp : 3; #endif
};
};
/** * struct ctx_hdr - Book keeping data about the crypto context * @pool: Pool used to allocate crypto context * @dma: Base DMA address of the crypto context * @ctx_dma: Actual usable crypto context for NITROX
*/ struct ctx_hdr { struct dma_pool *pool;
dma_addr_t dma;
dma_addr_t ctx_dma;
};
/* * struct sglist_component - SG list component format * @len0: The number of bytes at [PTR0] on the remote host. * @len1: The number of bytes at [PTR1] on the remote host. * @len2: The number of bytes at [PTR2] on the remote host. * @len3: The number of bytes at [PTR3] on the remote host. * @dma0: First pointer point to buffer in remote host. * @dma1: Second pointer point to buffer in remote host. * @dma2: Third pointer point to buffer in remote host. * @dma3: Fourth pointer point to buffer in remote host.
*/ struct nitrox_sgcomp {
__be16 len[4];
__be64 dma[4];
};
/* * strutct nitrox_sgtable - SG list information * @sgmap_cnt: Number of buffers mapped * @total_bytes: Total bytes in sglist. * @sgcomp_len: Total sglist components length. * @sgcomp_dma: DMA address of sglist component. * @sg: crypto request buffer. * @sgcomp: sglist component for NITROX.
*/ struct nitrox_sgtable {
u8 sgmap_cnt;
u16 total_bytes;
u32 sgcomp_len;
dma_addr_t sgcomp_dma; struct scatterlist *sg; struct nitrox_sgcomp *sgcomp;
};
/** * create_single_sg - Point SG entry to the data * @sg: Destination SG list * @buf: Data * @buflen: Data length * * Returns next free entry in the destination SG list
**/ staticinlinestruct scatterlist *create_single_sg(struct scatterlist *sg, void *buf, int buflen)
{
sg_set_buf(sg, buf, buflen);
sg++; return sg;
}
/** * create_multi_sg - Create multiple sg entries with buflen data length from * source sglist * @to_sg: Destination SG list * @from_sg: Source SG list * @buflen: Data length * * Returns next free entry in the destination SG list
**/ staticinlinestruct scatterlist *create_multi_sg(struct scatterlist *to_sg, struct scatterlist *from_sg, int buflen)
{ struct scatterlist *sg = to_sg; unsignedint sglen;
for (; buflen && from_sg; buflen -= sglen) {
sglen = from_sg->length; if (sglen > buflen)
sglen = buflen;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.