automatic DPDK test reports
 help / color / mirror / Atom feed
* [dpdk-test-report] |WARNING| pw97761-97760 [PATCH] [2/2] event/cnxk: use common XAQ pool APIs
@ 2021-09-02  7:28 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2021-09-02  7:28 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

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

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

_apply patch failure_

Submitter: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
Date: Thursday, September 02 2021 07:00:33 
Applied on: CommitID:eeedef704c11bd74c367d62838700bdb8e5b573f
Apply patch set 97761-97760 failed:

Checking patch drivers/common/cnxk/roc_sso.c...
error: while searching for:
#include "roc_api.h"
#include "roc_priv.h"

/* Private functions. */
int
sso_lf_alloc(struct dev *dev, enum sso_lf_type lf_type, uint16_t nb_lf,

error: patch failed: drivers/common/cnxk/roc_sso.c:5
error: while searching for:
	return mbox_process(dev->mbox);
}

int
sso_hwgrp_alloc_xaq(struct dev *dev, uint32_t npa_aura_id, uint16_t hwgrps)
{

error: patch failed: drivers/common/cnxk/roc_sso.c:387
Checking patch drivers/common/cnxk/roc_sso.h...
Checking patch drivers/common/cnxk/roc_sso_priv.h...
error: while searching for:
			 uint16_t hwgrp[], uint16_t n, uint16_t enable);
int sso_hwgrp_alloc_xaq(struct dev *dev, uint32_t npa_aura_id, uint16_t hwgrps);
int sso_hwgrp_release_xaq(struct dev *dev, uint16_t hwgrps);

