[PATCH v5 04/17] net/nbl: add Channel layer definitions and implementation
Stephen Hemminger
stephen at networkplumber.org
Wed Aug 20 00:05:21 CEST 2025
On Tue, 19 Aug 2025 03:22:24 -0700
Dimon Zhao <dimon.zhao at nebula-matrix.com> wrote:
> +static int nbl_chan_setup_ops(struct nbl_channel_ops_tbl **chan_ops_tbl,
> + struct nbl_channel_mgt_leonis *chan_mgt_leonis)
> +{
> + *chan_ops_tbl = rte_zmalloc("nbl_chan_ops_tbl", sizeof(struct nbl_channel_ops_tbl), 0);
> + if (!*chan_ops_tbl)
> + return -ENOMEM;
> +
> + NBL_CHAN_OPS_TBL_TO_OPS(*chan_ops_tbl) = &chan_ops;
> + NBL_CHAN_OPS_TBL_TO_PRIV(*chan_ops_tbl) = chan_mgt_leonis;
> +
> + chan_mgt_leonis->chan_mgt.msg_handler[NBL_CHAN_MSG_ACK].func = nbl_chan_recv_ack_msg;
> + chan_mgt_leonis->chan_mgt.msg_handler[NBL_CHAN_MSG_ACK].priv = chan_mgt_leonis;
> +
> + return 0;
> +}
I don't see the point of the ops table here?
You are allocating it in shared huge page memory; but it contains pointer to ops
table values that are function pointers. And due to ASLR function pointers are not
valid when using primary/secondary process.
More information about the dev
mailing list