DPDK patches and discussions
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [dpdk-dev] [Bug 643] af_xdp驱动造成rte_rx_queue_setup的coredump问题
Date: Fri, 26 Feb 2021 06:32:03 +0000	[thread overview]
Message-ID: <bug-643-3@http.bugs.dpdk.org/> (raw)

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.

                 reply	other threads:[~2021-02-26  6:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-643-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).