[PATCH v2 5/5] net/cnxk: add mempool check for frag attach
Jerin Jacob
jerinjacobk at gmail.com
Mon May 22 15:14:58 CEST 2023
On Thu, May 18, 2023 at 9:19 PM Rahul Bhansali <rbhansali at marvell.com> wrote:
>
> Add mempool cookies get mark to all frags in case of
> reassembly failure.
>
> Signed-off-by: Rahul Bhansali <rbhansali at marvell.com>
Series applied to dpdk-next-net-mrvl/for-next-net. Thanks
> ---
> Changes in v2: No change
>
> 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
>
More information about the dev
mailing list