return -EINVAL;
}
} else {
- const struct rte_eth_rxseg_split *rx_seg =
- (const struct rte_eth_rxseg_split *)rx_conf->rx_seg;
- uint16_t n_seg = rx_conf->rx_nseg;
+ const struct rte_eth_rxseg_split *rx_seg;
+ uint16_t n_seg;
/* Extended multi-segment configuration check. */
if (rx_conf == NULL || rx_conf->rx_seg == NULL || rx_conf->rx_nseg == 0) {
"Memory pool is null and no extended configuration provided\n");
return -EINVAL;
}
+
+ rx_seg = (const struct rte_eth_rxseg_split *)rx_conf->rx_seg;
+ n_seg = rx_conf->rx_nseg;
+
if (rx_conf->offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT) {
ret = rte_eth_rx_queue_check_split(rx_seg, n_seg,
&mbp_buf_size,