automatic DPDK test reports
 help / color / mirror / Atom feed
* |WARNING| pw106753-106758 [PATCH] [8/8] net/sfc: use the even spread mode in flow action RSS
@ 2022-02-01  9:09 dpdklab
  0 siblings, 0 replies; only message in thread
From: dpdklab @ 2022-02-01  9:09 UTC (permalink / raw)
  To: test-report; +Cc: dpdk-test-reports

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

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

_apply patch failure_

Submitter: Ivan Malov <Ivan.Malov@oktetlabs.ru>
Date: Tuesday, February 01 2022 08:50:02 
Applied on: CommitID:a52c79642ab4296763189dd8efadbb679d32c9a0
Apply patch set 106753-106758 failed:

Checking patch drivers/net/sfc/meson.build...
Checking patch drivers/net/sfc/sfc.c...
Checking patch drivers/net/sfc/sfc.h...
Checking patch drivers/net/sfc/sfc_ethdev.c...
Checking patch drivers/net/sfc/sfc_flow.c...
error: while searching for:
		   const struct rte_flow_action_rss *action_rss,
		   struct rte_flow *flow)
{
	struct sfc_adapter_shared * const sas = sfc_sa2shared(sa);
	struct sfc_rss *rss = &sas->rss;
	sfc_ethdev_qid_t ethdev_qid;
	struct sfc_rxq *rxq;
	unsigned int rxq_hw_index_min;
	unsigned int rxq_hw_index_max;
	efx_rx_hash_type_t efx_hash_types;
	const uint8_t *rss_key;
	struct sfc_flow_spec *spec = &flow->spec;
	struct sfc_flow_spec_filter *spec_filter = &spec->filter;
	struct sfc_flow_rss *sfc_rss_conf = &spec_filter->rss_conf;
	unsigned int i;

	if (action_rss->queue_num == 0)
		return -EINVAL;

	ethdev_qid = sfc_sa2shared(sa)->ethdev_rxq_count - 1;
	rxq = sfc_rxq_ctrl_by_ethdev_qid(sa, ethdev_qid);
	rxq_hw_index_min = rxq->hw_index;
	rxq_hw_index_max = 0;

	for (i = 0; i < action_rss->queue_num; ++i) {
		ethdev_qid = action_rss->queue[i];

		if ((unsigned int)ethdev_qid >=
		    sfc_sa2shared(sa)->ethdev_rxq_count)
			return -EINVAL;

		rxq = sfc_rxq_ctrl_by_ethdev_qid(sa, ethdev_qid);

		if (rxq->hw_index < rxq_hw_index_min)
			rxq_hw_index_min = rxq->hw_index;

		if (rxq->hw_index > rxq_hw_index_max)
			rxq_hw_index_max = rxq->hw_index;
	}

	if (rxq_hw_index_max - rxq_hw_index_min + 1 > EFX_MAXRSS)
		return -EINVAL;

	switch (action_rss->func) {
	case RTE_ETH_HASH_FUNCTION_DEFAULT:
	case RTE_ETH_HASH_FUNCTION_TOEPLITZ:
		break;
	default:
		return -EINVAL;
	}

	if (action_rss->level)
		return -EINVAL;

	/*
	 * Dummy RSS action with only one queue and no specific settings
	 * for hash types and key does not require dedicated RSS context
	 * and may be simplified to single queue action.
	 */
	if (action_rss->queue_num == 1 && action_rss->types == 0 &&
	    action_rss->key_len == 0) {
		spec_filter->template.efs_dmaq_id = rxq_hw_index_min;
		return 0;
	}

	if (action_rss->types) {
		int rc;

		rc = sfc_rx_hf_rte_to_efx(sa, action_rss->types,
					  &efx_hash_types);
		if (rc != 0)
			return -rc;
	} else {
		unsigned int i;

		efx_hash_types = 0;
		for (i = 0; i < rss->hf_map_nb_entries; ++i)
			efx_hash_types |= rss->hf_map[i].efx;
	}

	if (action_rss->key_len) {
		if (action_rss->key_len != sizeof(rss->key))
			return -EINVAL;

		rss_key = action_rss->key;
	} else {
		rss_key = rss->key;
	}

	spec_filter->rss = B_TRUE;

	sfc_rss_conf->rxq_hw_index_min = rxq_hw_index_min;
	sfc_rss_conf->rxq_hw_index_max = rxq_hw_index_max;
	sfc_rss_conf->rss_hash_types = efx_hash_types;
	rte_memcpy(sfc_rss_conf->rss_key, rss_key, sizeof(rss->key));

