automatic DPDK test reports
 help / color / mirror / Atom feed
* |SUCCESS| pw121878 [PATCH v1 1/1] compress/octeontx: scatter gather mode feature support
       [not found] <20230112075926.2864279-1-mchalla@marvell.com>
@ 2023-01-12  7:51 ` qemudev
  2023-01-12  7:55 ` qemudev
  2023-01-12  8:00 ` |WARNING| " checkpatch
  2 siblings, 0 replies; 4+ messages in thread
From: qemudev @ 2023-01-12  7:51 UTC (permalink / raw)
  To: test-report

Test-Label: loongarch-compilation
Test-Status: SUCCESS
http://dpdk.org/patch/121878

_Compilation OK_

Submitter: Mahipal Challa <mchalla@marvell.com>
Date: Thu, 12 Jan 2023 13:29:26 +0530
DPDK git baseline: Repo:dpdk-next-crypto
  Branch: for-main
  CommitID: 0bc5f5650f0d6027d35aca51379cab65cffe322d

121878 --> meson & ninja build successfully

Test environment and result as below:

+---------------------+----------------+
|     Environment     | compilation    |
+---------------------+----------------+
| Loongnix-Server 8.3 | PASS           |
+---------------------+----------------+

Loongnix-Server 8.3
    Kernel: 4.19.190+
    Compiler: gcc 8.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* |SUCCESS| pw121878 [PATCH v1 1/1] compress/octeontx: scatter gather mode feature support
       [not found] <20230112075926.2864279-1-mchalla@marvell.com>
  2023-01-12  7:51 ` |SUCCESS| pw121878 [PATCH v1 1/1] compress/octeontx: scatter gather mode feature support qemudev
@ 2023-01-12  7:55 ` qemudev
  2023-01-12  8:00 ` |WARNING| " checkpatch
  2 siblings, 0 replies; 4+ messages in thread
From: qemudev @ 2023-01-12  7:55 UTC (permalink / raw)
  To: test-report

Test-Label: loongarch-unit-testing
Test-Status: SUCCESS
http://dpdk.org/patch/121878

_Unit Testing PASS_

Submitter: Mahipal Challa <mchalla@marvell.com>
Date: Thu, 12 Jan 2023 13:29:26 +0530
DPDK git baseline: Repo:dpdk-next-crypto
  Branch: for-main
  CommitID: 0bc5f5650f0d6027d35aca51379cab65cffe322d

121878 --> testing pass

Test environment and result as below:

+---------------------+----------------+
|     Environment     | dpdk_unit_test |
+---------------------+----------------+
| Loongnix-Server 8.3 | PASS           |
+---------------------+----------------+

Loongnix-Server 8.3
    Kernel: 4.19.190+
    Compiler: gcc 8.3


