DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Bug 643] af_xdp驱动造成rte_rx_queue_setup的coredump问题
@ 2021-02-26  6:32 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2021-02-26  6:32 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=643

            Bug ID: 643
           Summary: af_xdp驱动造成rte_rx_queue_setup的coredump问题
           Product: DPDK
           Version: 20.05
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: other
          Assignee: dev@dpdk.org
          Reporter: huangying-c@360.cn
  Target Milestone: ---

driver/net/af_xdp/rte_eth_af_xdp.c
xsk_configure中调用了rte_pktmbuf_alloc_bulk,当rte_pktmbuf_alloc_bulk调用失败后xsk_configure仍然返回0,造成调用rte_eth_rx_queue_setup时不会返回失败,但是在xsk_configure中已经调用了xdp_umem_destroy回收了内存,当再次调用rte_eth_rx_queue_setup时造成coredump,代码如下:
static int
xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
          int ring_size)
{
    struct xsk_socket_config cfg;
    struct pkt_tx_queue *txq = rxq->pair;
    int ret = 0;
    ...........
#if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
    if (rte_pktmbuf_alloc_bulk(rxq->umem->mb_pool, fq_bufs, reserve_size)) {
        AF_XDP_LOG(DEBUG, "Failed to get enough buffers for fq.\n");
        goto err;
    }
#endif
err:
    xdp_umem_destroy(rxq->umem);

    return ret;
}
这让使用这在使用rte_eth_rx_queue_setup时无法根据返回的错误进行相应的异常处理

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-26  6:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26  6:32 [dpdk-dev] [Bug 643] af_xdp驱动造成rte_rx_queue_setup的coredump问题 bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).