On Thu, Feb 12, 2026 at 03:50:26PM +0100, Burakov, Anatoly wrote:
> On 2/12/2026 1:53 PM, Anatoly Burakov wrote:
> > The original IPsec "add SA from flow" function expected a void* pointer to
> > security session as its first argument. However, the actual code was not
> > passing that, instead it passed `rte_flow_action_security` which was a
> > *container* for security session pointer.
> >
> > Fix it by passing correct pointer type, as well as make typing more
> > explicit to let compiler catch such bugs in the future.
> >
> > Fixes: 9a0752f498d2 ("net/ixgbe: enable inline IPsec")
> > Cc: [email protected]
> > Cc: [email protected]
> >
> > Signed-off-by: Anatoly Burakov <[email protected]>
> > ---
>
> <snip>
>
> > + const struct ip_spec *spec)
> > {
> > - /**
> > - * FIXME Updating the session priv data when the session is const.
> > - * Typecasting done here is wrong and the implementation need to be
> > corrected.
> > - */
> > - struct ixgbe_crypto_session *ic_session = (void *)(uintptr_t)
> > - ((const struct rte_security_session
> > *)sess)->driver_priv_data;
> > + struct ixgbe_crypto_session *ic_session =
> > + RTE_CAST_PTR(struct ixgbe_crypto_session *,
> > sess->driver_priv_data);
>
> Despite being removed, the comment is still true. This is an artifact of how
> we get the crypto session (it comes from security rte_flow action, which is
> const).
>
Why not keep the comment then?
- Re: [PATCH v5 02/12] net/ixgbe: fix memory leak ... Bruce Richardson
- Re: [PATCH v5 02/12] net/ixgbe: fix memory leak in s... Radu Nicolau
- [PATCH v5 04/12] net/ixgbe: fix potential null dereferenc... Anatoly Burakov
- Re: [PATCH v5 04/12] net/ixgbe: fix potential null d... Bruce Richardson
- Re: [PATCH v5 04/12] net/ixgbe: fix potential null d... Radu Nicolau
- [PATCH v5 03/12] net/ixgbe: fix potential null dereferenc... Anatoly Burakov
- Re: [PATCH v5 03/12] net/ixgbe: fix potential null d... Bruce Richardson
- Re: [PATCH v5 03/12] net/ixgbe: fix potential null d... Radu Nicolau
- [PATCH v5 05/12] net/ixgbe: fix wrong pointer handling in... Anatoly Burakov
- Re: [PATCH v5 05/12] net/ixgbe: fix wrong pointer ha... Burakov, Anatoly
- Re: [PATCH v5 05/12] net/ixgbe: fix wrong pointe... Bruce Richardson
- Re: [PATCH v5 05/12] net/ixgbe: fix wrong po... Radu Nicolau
- Re: [PATCH v5 05/12] net/ixgbe: fix wrong pointer ha... Radu Nicolau
- [PATCH v5 06/12] net/i40e: move FDIR config to flow creat... Anatoly Burakov
- [PATCH v5 07/12] net/i40e: fix IPv6 GTPU handling Anatoly Burakov
- [PATCH v5 09/12] net/iavf: fix memory leak on uninit Anatoly Burakov
- [PATCH v5 08/12] net/iavf: fix memory leak on egress IPse... Anatoly Burakov
- [PATCH v5 10/12] net/iavf: fix IPv4 flow subscription Anatoly Burakov
- [PATCH v5 11/12] net/ice: fix memory leak in DCF QoS band... Anatoly Burakov
- [PATCH v5 12/12] net/ice: fix memory leak in FDIR flow pa... Anatoly Burakov

