@@ -334,6 +334,12 @@ clone_pkts(struct netdev_odp *dev, struct dpif_packet **pkts,
}
static int
+netdev_odp_get_numa_id(const struct netdev *netdev_ OVS_UNUSED)
+{
+ return 0;
+}
+
+static int
netdev_odp_send(struct netdev *netdev, int qid OVS_UNUSED,
struct dpif_packet **pkts, int cnt, bool may_steal)
{
@@ -575,9 +581,9 @@ netdev_odp_rxq_recv(struct netdev_rxq *rxq_, struct dpif_packet **packets,
struct netdev_odp *netdev = netdev_odp_cast(rx->up.netdev);
int pkts, pkts_ok, ret = 0;
size_t rx_bytes = 0;
- unsigned long err_cnt = 0;
- int i;
- odp_packet_t pkt_tbl[NETDEV_MAX_RX_BATCH];
+ unsigned long err_cnt = 0;
+ int i;
+ odp_packet_t pkt_tbl[NETDEV_MAX_RX_BATCH];
pkts = odp_pktio_recv(netdev->pktio, pkt_tbl, NETDEV_MAX_RX_BATCH);
if (pkts < 0) {
@@ -642,7 +648,7 @@ static struct netdev_class netdev_odp_class = {
NULL, /* build_header */
NULL, /* push_header */
NULL, /* pop_header */
- NULL, /* get_numa_id */
+ netdev_odp_get_numa_id, /* get_numa_id */
NULL, /* set_multiq */
netdev_odp_send, /* send */
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> --- This change was introduced for DPDK, but it applies to the more general case and so ODP netdev got affected. The easiest solution, the same way DPDK netdev does, is to default to numa node 0. lib/netdev-odp.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)