<html>
    <head>
      <base href="https://bugs.dpdk.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8" class="bz_new_table">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - net/af_xdp, numa_node and socket_id is assigned incorrectly for numa scenario"
   href="https://bugs.dpdk.org/show_bug.cgi?id=1611">1611</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>net/af_xdp, numa_node and socket_id is assigned incorrectly for numa scenario
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DPDK
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>22.11
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ethdev
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dev@dpdk.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>xiaohua.wang@ericsson.com
          </td>
        </tr>

        <tr>
          <th>Target Milestone</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div class="bz_comment_block">
          <pre class="bz_comment_text">1. in rte_pmd_af_xdp_probe() function, can't assign device.numa_node with
current socket id. Since the CPU core socket to start app can be different to
virtual xdp/device socket to attach. 
===========code in rte_eth_af_xdp.c===========================
        if (dev->device.numa_node == SOCKET_ID_ANY)
                dev->device.numa_node = rte_socket_id();
===========code in rte_eth_af_xdp.c===========================

Same issue for rte_pmd_af_xdp_remove() and eth_dev_close().

2. For xdp_umem_configure() in xsk_configure(), also can't allocate umem at CPU
core socket which get from during eth_rx_queue_setup() phase. Because it will
probably be different to socket which "umem" wants to attach port device
belongs to.
===========code in rte_eth_af_xdp.c===========================
        umem = rte_zmalloc_socket("umem", sizeof(*umem), 0, rte_socket_id());
        if (umem == NULL) {
                AF_XDP_LOG(ERR, "Failed to allocate umem info\n");
                return NULL;
        }

        snprintf(ring_name, sizeof(ring_name), "af_xdp_ring_%s_%u",
                       internals->if_name, rxq->xsk_queue_idx);
        umem->buf_ring = rte_ring_create(ring_name,
                                         ETH_AF_XDP_NUM_BUFFERS,
                                         rte_socket_id(),
                                         0x0);
===========code in rte_eth_af_xdp.c===========================
          </pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
      <div itemscope itemtype="http://schema.org/EmailMessage">
        <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
          
          <link itemprop="url" href="https://bugs.dpdk.org/show_bug.cgi?id=1611">
          <meta itemprop="name" content="View bug">
        </div>
        <meta itemprop="description" content="Bugzilla bug update notification">
      </div>
    </body>
</html>