[v3,3/3] node/ethdev_rx: remove hardcoded node next details
Checks
Commit Message
For ethdev_rx node, node_next details can be populated
during node cloning time and same gets assigned to
node context structure during node initialization.
Patch removes overriding node_next details in node
init().
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
---
lib/node/ethdev_ctrl.c | 1 +
lib/node/ethdev_rx.c | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
Comments
Acked-by: Nithin Dabilpuram<ndabilpuram@marvell.com>
On Fri, Jun 2, 2023 at 9:52 PM Vamsi Attunuru <vattunuru@marvell.com> wrote:
>
> For ethdev_rx node, node_next details can be populated
> during node cloning time and same gets assigned to
> node context structure during node initialization.
>
> Patch removes overriding node_next details in node
> init().
>
> Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
> ---
> lib/node/ethdev_ctrl.c | 1 +
> lib/node/ethdev_rx.c | 3 ---
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/lib/node/ethdev_ctrl.c b/lib/node/ethdev_ctrl.c
> index 37df0431b8..496f791cee 100644
> --- a/lib/node/ethdev_ctrl.c
> +++ b/lib/node/ethdev_ctrl.c
> @@ -82,6 +82,7 @@ rte_node_eth_config(struct rte_node_ethdev_config *conf, uint16_t nb_confs,
> memset(elem, 0, sizeof(ethdev_rx_node_elem_t));
> elem->ctx.port_id = port_id;
> elem->ctx.queue_id = j;
> + elem->ctx.cls_next = ETHDEV_RX_NEXT_PKT_CLS;
> elem->nid = id;
> elem->next = rx_node_data->head;
> rx_node_data->head = elem;
> diff --git a/lib/node/ethdev_rx.c b/lib/node/ethdev_rx.c
> index a19237b42f..d131034991 100644
> --- a/lib/node/ethdev_rx.c
> +++ b/lib/node/ethdev_rx.c
> @@ -194,8 +194,6 @@ ethdev_rx_node_init(const struct rte_graph *graph, struct rte_node *node)
>
> RTE_VERIFY(elem != NULL);
>
> - ctx->cls_next = ETHDEV_RX_NEXT_PKT_CLS;
> -
> /* Check and setup ptype */
> return ethdev_ptype_setup(ctx->port_id, ctx->queue_id);
> }
> @@ -215,7 +213,6 @@ static struct rte_node_register ethdev_rx_node_base = {
>
> .nb_edges = ETHDEV_RX_NEXT_MAX,
> .next_nodes = {
> - /* Default pkt classification node */
> [ETHDEV_RX_NEXT_PKT_CLS] = "pkt_cls",
> [ETHDEV_RX_NEXT_IP4_LOOKUP] = "ip4_lookup",
> },
> --
> 2.25.1
>
@@ -82,6 +82,7 @@ rte_node_eth_config(struct rte_node_ethdev_config *conf, uint16_t nb_confs,
memset(elem, 0, sizeof(ethdev_rx_node_elem_t));
elem->ctx.port_id = port_id;
elem->ctx.queue_id = j;
+ elem->ctx.cls_next = ETHDEV_RX_NEXT_PKT_CLS;
elem->nid = id;
elem->next = rx_node_data->head;
rx_node_data->head = elem;
@@ -194,8 +194,6 @@ ethdev_rx_node_init(const struct rte_graph *graph, struct rte_node *node)
RTE_VERIFY(elem != NULL);
- ctx->cls_next = ETHDEV_RX_NEXT_PKT_CLS;
-
/* Check and setup ptype */
return ethdev_ptype_setup(ctx->port_id, ctx->queue_id);
}
@@ -215,7 +213,6 @@ static struct rte_node_register ethdev_rx_node_base = {
.nb_edges = ETHDEV_RX_NEXT_MAX,
.next_nodes = {
- /* Default pkt classification node */
[ETHDEV_RX_NEXT_PKT_CLS] = "pkt_cls",
[ETHDEV_RX_NEXT_IP4_LOOKUP] = "ip4_lookup",
},