Test result details:
  1/103 DPDK:fast-tests / acl_autotest                            OK              2.88s
  2/103 DPDK:fast-tests / atomic_autotest                         OK              7.33s
  3/103 DPDK:fast-tests / bitmap_autotest                         OK              0.07s
  4/103 DPDK:fast-tests / bpf_autotest                            OK              0.07s
  5/103 DPDK:fast-tests / bpf_convert_autotest                    OK              0.07s
  6/103 DPDK:fast-tests / bitops_autotest                         OK              0.07s
  7/103 DPDK:fast-tests / byteorder_autotest                      OK              0.07s
  8/103 DPDK:fast-tests / cksum_autotest                          OK              0.07s
  9/103 DPDK:fast-tests / cmdline_autotest                        OK              0.07s
 10/103 DPDK:fast-tests / common_autotest                         OK              0.92s
 11/103 DPDK:fast-tests / cpuflags_autotest                       OK              0.07s
 12/103 DPDK:fast-tests / debug_autotest                          OK              1.87s
 13/103 DPDK:fast-tests / devargs_autotest                        OK              0.07s
 14/103 DPDK:fast-tests / eal_flags_c_opt_autotest                OK              0.57s
 15/103 DPDK:fast-tests / eal_flags_main_opt_autotest             OK              0.17s
 16/103 DPDK:fast-tests / eal_flags_n_opt_autotest                OK              0.17s
 17/103 DPDK:fast-tests / eal_flags_hpet_autotest                 OK              0.12s
 18/103 DPDK:fast-tests / eal_flags_no_huge_autotest              OK              0.17s
 19/103 DPDK:fast-tests / eal_flags_a_opt_autotest                OK              0.22s
 20/103 DPDK:fast-tests / eal_flags_b_opt_autotest                OK              0.17s
 21/103 DPDK:fast-tests / eal_flags_vdev_opt_autotest             OK              0.17s
 22/103 DPDK:fast-tests / eal_flags_r_opt_autotest                OK              0.17s
 23/103 DPDK:fast-tests / eal_flags_mem_autotest                  OK              0.52s
 24/103 DPDK:fast-tests / eal_flags_file_prefix_autotest          OK             21.86s
 25/103 DPDK:fast-tests / eal_flags_misc_autotest                 OK              0.72s
 26/103 DPDK:fast-tests / eal_fs_autotest                         OK              0.07s
 27/103 DPDK:fast-tests / errno_autotest                          OK              0.07s
 28/103 DPDK:fast-tests / ethdev_link_status                      OK              0.07s
 29/103 DPDK:fast-tests / event_ring_autotest                     OK              0.07s
 30/103 DPDK:fast-tests / fib_autotest                            OK              0.87s
 31/103 DPDK:fast-tests / fib6_autotest                           OK              0.92s
 32/103 DPDK:fast-tests / func_reentrancy_autotest                OK              2.38s
 33/103 DPDK:fast-tests / hash_autotest                           OK              1.02s
 34/103 DPDK:fast-tests / interrupt_autotest                      OK              1.37s
 35/103 DPDK:fast-tests / ipfrag_autotest                         OK              0.07s
 36/103 DPDK:fast-tests / lcores_autotest                         OK              1.07s
 37/103 DPDK:fast-tests / logs_autotest                           OK              0.07s
 38/103 DPDK:fast-tests / lpm_autotest                            OK              5.95s
 39/103 DPDK:fast-tests / lpm6_autotest                           OK              8.86s
 40/103 DPDK:fast-tests / malloc_autotest                         OK             66.09s
 41/103 DPDK:fast-tests / mbuf_autotest                           OK              6.63s
 42/103 DPDK:fast-tests / mcslock_autotest                        OK              4.27s
 43/103 DPDK:fast-tests / memcpy_autotest                         OK              6.68s
 44/103 DPDK:fast-tests / memory_autotest                         OK              0.07s
 45/103 DPDK:fast-tests / mempool_autotest                        OK              0.42s
 46/103 DPDK:fast-tests / memzone_autotest                        OK              0.17s
 47/103 DPDK:fast-tests / meter_autotest                          OK              0.07s
 48/103 DPDK:fast-tests / multiprocess_autotest                   OK              0.17s
 49/103 DPDK:fast-tests / per_lcore_autotest                      OK              0.17s
 50/103 DPDK:fast-tests / pflock_autotest                         OK              0.87s
 51/103 DPDK:fast-tests / prefetch_autotest                       OK              0.07s
 52/103 DPDK:fast-tests / rcu_qsbr_autotest                       OK              0.57s
 53/103 DPDK:fast-tests / pie_autotest                            OK              0.07s
 54/103 DPDK:fast-tests / rib_autotest                            OK             10.30s
 55/103 DPDK:fast-tests / rib6_autotest                           OK             10.30s
 56/103 DPDK:fast-tests / ring_autotest                           OK              0.12s
 57/103 DPDK:fast-tests / rwlock_test1_autotest                   OK              0.82s
 58/103 DPDK:fast-tests / rwlock_rda_autotest                     OK              5.07s
 59/103 DPDK:fast-tests / rwlock_rds_wrm_autotest                 OK              5.07s
 60/103 DPDK:fast-tests / rwlock_rde_wro_autotest                 OK              5.07s
 61/103 DPDK:fast-tests / sched_autotest                          OK              0.07s
 62/103 DPDK:fast-tests / security_autotest                       OK              0.07s
 63/103 DPDK:fast-tests / seqlock_autotest                        OK              2.07s
 64/103 DPDK:fast-tests / spinlock_autotest                       OK              0.17s
 65/103 DPDK:fast-tests / stack_autotest                          OK              0.87s
 66/103 DPDK:fast-tests / stack_lf_autotest                       SKIP            0.07s   exit status 77
 67/103 DPDK:fast-tests / string_autotest                         OK              0.07s
 68/103 DPDK:fast-tests / tailq_autotest                          OK              0.07s
 69/103 DPDK:fast-tests / ticketlock_autotest                     OK              0.22s
 70/103 DPDK:fast-tests / timer_autotest                          OK              3.92s
 71/103 DPDK:fast-tests / user_delay_us                           OK              0.07s
 72/103 DPDK:fast-tests / version_autotest                        OK              0.07s
 73/103 DPDK:fast-tests / crc_autotest                            OK              0.07s
 74/103 DPDK:fast-tests / distributor_autotest                    OK              1.22s
 75/103 DPDK:fast-tests / eventdev_common_autotest                OK              0.07s
 76/103 DPDK:fast-tests / fbarray_autotest                        OK              0.07s
 77/103 DPDK:fast-tests / hash_readwrite_func_autotest            OK              6.38s
 78/103 DPDK:fast-tests / ipsec_autotest                          SKIP            0.07s   exit status 77
 79/103 DPDK:fast-tests / kni_autotest                            SKIP            0.07s   exit status 77
 80/103 DPDK:fast-tests / kvargs_autotest                         OK              0.07s
 81/103 DPDK:fast-tests / member_autotest                         OK              1.32s
 82/103 DPDK:fast-tests / power_cpufreq_autotest                  SKIP            0.07s   exit status 77
 83/103 DPDK:fast-tests / power_autotest                          OK              0.07s
 84/103 DPDK:fast-tests / power_kvm_vm_autotest                   SKIP            0.07s   exit status 77
 85/103 DPDK:fast-tests / power_intel_uncore_autotest             SKIP            0.07s   exit status 77
 86/103 DPDK:fast-tests / reorder_autotest                        OK              0.12s
 87/103 DPDK:fast-tests / service_autotest                        OK              3.32s
 88/103 DPDK:fast-tests / thash_autotest                          OK              0.07s
 89/103 DPDK:fast-tests / threads_autotest                        OK              0.22s
 90/103 DPDK:fast-tests / trace_autotest                          OK              0.07s
 91/103 DPDK:fast-tests / trace_autotest_with_traces              OK              0.12s
 92/103 DPDK:fast-tests / metrics_autotest                        OK              0.07s
 93/103 DPDK:fast-tests / telemetry_json_autotest                 OK              0.07s
 94/103 DPDK:fast-tests / telemetry_data_autotest                 OK              0.07s
 95/103 DPDK:fast-tests / table_autotest                          OK             10.20s
 96/103 DPDK:fast-tests / ring_pmd_autotest                       OK              0.07s
 97/103 DPDK:fast-tests / event_eth_tx_adapter_autotest           OK              1.47s
 98/103 DPDK:fast-tests / bitratestats_autotest                   OK              0.07s
 99/103 DPDK:fast-tests / latencystats_autotest                   OK              0.07s