/* SSO IRQ */
int sso_register_irqs_priv(struct roc_sso *roc_sso,

error: patch failed: drivers/common/cnxk/roc_sso_priv.h:47
Checking patch drivers/common/cnxk/version.map...
Hunk #1 succeeded at 244 (offset -36 lines).
Applying patch drivers/common/cnxk/roc_sso.c with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applied patch drivers/common/cnxk/roc_sso.h cleanly.
Applying patch drivers/common/cnxk/roc_sso_priv.h with 1 reject...
Rejected hunk #1.
Applied patch drivers/common/cnxk/version.map cleanly.
diff a/drivers/common/cnxk/roc_sso.c b/drivers/common/cnxk/roc_sso.c	(rejected hunks)
@@ -5,6 +5,8 @@
 #include "roc_api.h"
 #include "roc_priv.h"

+#define SSO_XAQ_CACHE_CNT (0x7)
+
 /* Private functions. */
 int
 sso_lf_alloc(struct dev *dev, enum sso_lf_type lf_type, uint16_t nb_lf,
@@ -387,6 +389,126 @@ roc_sso_hwgrp_qos_config(struct roc_sso *roc_sso, struct roc_sso_hwgrp_qos *qos,
 	return mbox_process(dev->mbox);
 }

+int
+sso_hwgrp_init_xaq_aura(struct dev *dev, struct roc_sso_xaq_data *xaq,
+			uint32_t nb_xae, uint32_t xae_waes,
+			uint32_t xaq_buf_size, uint16_t nb_hwgrp)
+{
+	struct npa_pool_s pool;
+	struct npa_aura_s aura;
+	plt_iova_t iova;
+	uint32_t i;
+	int rc;
+
+	if (xaq->mem != NULL) {
+		rc = sso_hwgrp_release_xaq(dev, nb_hwgrp);
+		if (rc < 0) {
+			plt_err("Failed to release XAQ %d", rc);
+			return rc;
+		}
+		roc_npa_pool_destroy(xaq->aura_handle);
+		plt_free(xaq->fc);
+		plt_free(xaq->mem);
+		memset(xaq, 0, sizeof(struct roc_sso_xaq_data));
+	}
+
+	xaq->fc = plt_zmalloc(ROC_ALIGN, ROC_ALIGN);
+	if (xaq->fc == NULL) {
+		plt_err("Failed to allocate XAQ FC");
+		rc = -ENOMEM;
+		goto fail;
+	}
+
+	/* Taken from HRM 14.3.3(4) */
+	nb_xae += (xae_waes * SSO_XAQ_CACHE_CNT * nb_hwgrp);
+	xaq->nb_xae = nb_xae;
+	xaq->nb_xaq = xaq->nb_xae / xae_waes;
+
+	xaq->mem = plt_zmalloc(xaq_buf_size * xaq->nb_xaq, xaq_buf_size);
+	if (xaq->mem == NULL) {
+		plt_err("Failed to allocate XAQ mem");
+		rc = -ENOMEM;
+		goto free_fc;
+	}
+
+	memset(&pool, 0, sizeof(struct npa_pool_s));
+	pool.nat_align = 1;
+
+	memset(&aura, 0, sizeof(aura));
+	aura.fc_ena = 1;
+	aura.fc_addr = (uint64_t)xaq->fc;
+	aura.fc_hyst_bits = 0; /* Store count on all updates */
+	rc = roc_npa_pool_create(&xaq->aura_handle, xaq_buf_size, xaq->nb_xaq,
+				 &aura, &pool);
+	if (rc) {
+		plt_err("Failed to create XAQ pool");
+		goto npa_fail;
+	}
+
+	iova = (uint64_t)xaq->mem;
+	for (i = 0; i < xaq->nb_xaq; i++) {
+		roc_npa_aura_op_free(xaq->aura_handle, 0, iova);
+		iova += xaq_buf_size;
+	}
+	roc_npa_aura_op_range_set(xaq->aura_handle, (uint64_t)xaq->mem, iova);
+
+	/* When SW does addwork (enqueue) check if there is space in XAQ by
+	 * comparing fc_addr above against the xaq_lmt calculated below.
+	 * There should be a minimum headroom of one XAQ per HWGRP for SSO
+	 * to request XAQ to cache them even before enqueue is called.
+	 */
+	xaq->xaq_lmt = xaq->nb_xaq - nb_hwgrp;
+	return 0;
+npa_fail:
+	plt_free(xaq->mem);
+free_fc:
+	plt_free(xaq->fc);
+fail:
+	memset(xaq, 0, sizeof(struct roc_sso_xaq_data));
+	return rc;
+}
+
+int
+roc_sso_hwgrp_init_xaq_aura(struct roc_sso *roc_sso, uint32_t nb_xae)
+{
+	struct dev *dev = &roc_sso_to_sso_priv(roc_sso)->dev;
+
+	return sso_hwgrp_init_xaq_aura(dev, &roc_sso->xaq, nb_xae,
+				       roc_sso->xae_waes, roc_sso->xaq_buf_size,
+				       roc_sso->nb_hwgrp);
+}
+
+int
+sso_hwgrp_free_xaq_aura(struct dev *dev, struct roc_sso_xaq_data *xaq,
+			uint16_t nb_hwgrp)
+{
+	int rc;
+
+	if (xaq->mem != NULL) {
+		if (nb_hwgrp) {
+			rc = sso_hwgrp_release_xaq(dev, nb_hwgrp);
+			if (rc < 0) {
+				plt_err("Failed to release XAQ %d", rc);
+				return rc;
+			}
+		}
+		roc_npa_pool_destroy(xaq->aura_handle);
+		plt_free(xaq->fc);
+		plt_free(xaq->mem);
+	}
+	memset(xaq, 0, sizeof(struct roc_sso_xaq_data));
+
+	return 0;
+}
+
+int
+roc_sso_hwgrp_free_xaq_aura(struct roc_sso *roc_sso, uint16_t nb_hwgrp)
+{
+	struct dev *dev = &roc_sso_to_sso_priv(roc_sso)->dev;
+
+	return sso_hwgrp_free_xaq_aura(dev, &roc_sso->xaq, nb_hwgrp);
+}
+
 int
 sso_hwgrp_alloc_xaq(struct dev *dev, uint32_t npa_aura_id, uint16_t hwgrps)
 {
diff a/drivers/common/cnxk/roc_sso_priv.h b/drivers/common/cnxk/roc_sso_priv.h	(rejected hunks)
@@ -47,6 +47,11 @@ void sso_hws_link_modify(uint8_t hws, uintptr_t base, struct plt_bitmap *bmp,
 			 uint16_t hwgrp[], uint16_t n, uint16_t enable);
 int sso_hwgrp_alloc_xaq(struct dev *dev, uint32_t npa_aura_id, uint16_t hwgrps);
 int sso_hwgrp_release_xaq(struct dev *dev, uint16_t hwgrps);
+int sso_hwgrp_init_xaq_aura(struct dev *dev, struct roc_sso_xaq_data *xaq,
+			    uint32_t nb_xae, uint32_t xae_waes,
+			    uint32_t xaq_buf_size, uint16_t nb_hwgrp);
+int sso_hwgrp_free_xaq_aura(struct dev *dev, struct roc_sso_xaq_data *xaq,
+			    uint16_t nb_hwgrp);

 /* SSO IRQ */
 int sso_register_irqs_priv(struct roc_sso *roc_sso,

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

UNH-IOL DPDK Community Lab

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-02  7:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-02  7:28 [dpdk-test-report] |WARNING| pw97761-97760 [PATCH] [2/2] event/cnxk: use common XAQ pool APIs 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).