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 E15A8A0562; Tue, 31 Mar 2020 19:15:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 895231C11A; Tue, 31 Mar 2020 19:14:38 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 3FBCE1BFEF for ; Tue, 31 Mar 2020 19:14:31 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id b1so10611859pgm.8 for ; Tue, 31 Mar 2020 10:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3pH8NHNxHhe7XYMfAuUW7u0S8V75frEfJD7gt2jcCIg=; b=DBnrSb23MI/dQGsjFjRpOw9Uzkt0EvYitJLl24RNlRc4YQYfYHQvTLefkPya4y2TKB ps/iarCFSK62AM7pEmdY6A758bSh9CdrJOHQq07uIA7rMDTWVO+y1hjAcK8oe4atZQqw aFRGQu6CgGulbOEIdG39SccUJNkQm85SKan/m4ZQ+bmyr4kRIdq9L7HAQ0BoEmYH2Ymf tDGiqW2w6dWRc4DI+SqiNoLdBuAizk+tBhTnBOlWrkCZ3YXcD3wDhHWFRUehm0G1f+23 +AG2ZsFBwqeDf58d1KqLIiUcw6r+9jrzUY36fRmn1j3c59nkTT2XmAhZdz/V53L6Wo2i +0Rg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=3pH8NHNxHhe7XYMfAuUW7u0S8V75frEfJD7gt2jcCIg=; b=SohrQjvD7QjMzYftiN0qshwxFjN/CKKV9/NDghKLZgviDdiXJElhIQ3Up5U0OP4N0r mkizlfDHgiqMnyU2Ms9WENeX30TcohXEJRGVk/m5wUP7Cx020O89eohOzeLuqPql3sLE 1kbCb2vduTch5kmQjHBh9Ve+Kml7g936bW8m3wIKhQlLpOMCSEibvi1z01K48dVq2lc8 p4cA+MOrQvJjDn/bwivT/hVOOKpbL7fZ+9SUMBaOiaCOopelxPGKez9LtIYw5dahQvz/ X09BMig9SH17HgtDXU6d03oh42zLflVd0Mzjy/c/Jnx8/P8tmvRcPzjd++Nz1ELVO69T RRDg== X-Gm-Message-State: AGi0PuaKC9o9KLx9LOc2sVvAEjyAy4CtdQHp4u9UFbBaTjv/6JScsNO2 8SoDK6Ooj7eZd0kKvKVmdd3zvVmlOdD7sA== X-Google-Smtp-Source: APiQypKUFyzZgIes+EfG9cuCZuTUqkX4dWqPr3tcI75+xuphySnhLLW1qgqhGmOb1nPFzIsL2glWFg== X-Received: by 2002:a63:9550:: with SMTP id t16mr5220050pgn.300.1585674869864; Tue, 31 Mar 2020 10:14:29 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id i124sm12869764pfg.14.2020.03.31.10.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 10:14:28 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 31 Mar 2020 10:14:04 -0700 Message-Id: <20200331171404.23596-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200331171404.23596-1-stephen@networkplumber.org> References: <20200316235612.29854-1-stephen@networkplumber.org> <20200331171404.23596-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 8/8] net/netvsc: avoid possible live lock 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" Since the ring buffer with host is shared for both transmit completions and receive packets, it is possible that transmitter could get starved if receive ring gets full. Better to process all outstanding events which frees up transmit buffer slots, even if means dropping some packets. Fixes: 7e6c82430702 ("net/netvsc: avoid over filling Rx descriptor ring") Signed-off-by: Stephen Hemminger --- drivers/net/netvsc/hn_rxtx.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index cbdfcc628b75..19f00a05285f 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -1032,9 +1032,6 @@ uint32_t hn_process_events(struct hn_data *hv, uint16_t queue_id, if (tx_limit && tx_done >= tx_limit) break; - - if (rxq->rx_ring && rte_ring_full(rxq->rx_ring)) - break; } if (bytes_read > 0) -- 2.20.1