Add mempool cookies get mark to all frags in case of reassembly failure. Signed-off-by: Rahul Bhansali <rbhans...@marvell.com> --- drivers/net/cnxk/cn10k_rx.h | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h index 9fdb5565e9..cbaf994aa2 100644 --- a/drivers/net/cnxk/cn10k_rx.h +++ b/drivers/net/cnxk/cn10k_rx.h @@ -211,6 +211,9 @@ nix_sec_attach_frags(const struct cpt_parse_hdr_s *hdr, /* Update dynamic field with userdata */ *rte_security_dynfield(mbuf) = (uint64_t)inb_priv->userdata; + /* Mark frag as get */ + RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 1); + cnxk_ip_reassembly_dynfield(mbuf, off)->nb_frags = hdr->w0.num_frags - 2; cnxk_ip_reassembly_dynfield(mbuf, off)->next_frag = NULL; @@ -239,6 +242,9 @@ nix_sec_attach_frags(const struct cpt_parse_hdr_s *hdr, /* Update dynamic field with userdata */ *rte_security_dynfield(mbuf) = (uint64_t)inb_priv->userdata; + /* Mark frag as get */ + RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 1); + cnxk_ip_reassembly_dynfield(mbuf, off)->nb_frags = hdr->w0.num_frags - 3; cnxk_ip_reassembly_dynfield(mbuf, off)->next_frag = NULL; @@ -263,6 +269,9 @@ nix_sec_attach_frags(const struct cpt_parse_hdr_s *hdr, mbuf->ol_flags = ol_flags; mbuf->next = NULL; + /* Mark frag as get */ + RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 1); + /* Update dynamic field with userdata */ *rte_security_dynfield(mbuf) = (uint64_t)inb_priv->userdata; -- 2.25.1