From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B29BA3295 for ; Wed, 23 Oct 2019 16:27:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 805561C1C1; Wed, 23 Oct 2019 16:27:43 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 499401C1A1 for ; Wed, 23 Oct 2019 16:27:42 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id q70so14315161wme.1 for ; Wed, 23 Oct 2019 07:27:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=xEF0J2TfqHwpgPZUkyRcYYB/QcugZFjVzNp9zyMh/CM=; b=F3Y73vL38u3Q6k2SrjwL4oQfIjGMIF6zaA6PBWm036/NgfvUp+2jb3qIVnR2pjDrEf r0gXZANW+Ih/RrZfvH+KR7oAlCKCxwjZhiEhsGEVyqbX3krK2mr9fuKuJZ+ycwDpckCJ BLR6DI6X7qIccgZh7bOb2RrDjFw53Q1EJrunw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xEF0J2TfqHwpgPZUkyRcYYB/QcugZFjVzNp9zyMh/CM=; b=OXN4kZhdh2pXdFBnwzwLBry2WDPPNfRCxgmPQC3suGLC/N8I/h/pqyaK97AW+JaWNZ 0OS+16N/UovyEI/fXTtn1OrQVmJVEyWSdnpywz1EoW3eWXAIsxmZGLIJ+2XfNuUkQIxt HueUKR3Pl2Q/68T5pECy6VnwBsI33Nxlk/5XglNm+agLK1Az+Q3SanaFNpfZgft90qNs g8JKGXSBl2qCdVWYusjXT07/qL7QwPfcoKY7GigSgOgWsgUi3peDx/vAyX58/w5gtJLR LyKC8mNLJxzsF1krO0GjL0Vch003DYRpw56OGtCWYDuhj6cTSEvA+Zt1ihrFOHqVLxnv oDtg== X-Gm-Message-State: APjAAAXiKfChrHKyrsqwBGBOF2o9jLVZE+6NQs8vZ9Gkh8gCVPFjuuxd 1CpxljhEKAofSWsKjMFDBrjDK9qsAHeGu+AE2PygRVrQfnW1kuHhEV8KR+zDZ6P7mpjQYoNptzW OKEBy1qczPMkj8sGn9SCts/QDekIXxDNhSn7yB3oz8yXqF+GIeXkyhZGPXxQLjmzy X-Google-Smtp-Source: APXvYqxyqbScofFnu9rmdILcQX+8RPPj/P+4Lao4PeBPEjjqA2msvYpBUvQwX/I4lADmNpwi9bJqFQ== X-Received: by 2002:a1c:f60d:: with SMTP id w13mr192642wmc.150.1571840861629; Wed, 23 Oct 2019 07:27:41 -0700 (PDT) Received: from lrichardson-VirtualBox.dhcp.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id r2sm23765595wma.1.2019.10.23.07.27.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2019 07:27:41 -0700 (PDT) From: Lance Richardson To: dev@dpdk.org Cc: ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, Lance Richardson Date: Wed, 23 Oct 2019 10:27:35 -0400 Message-Id: <20191023142735.17571-1-lance.richardson@broadcom.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/bnxt: fix mbuf free when clearing Tx queue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When freeing pending transmit mbufs, use rte_pktmbuf_free_seg() instead of rte_pktmbuf_free(), otherwise linked mbufs may be freed more than once. Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code") Reviewed-by: Ajit Khaparde Signed-off-by: Lance Richardson --- drivers/net/bnxt/bnxt_txq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c index ebb9199d2..6b866d445 100644 --- a/drivers/net/bnxt/bnxt_txq.c +++ b/drivers/net/bnxt/bnxt_txq.c @@ -34,7 +34,7 @@ static void bnxt_tx_queue_release_mbufs(struct bnxt_tx_queue *txq) if (sw_ring) { for (i = 0; i < txq->tx_ring->tx_ring_struct->ring_size; i++) { if (sw_ring[i].mbuf) { - rte_pktmbuf_free(sw_ring[i].mbuf); + rte_pktmbuf_free_seg(sw_ring[i].mbuf); sw_ring[i].mbuf = NULL; } } -- 2.17.1