100/103 DPDK:fast-tests / pdump_autotest                          OK              5.17s
101/103 DPDK:fast-tests / vdev_autotest                           OK              0.07s
102/103 DPDK:fast-tests / compressdev_autotest                    SKIP            0.07s   exit status 77
103/103 DPDK:fast-tests / telemetry_all                           OK             14.54s


Ok:                 96
Expected Fail:      0
Fail:               0
Unexpected Pass:    0
Skipped:            7
Timeout:            0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* |WARNING| pw121878 [PATCH v1 1/1] compress/octeontx: scatter gather mode feature support
       [not found] <20230112075926.2864279-1-mchalla@marvell.com>
  2023-01-12  7:51 ` |SUCCESS| pw121878 [PATCH v1 1/1] compress/octeontx: scatter gather mode feature support qemudev
  2023-01-12  7:55 ` qemudev
@ 2023-01-12  8:00 ` checkpatch
  2 siblings, 0 replies; 4+ messages in thread
From: checkpatch @ 2023-01-12  8:00 UTC (permalink / raw)
  To: test-report; +Cc: Mahipal Challa

Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/121878

_coding style issues_


WARNING:TYPO_SPELLING: 'bufer' may be misspelled - perhaps 'buffer'?
#405: FILE: drivers/compress/octeontx/otx_zip_pmd.c:238:
+	/* Scatter Gather bufer pool */

total: 0 errors, 1 warnings, 356 lines checked

^ permalink raw reply	[flat|nested] 4+ messages in thread

* |WARNING| pw121878 [PATCH] [v1, 1/1] compress/octeontx: scatter gather mode feature support
@ 2023-01-12  8:18 dpdklab
  0 siblings, 0 replies; 4+ messages in thread
From: dpdklab @ 2023-01-12  8:18 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

[-- Attachment #1: Type: text/plain, Size: 13078 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/121878

_apply patch failure_

Submitter: Mahipal Challa <mchalla@marvell.com>
Date: Thursday, January 12 2023 07:59:26 
Applied on: CommitID:7f6b150cb79dad10b82fe004e5b2310e39507381
Apply patch set 121878 failed:

Checking patch drivers/compress/octeontx/otx_zip.h...
error: while searching for:
				ZIP_MAX_NCBP_SIZE)/* ~8072ull */

#define ZIP_BUF_SIZE	256
#define ZIP_BURST_SIZE	64

#define ZIP_MAXSEG_SIZE      59460
#define ZIP_EXTRABUF_SIZE    4096

#define ZIP_SGPTR_ALIGN	16
#define ZIP_CMDQ_ALIGN	128

error: patch failed: drivers/compress/octeontx/otx_zip.h:55
error: while searching for:
typedef int (*comp_func_t)(struct rte_comp_op *op, struct zipvf_qp *qp,
			   struct zip_stream *zstrm, int num);

/**
 * ZIP private stream structure
 */

error: patch failed: drivers/compress/octeontx/otx_zip.h:102
Hunk #3 succeeded at 140 (offset -13 lines).
error: while searching for:
	uint32_t  max_nb_queue_pairs;
	/* pointer to device qps */
	struct rte_mempool *zip_mp;
	/* pointer to pools */
} __rte_cache_aligned;


static inline void
zipvf_prepare_in_buf(union zip_inst_s *inst, struct rte_comp_op *op)
{
	uint32_t offset, inlen;
	struct rte_mbuf *m_src;

	inlen = op->src.length;
	offset = op->src.offset;
	m_src = op->m_src;

	/* Prepare direct input data pointer */
	inst->s.dg = 0;
	inst->s.inp_ptr_addr.s.addr =
			rte_pktmbuf_iova_offset(m_src, offset);
	inst->s.inp_ptr_ctl.s.length = inlen;
}

static inline void
zipvf_prepare_out_buf(union zip_inst_s *inst, struct rte_comp_op *op)
{
	uint32_t offset;
	struct rte_mbuf *m_dst;

	offset = op->dst.offset;
	m_dst = op->m_dst;

	/* Prepare direct input data pointer */
	inst->s.ds = 0;
	inst->s.out_ptr_addr.s.addr =
			rte_pktmbuf_iova_offset(m_dst, offset);
	inst->s.totaloutputlength = rte_pktmbuf_pkt_len(m_dst) -
			op->dst.offset;
	if (inst->s.totaloutputlength == ZIP_MAXSEG_SIZE)
		inst->s.totaloutputlength += ZIP_EXTRABUF_SIZE; /* DSTOP */

	inst->s.out_ptr_ctl.s.length = inst->s.totaloutputlength;
}

static inline void
zipvf_prepare_cmd_stateless(struct rte_comp_op *op, union zip_inst_s *inst)
{
	/* set flush flag to always 1*/
	inst->s.ef = 1;

error: patch failed: drivers/compress/octeontx/otx_zip.h:161
error: while searching for:
	/* Set input checksum */
	inst->s.adlercrc32 = op->input_chksum;

	/* Prepare gather buffers */
	zipvf_prepare_in_buf(inst, op);
	zipvf_prepare_out_buf(inst, op);
}

#ifdef ZIP_DBG

error: patch failed: drivers/compress/octeontx/otx_zip.h:217
error: while searching for:
	union zip_inst_s *cmd83 = (union zip_inst_s *)inst;

	printf("####### START ########\n");
	printf("doneint:%d totaloutputlength:%d\n", cmd83->s.doneint,
		cmd83->s.totaloutputlength);
	printf("exnum:%d iv:%d exbits:%d hmif:%d halg:%d\n", cmd83->s.exn,

error: patch failed: drivers/compress/octeontx/otx_zip.h:229
Hunk #7 succeeded at 249 (offset -119 lines).
Checking patch drivers/compress/octeontx/otx_zip_pmd.c...
error: while searching for:
	union zip_inst_s *inst = zstrm->inst[num];
	volatile union zip_zres_s *zresult = NULL;

	if ((op->m_src->nb_segs > 1) || (op->m_dst->nb_segs > 1) ||
			(op->src.offset > rte_pktmbuf_pkt_len(op->m_src)) ||
			(op->dst.offset > rte_pktmbuf_pkt_len(op->m_dst))) {
		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
		ZIP_PMD_ERR("Segmented packet is not supported\n");
		return 0;
	}

	zipvf_prepare_cmd_stateless(op, inst);

	zresult = (union zip_zres_s *)zstrm->bufs[RES_BUF + num];
	zresult->s.compcode = 0;

error: patch failed: drivers/compress/octeontx/otx_zip_pmd.c:46
Hunk #3 succeeded at 215 (offset 26 lines).
Hunk #4 succeeded at 237 (offset 26 lines).
Hunk #5 succeeded at 261 (offset 26 lines).
Hunk #6 succeeded at 313 (offset 26 lines).
error: while searching for:
		}
	}

#ifdef ZIP_DBG
	ZIP_PMD_INFO("ops_enqd[nb_ops:%d]:%d\n", nb_ops, enqd);
#endif

error: patch failed: drivers/compress/octeontx/otx_zip_pmd.c:482
error: while searching for:
		/* zstream is reset irrespective of result */
		reset_stream(zstrm->inst[i]);
		zresult->s.compcode = ZIP_COMP_E_NOTDONE;
	}

#ifdef ZIP_DBG

error: patch failed: drivers/compress/octeontx/otx_zip_pmd.c:548
Applying patch drivers/compress/octeontx/otx_zip.h with 5 rejects...
Rejected hunk #1.
Rejected hunk #2.
Hunk #3 applied cleanly.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Hunk #7 applied cleanly.
Applying patch drivers/compress/octeontx/otx_zip_pmd.c with 3 rejects...
Hunk #1 applied cleanly.
Rejected hunk #2.
Hunk #3 applied cleanly.
Hunk #4 applied cleanly.
Hunk #5 applied cleanly.
Hunk #6 applied cleanly.
Rejected hunk #7.
Rejected hunk #8.
diff a/drivers/compress/octeontx/otx_zip.h b/drivers/compress/octeontx/otx_zip.h	(rejected hunks)
@@ -55,10 +55,13 @@ extern int octtx_zip_logtype_driver;
 				ZIP_MAX_NCBP_SIZE)/* ~8072ull */
 
 #define ZIP_BUF_SIZE	256
+#define ZIP_SGBUF_SIZE	(5 * 1024)
 #define ZIP_BURST_SIZE	64
 
 #define ZIP_MAXSEG_SIZE      59460
 #define ZIP_EXTRABUF_SIZE    4096
+#define ZIP_MAX_SEGS         300
+#define ZIP_MAX_DATA_SIZE    (16*1024*1024)
 
 #define ZIP_SGPTR_ALIGN	16
 #define ZIP_CMDQ_ALIGN	128
@@ -102,6 +105,12 @@ struct zipvf_qp;
 typedef int (*comp_func_t)(struct rte_comp_op *op, struct zipvf_qp *qp,
 			   struct zip_stream *zstrm, int num);
 
+/* Scatter Gather list */
+struct zipvf_sginfo {
+	union zip_zptr_addr_s  sg_addr;
+	union zip_zptr_ctl_s   sg_ctl;
+} __rte_aligned(16);
+
 /**
  * ZIP private stream structure
  */
@@ -161,50 +175,146 @@ struct zip_vf {
 	uint32_t  max_nb_queue_pairs;
 	/* pointer to device qps */
 	struct rte_mempool *zip_mp;
+	struct rte_mempool *sg_mp;
 	/* pointer to pools */
 } __rte_cache_aligned;
 
 
-static inline void
-zipvf_prepare_in_buf(union zip_inst_s *inst, struct rte_comp_op *op)
+static inline int
+zipvf_prepare_sgl(struct rte_mbuf *buf, int64_t offset, struct zipvf_sginfo *sg_list,
+		  uint32_t data_len, const uint16_t max_segs, struct zipvf_qp *qp)
+{
+	struct zipvf_sginfo *sginfo = (struct zipvf_sginfo *)sg_list;
+	uint32_t tot_buf_len, sgidx;
+	int ret = -EINVAL;
+
+	for (sgidx = tot_buf_len = 0; buf && sgidx < max_segs; buf = buf->next) {
+		if (offset >= rte_pktmbuf_data_len(buf)) {
+			offset -= rte_pktmbuf_data_len(buf);
+			continue;
+		}
+
+		sginfo[sgidx].sg_ctl.s.length = (uint16_t)(rte_pktmbuf_data_len(buf) - offset);
+		sginfo[sgidx].sg_addr.s.addr = rte_pktmbuf_iova_offset(buf, offset);
+
+		offset = 0;
+		tot_buf_len += sginfo[sgidx].sg_ctl.s.length;
+
+		if (tot_buf_len >= data_len) {
+			sginfo[sgidx].sg_ctl.s.length -= tot_buf_len - data_len;
+			ret = 0;
+			break;
+		}
+
+#ifdef ZIP_DBG
+		ZIP_PMD_INFO("ZIP SGL buf[%d], len = %d, iova = 0x%"PRIx64"\n",
+			     sgidx, sginfo[sgidx].sg_ctl.s.length,
+			     sginfo[sgidx].sg_addr.s.addr);
+#endif
+		++sgidx;
+	}
+
+	if (unlikely(ret != 0)) {
+		if (sgidx == max_segs)
+			ZIP_PMD_ERR("Exceeded max segments in ZIP SGL (%u)", max_segs);
+		else
+			ZIP_PMD_ERR("Mbuf chain is too short");
+	}
+	qp->num_sgbuf = ++sgidx;
+
+#ifdef ZIP_DBG
+	ZIP_PMD_INFO("Tot_buf_len:%d max_segs:%d\n", tot_buf_len, qp->num_sgbuf);
+#endif
+	return ret;
+}
+
+static inline int
+zipvf_prepare_in_buf(union zip_inst_s *inst, struct zipvf_qp *qp, struct rte_comp_op *op)
 {
 	uint32_t offset, inlen;
 	struct rte_mbuf *m_src;
+	int ret = 0;
 
 	inlen = op->src.length;
 	offset = op->src.offset;
 	m_src = op->m_src;
 
+	/* Gather input */
+	if (op->m_src->next != NULL && inlen > ZIP_MAXSEG_SIZE) {
+		inst->s.dg = 1;
+
+		ret = zipvf_prepare_sgl(m_src, offset, qp->g_info, inlen,
+					op->m_src->nb_segs, qp);
+
+		inst->s.inp_ptr_addr.s.addr = rte_mem_virt2iova(qp->g_info);
+		inst->s.inp_ptr_ctl.s.length = qp->num_sgbuf;
+		inst->s.inp_ptr_ctl.s.fw = 0;
+
+#ifdef ZIP_DBG
+		ZIP_PMD_INFO("Gather(input): len(nb_segs):%d, iova: 0x%"PRIx64"\n",
+			     inst->s.inp_ptr_ctl.s.length, inst->s.inp_ptr_addr.s.addr);
+#endif
+		return ret;
+	}
+
 	/* Prepare direct input data pointer */
 	inst->s.dg = 0;
-	inst->s.inp_ptr_addr.s.addr =
-			rte_pktmbuf_iova_offset(m_src, offset);
+	inst->s.inp_ptr_addr.s.addr = rte_pktmbuf_iova_offset(m_src, offset);
 	inst->s.inp_ptr_ctl.s.length = inlen;
+
+#ifdef ZIP_DBG
+	ZIP_PMD_INFO("Direct input - inlen:%d\n", inlen);
+#endif
+	return ret;
 }
 
-static inline void
-zipvf_prepare_out_buf(union zip_inst_s *inst, struct rte_comp_op *op)
+static inline int
+zipvf_prepare_out_buf(union zip_inst_s *inst, struct zipvf_qp *qp, struct rte_comp_op *op)
 {
-	uint32_t offset;
+	uint32_t offset, outlen;
 	struct rte_mbuf *m_dst;
+	int ret = 0;
 
 	offset = op->dst.offset;
 	m_dst = op->m_dst;
+	outlen = rte_pktmbuf_pkt_len(m_dst) - op->dst.offset;
 
-	/* Prepare direct input data pointer */
+	/* Scatter output */
+	if (op->m_dst->next != NULL && outlen > ZIP_MAXSEG_SIZE) {
+		inst->s.ds = 1;
+		inst->s.totaloutputlength = outlen; /*rte_pktmbuf_pkt_len(m_dst) - op->dst.offset;*/
+
+		ret = zipvf_prepare_sgl(m_dst, offset, qp->s_info, inst->s.totaloutputlength,
+					m_dst->nb_segs, qp);
+
+		inst->s.out_ptr_addr.s.addr = rte_mem_virt2iova(qp->s_info);
+		inst->s.out_ptr_ctl.s.length = qp->num_sgbuf;
+
+#ifdef ZIP_DBG
+		ZIP_PMD_INFO("Scatter(output): nb_segs:%d, iova:0x%"PRIx64"\n",
+			     inst->s.out_ptr_ctl.s.length, inst->s.out_ptr_addr.s.addr);
+#endif
+		return ret;
+	}
+
+	/* Prepare direct output data pointer */
 	inst->s.ds = 0;
-	inst->s.out_ptr_addr.s.addr =
-			rte_pktmbuf_iova_offset(m_dst, offset);
-	inst->s.totaloutputlength = rte_pktmbuf_pkt_len(m_dst) -
-			op->dst.offset;
+	inst->s.out_ptr_addr.s.addr = rte_pktmbuf_iova_offset(m_dst, offset);
+	inst->s.totaloutputlength = rte_pktmbuf_pkt_len(m_dst) - op->dst.offset;
 	if (inst->s.totaloutputlength == ZIP_MAXSEG_SIZE)
 		inst->s.totaloutputlength += ZIP_EXTRABUF_SIZE; /* DSTOP */
 
 	inst->s.out_ptr_ctl.s.length = inst->s.totaloutputlength;
+
+#ifdef ZIP_DBG
+	ZIP_PMD_INFO("Direct output - outlen:%d\n", inst->s.totaloutputlength);
+#endif
+	return ret;
 }
 
-static inline void
-zipvf_prepare_cmd_stateless(struct rte_comp_op *op, union zip_inst_s *inst)
+static inline int
+zipvf_prepare_cmd_stateless(struct rte_comp_op *op, struct zipvf_qp *qp,
+			    union zip_inst_s *inst)
 {
 	/* set flush flag to always 1*/
 	inst->s.ef = 1;
@@ -217,9 +327,18 @@ zipvf_prepare_cmd_stateless(struct rte_comp_op *op, union zip_inst_s *inst)
 	/* Set input checksum */
 	inst->s.adlercrc32 = op->input_chksum;
 
-	/* Prepare gather buffers */
-	zipvf_prepare_in_buf(inst, op);
-	zipvf_prepare_out_buf(inst, op);
+	/* Prepare input/output buffers */
+	if (zipvf_prepare_in_buf(inst, qp, op)) {
+		ZIP_PMD_ERR("Con't fill input SGL ");
+		return -EINVAL;
+	}
+
+	if (zipvf_prepare_out_buf(inst, qp, op)) {
+		ZIP_PMD_ERR("Con't fill output SGL ");
+		return -EINVAL;
+	}
+
+	return 0;
 }
 
 #ifdef ZIP_DBG
@@ -229,6 +348,7 @@ zip_dump_instruction(void *inst)
 	union zip_inst_s *cmd83 = (union zip_inst_s *)inst;
 
 	printf("####### START ########\n");
+	printf("ZIP Instr:0x%"PRIx64"\n", cmd83);
 	printf("doneint:%d totaloutputlength:%d\n", cmd83->s.doneint,
 		cmd83->s.totaloutputlength);
 	printf("exnum:%d iv:%d exbits:%d hmif:%d halg:%d\n", cmd83->s.exn,
diff a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c	(rejected hunks)
@@ -46,15 +49,27 @@ zip_process_op(struct rte_comp_op *op,
 	union zip_inst_s *inst = zstrm->inst[num];
 	volatile union zip_zres_s *zresult = NULL;
 
-	if ((op->m_src->nb_segs > 1) || (op->m_dst->nb_segs > 1) ||
-			(op->src.offset > rte_pktmbuf_pkt_len(op->m_src)) ||
-			(op->dst.offset > rte_pktmbuf_pkt_len(op->m_dst))) {
+	if (op->m_src->nb_segs > 1)
+		if (rte_mempool_get(qp->vf->sg_mp, (void *)&qp->g_info) < 0) {
+			ZIP_PMD_ERR("Can't1 allocate object from SG pool");
+			return (-ENOMEM);
+		}
+
+	if (op->m_dst->nb_segs > 1)
+		if (rte_mempool_get(qp->vf->sg_mp, (void *)&qp->s_info) < 0) {
+			rte_mempool_put(qp->vf->sg_mp, qp->g_info);
+			ZIP_PMD_ERR("Can't allocate object from SG pool");
+			return (-ENOMEM);
+		}
+
+	if (zipvf_prepare_cmd_stateless(op, qp, inst)) {
 		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
-		ZIP_PMD_ERR("Segmented packet is not supported\n");
-		return 0;
-	}
+		rte_mempool_put(qp->vf->sg_mp, qp->g_info);
+		rte_mempool_put(qp->vf->sg_mp, qp->s_info);
 
-	zipvf_prepare_cmd_stateless(op, inst);
+		ZIP_PMD_ERR("Can't fill SGL buffers");
+		return -EINVAL;
+	}
 
 	zresult = (union zip_zres_s *)zstrm->bufs[RES_BUF + num];
 	zresult->s.compcode = 0;
@@ -482,6 +527,7 @@ zip_pmd_enqueue_burst(void *queue_pair,
 		}
 	}
 
+	qp->enqed = enqd;
 #ifdef ZIP_DBG
 	ZIP_PMD_INFO("ops_enqd[nb_ops:%d]:%d\n", nb_ops, enqd);
 #endif
@@ -548,6 +594,12 @@ zip_pmd_dequeue_burst(void *queue_pair,
 		/* zstream is reset irrespective of result */
 		reset_stream(zstrm->inst[i]);
 		zresult->s.compcode = ZIP_COMP_E_NOTDONE;
+
+		if (op->m_src->nb_segs > 1)
+			rte_mempool_put(qp->vf->sg_mp, qp->g_info);
+
+		if (op->m_dst->nb_segs > 1)
+			rte_mempool_put(qp->vf->sg_mp, qp->s_info);
 	}
 
 #ifdef ZIP_DBG

https://lab.dpdk.org/results/dashboard/patchsets/24950/

UNH-IOL DPDK Community Lab

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-12  8:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230112075926.2864279-1-mchalla@marvell.com>
2023-01-12  7:51 ` |SUCCESS| pw121878 [PATCH v1 1/1] compress/octeontx: scatter gather mode feature support qemudev
2023-01-12  7:55 ` qemudev
2023-01-12  8:00 ` |WARNING| " checkpatch
2023-01-12  8:18 |WARNING| pw121878 [PATCH] [v1, " dpdklab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).