	for (i = 0; i < RTE_DIM(sfc_rss_conf->rss_tbl); ++i) {
		unsigned int nb_queues = action_rss->queue_num;
		struct sfc_rxq *rxq;

		ethdev_qid = action_rss->queue[i % nb_queues];
		rxq = sfc_rxq_ctrl_by_ethdev_qid(sa, ethdev_qid);
		sfc_rss_conf->rss_tbl[i] = rxq->hw_index - rxq_hw_index_min;
	}

	return 0;
}

error: patch failed: drivers/net/sfc/sfc_flow.c:1440
error: while searching for:
sfc_flow_filter_insert(struct sfc_adapter *sa,
		       struct rte_flow *flow)
{
	struct sfc_adapter_shared * const sas = sfc_sa2shared(sa);
	struct sfc_rss *rss = &sas->rss;
	struct sfc_flow_spec_filter *spec_filter = &flow->spec.filter;
	struct sfc_flow_rss *flow_rss = &spec_filter->rss_conf;
	uint32_t efs_rss_context = EFX_RSS_CONTEXT_DEFAULT;
	boolean_t create_context;
	unsigned int i;
	int rc = 0;

	create_context = spec_filter->rss || (spec_filter->rss_hash_required &&
			rss->dummy_rss_context == EFX_RSS_CONTEXT_DEFAULT);

	if (create_context) {
		unsigned int rss_spread;
		unsigned int rss_hash_types;
		uint8_t *rss_key;

		if (spec_filter->rss) {
			rss_spread = flow_rss->rxq_hw_index_max -
				     flow_rss->rxq_hw_index_min + 1;
			rss_hash_types = flow_rss->rss_hash_types;
			rss_key = flow_rss->rss_key;
		} else {
			/*
			 * Initialize dummy RSS context parameters to have
			 * valid RSS hash. Use default RSS hash function and
			 * key.
			 */
			rss_spread = 1;
			rss_hash_types = rss->hash_types;
			rss_key = rss->key;
		}

		rc = efx_rx_scale_context_alloc(sa->nic,
						EFX_RX_SCALE_EXCLUSIVE,
						rss_spread,
						&efs_rss_context);
		if (rc != 0)
			goto fail_scale_context_alloc;

		rc = efx_rx_scale_mode_set(sa->nic, efs_rss_context,
					   rss->hash_alg,
					   rss_hash_types, B_TRUE);
		if (rc != 0)
			goto fail_scale_mode_set;

		rc = efx_rx_scale_key_set(sa->nic, efs_rss_context,
					  rss_key, sizeof(rss->key));
		if (rc != 0)
			goto fail_scale_key_set;
	} else {
		efs_rss_context = rss->dummy_rss_context;
	}

