[dpdk-dev] [PATCH v2 04/15] node: switch IPv4 metadata to dynamic mbuf field
Olivier Matz
olivier.matz at 6wind.com
Tue Oct 27 10:32:51 CET 2020
Hi Thomas,
On Mon, Oct 26, 2020 at 11:20:02PM +0100, Thomas Monjalon wrote:
> The node_mbuf_priv1 was stored in the deprecated mbuf field udata64.
> It is moved to a dynamic field in order to allow removal of udata64.
>
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> ---
> lib/librte_node/ip4_lookup.c | 7 +++++++
> lib/librte_node/ip4_rewrite.c | 10 ++++++++++
> lib/librte_node/node_private.h | 12 ++++++++++--
> 3 files changed, 27 insertions(+), 2 deletions(-)
<...>
> --- a/lib/librte_node/node_private.h
> +++ b/lib/librte_node/node_private.h
> @@ -8,6 +8,7 @@
> #include <rte_common.h>
> #include <rte_log.h>
> #include <rte_mbuf.h>
> +#include <rte_mbuf_dyn.h>
>
> extern int rte_node_logtype;
> #define NODE_LOG(level, node_name, ...) \
> @@ -21,7 +22,6 @@ extern int rte_node_logtype;
> #define node_dbg(node_name, ...) NODE_LOG(DEBUG, node_name, __VA_ARGS__)
>
> /**
> - *
> * Node mbuf private data to store next hop, ttl and checksum.
> */
> struct node_mbuf_priv1 {
> @@ -37,6 +37,13 @@ struct node_mbuf_priv1 {
> };
> };
>
> +static const struct rte_mbuf_dynfield node_mbuf_priv1_dynfield_desc = {
> + .name = "rte_node_dynfield_priv1",
> + .size = sizeof(struct node_mbuf_priv1 *),
> + .align = __alignof__(struct node_mbuf_priv1 *),
> +};
> +extern int node_mbuf_priv1_dynfield_offset;
> +
It should be "struct node_mbuf_priv1", not "struct node_mbuf_priv1 *"
More information about the dev
mailing list