Lines Matching defs:nx_sg
72 * This function will start writing nx_sg elements at @sg_head and keep
78 struct nx_sg *nx_build_sg_list(struct nx_sg *sg_head,
84 struct nx_sg *sg;
98 /* each iteration will write one struct nx_sg element and add the
102 * as sg_addr, if not, we need to create another nx_sg element for the
142 * @nx_dst: pointer to the first nx_sg element to write
143 * @sglen: max number of nx_sg entries we're allowed to write
148 struct nx_sg *nx_walk_and_build(struct nx_sg *nx_dst,
155 struct nx_sg *nx_sg = nx_dst;
174 while (len && (nx_sg - nx_dst) < sglen) {
184 nx_sg = nx_build_sg_list(nx_sg, dst, &n, sglen - (nx_sg - nx_dst));
195 return nx_sg;
205 static long int trim_sg_list(struct nx_sg *sg,
206 struct nx_sg *end,
215 struct nx_sg *last = end - 1;
231 oplen = (sg - end) * sizeof(struct nx_sg);
268 struct nx_sg *nx_insg = nx_ctx->in_sg;
269 struct nx_sg *nx_outsg = nx_ctx->out_sg;
273 nx_driver.of.max_sg_len/sizeof(struct nx_sg));
676 nx_ctx->in_sg = (struct nx_sg *)((u8 *)nx_ctx->csbcpb + NX_PAGE_SIZE);
677 nx_ctx->out_sg = (struct nx_sg *)((u8 *)nx_ctx->in_sg + NX_PAGE_SIZE);