	if (spec_filter->rss || spec_filter->rss_hash_required) {
		/*
		 * At this point, fully elaborated filter specifications
		 * have been produced from the template. To make sure that

error: patch failed: drivers/net/sfc/sfc_flow.c:1597
Hunk #6 succeeded at 1667 (offset 119 lines).
Hunk #7 succeeded at 1675 (offset 119 lines).
Hunk #8 succeeded at 1695 (offset 119 lines).
Hunk #9 succeeded at 2949 (offset 119 lines).
Hunk #10 succeeded at 2956 (offset 119 lines).
Hunk #11 succeeded at 2986 (offset 119 lines).
Checking patch drivers/net/sfc/sfc_flow.h...
Checking patch drivers/net/sfc/sfc_flow_rss.c...
Checking patch drivers/net/sfc/sfc_flow_rss.h...
Applied patch drivers/net/sfc/meson.build cleanly.
Applied patch drivers/net/sfc/sfc.c cleanly.
Applied patch drivers/net/sfc/sfc.h cleanly.
Applied patch drivers/net/sfc/sfc_ethdev.c cleanly.
Applying patch drivers/net/sfc/sfc_flow.c with 2 rejects...
Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Rejected hunk #4.
Rejected hunk #5.
Hunk #6 applied cleanly.
Hunk #7 applied cleanly.
Hunk #8 applied cleanly.
Hunk #9 applied cleanly.
Hunk #10 applied cleanly.
Hunk #11 applied cleanly.
Applied patch drivers/net/sfc/sfc_flow.h cleanly.
Applied patch drivers/net/sfc/sfc_flow_rss.c cleanly.
Applied patch drivers/net/sfc/sfc_flow_rss.h cleanly.
diff a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c	(rejected hunks)
@@ -1440,107 +1448,30 @@ sfc_flow_parse_rss(struct sfc_adapter *sa,
 		   const struct rte_flow_action_rss *action_rss,
 		   struct rte_flow *flow)
 {
-	struct sfc_adapter_shared * const sas = sfc_sa2shared(sa);
-	struct sfc_rss *rss = &sas->rss;
-	sfc_ethdev_qid_t ethdev_qid;
+	struct sfc_flow_spec_filter *spec_filter = &flow->spec.filter;
+	struct sfc_flow_rss_conf conf;
+	uint16_t sw_qid_min;
 	struct sfc_rxq *rxq;
-	unsigned int rxq_hw_index_min;
-	unsigned int rxq_hw_index_max;
-	efx_rx_hash_type_t efx_hash_types;
-	const uint8_t *rss_key;
-	struct sfc_flow_spec *spec = &flow->spec;
-	struct sfc_flow_spec_filter *spec_filter = &spec->filter;
-	struct sfc_flow_rss *sfc_rss_conf = &spec_filter->rss_conf;
-	unsigned int i;
-
-	if (action_rss->queue_num == 0)
-		return -EINVAL;
-
-	ethdev_qid = sfc_sa2shared(sa)->ethdev_rxq_count - 1;
-	rxq = sfc_rxq_ctrl_by_ethdev_qid(sa, ethdev_qid);
-	rxq_hw_index_min = rxq->hw_index;
-	rxq_hw_index_max = 0;
-
-	for (i = 0; i < action_rss->queue_num; ++i) {
-		ethdev_qid = action_rss->queue[i];
-
-		if ((unsigned int)ethdev_qid >=
-		    sfc_sa2shared(sa)->ethdev_rxq_count)
-			return -EINVAL;
-
-		rxq = sfc_rxq_ctrl_by_ethdev_qid(sa, ethdev_qid);
-
-		if (rxq->hw_index < rxq_hw_index_min)
-			rxq_hw_index_min = rxq->hw_index;
-
-		if (rxq->hw_index > rxq_hw_index_max)
-			rxq_hw_index_max = rxq->hw_index;
-	}
+	int rc;
 
-	if (rxq_hw_index_max - rxq_hw_index_min + 1 > EFX_MAXRSS)
-		return -EINVAL;
+	spec_filter->template.efs_flags |= EFX_FILTER_FLAG_RX_RSS;
 
-	switch (action_rss->func) {
-	case RTE_ETH_HASH_FUNCTION_DEFAULT:
-	case RTE_ETH_HASH_FUNCTION_TOEPLITZ:
-		break;
-	default:
-		return -EINVAL;
-	}
+	rc = sfc_flow_rss_parse_conf(sa, action_rss, &conf, &sw_qid_min);
+	if (rc != 0)
+		return -rc;
 
-	if (action_rss->level)
-		return -EINVAL;
+	rxq = sfc_rxq_ctrl_by_ethdev_qid(sa, sw_qid_min);
+	spec_filter->template.efs_dmaq_id = rxq->hw_index;
 
-	/*
-	 * Dummy RSS action with only one queue and no specific settings
-	 * for hash types and key does not require dedicated RSS context
-	 * and may be simplified to single queue action.
-	 */
-	if (action_rss->queue_num == 1 && action_rss->types == 0 &&
-	    action_rss->key_len == 0) {
-		spec_filter->template.efs_dmaq_id = rxq_hw_index_min;
+	spec_filter->rss_ctx = sfc_flow_rss_ctx_reuse(sa, &conf, sw_qid_min,
+						      action_rss->queue);
+	if (spec_filter->rss_ctx != NULL)
 		return 0;
-	}
-
-	if (action_rss->types) {
-		int rc;
-
-		rc = sfc_rx_hf_rte_to_efx(sa, action_rss->types,
-					  &efx_hash_types);
-		if (rc != 0)
-			return -rc;
-	} else {
-		unsigned int i;
-
-		efx_hash_types = 0;
-		for (i = 0; i < rss->hf_map_nb_entries; ++i)
-			efx_hash_types |= rss->hf_map[i].efx;
-	}
-
-	if (action_rss->key_len) {
-		if (action_rss->key_len != sizeof(rss->key))
-			return -EINVAL;
-
-		rss_key = action_rss->key;
-	} else {
-		rss_key = rss->key;
-	}
-
-	spec_filter->rss = B_TRUE;
-
-	sfc_rss_conf->rxq_hw_index_min = rxq_hw_index_min;
-	sfc_rss_conf->rxq_hw_index_max = rxq_hw_index_max;
-	sfc_rss_conf->rss_hash_types = efx_hash_types;
-	rte_memcpy(sfc_rss_conf->rss_key, rss_key, sizeof(rss->key));
 
-	for (i = 0; i < RTE_DIM(sfc_rss_conf->rss_tbl); ++i) {
-		unsigned int nb_queues = action_rss->queue_num;
-		struct sfc_rxq *rxq;
-
-		ethdev_qid = action_rss->queue[i % nb_queues];
-		rxq = sfc_rxq_ctrl_by_ethdev_qid(sa, ethdev_qid);
-		sfc_rss_conf->rss_tbl[i] = rxq->hw_index - rxq_hw_index_min;
-	}
+	rc = sfc_flow_rss_ctx_add(sa, &conf, sw_qid_min, action_rss->queue,
+				  &spec_filter->rss_ctx);
+	if (rc != 0)
+		return -rc;
 
 	return 0;
 }
@@ -1597,61 +1528,17 @@ static int
 sfc_flow_filter_insert(struct sfc_adapter *sa,
 		       struct rte_flow *flow)
 {
-	struct sfc_adapter_shared * const sas = sfc_sa2shared(sa);
-	struct sfc_rss *rss = &sas->rss;
 	struct sfc_flow_spec_filter *spec_filter = &flow->spec.filter;
-	struct sfc_flow_rss *flow_rss = &spec_filter->rss_conf;
-	uint32_t efs_rss_context = EFX_RSS_CONTEXT_DEFAULT;
-	boolean_t create_context;
-	unsigned int i;
+	struct sfc_flow_rss_ctx *rss_ctx = spec_filter->rss_ctx;
 	int rc = 0;
 
-	create_context = spec_filter->rss || (spec_filter->rss_hash_required &&
-			rss->dummy_rss_context == EFX_RSS_CONTEXT_DEFAULT);
-
-	if (create_context) {
-		unsigned int rss_spread;
-		unsigned int rss_hash_types;
-		uint8_t *rss_key;
-
-		if (spec_filter->rss) {
-			rss_spread = flow_rss->rxq_hw_index_max -
-				     flow_rss->rxq_hw_index_min + 1;
-			rss_hash_types = flow_rss->rss_hash_types;
-			rss_key = flow_rss->rss_key;
-		} else {
-			/*
-			 * Initialize dummy RSS context parameters to have
-			 * valid RSS hash. Use default RSS hash function and
-			 * key.
-			 */
-			rss_spread = 1;
-			rss_hash_types = rss->hash_types;
-			rss_key = rss->key;
-		}
-
-		rc = efx_rx_scale_context_alloc(sa->nic,
-						EFX_RX_SCALE_EXCLUSIVE,
-						rss_spread,
-						&efs_rss_context);
-		if (rc != 0)
-			goto fail_scale_context_alloc;
-
-		rc = efx_rx_scale_mode_set(sa->nic, efs_rss_context,
-					   rss->hash_alg,
-					   rss_hash_types, B_TRUE);
-		if (rc != 0)
-			goto fail_scale_mode_set;
+	rc = sfc_flow_rss_ctx_program(sa, rss_ctx);
+	if (rc != 0)
+		goto fail_rss_ctx_program;
 
-		rc = efx_rx_scale_key_set(sa->nic, efs_rss_context,
-					  rss_key, sizeof(rss->key));
-		if (rc != 0)
-			goto fail_scale_key_set;
-	} else {
-		efs_rss_context = rss->dummy_rss_context;
-	}
+	if (rss_ctx != NULL) {
+		unsigned int i;
 
-	if (spec_filter->rss || spec_filter->rss_hash_required) {
 		/*
 		 * At this point, fully elaborated filter specifications
 		 * have been produced from the template. To make sure that
Checking patch drivers/net/sfc/sfc_flow_rss.c...
error: drivers/net/sfc/sfc_flow_rss.c: does not exist in index
Checking patch drivers/net/sfc/sfc_flow_rss.h...
error: drivers/net/sfc/sfc_flow_rss.h: does not exist in index
Checking patch drivers/net/sfc/sfc_flow_rss.c...
error: drivers/net/sfc/sfc_flow_rss.c: does not exist in index
Checking patch drivers/net/sfc/sfc_flow_rss.h...
error: drivers/net/sfc/sfc_flow_rss.h: does not exist in index
Checking patch drivers/net/sfc/sfc_flow_rss.c...
error: drivers/net/sfc/sfc_flow_rss.c: does not exist in index
Checking patch drivers/net/sfc/sfc_flow_rss.h...
error: drivers/net/sfc/sfc_flow_rss.h: does not exist in index

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

UNH-IOL DPDK Community Lab

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

only message in thread, other threads:[~2022-02-01  9:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-01  9:09 |WARNING| pw106753-106758 [PATCH] [8/8] net/sfc: use the even spread mode in flow action RSS 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).