From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EX13-EDG-OU-002.vmware.com (ex13-edg-ou-002.vmware.com [208.91.0.190]) by dpdk.org (Postfix) with ESMTP id 9FA036841 for ; Sun, 10 Sep 2017 18:47:55 +0200 (CEST) Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Sun, 10 Sep 2017 09:47:50 -0700 Received: from shri-linux.eng.vmware.com (shri-linux.eng.vmware.com [10.33.72.16]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id BAA28403B3; Sun, 10 Sep 2017 09:47:54 -0700 (PDT) Date: Sun, 10 Sep 2017 09:47:54 -0700 From: Shrikrishna Khare To: David Harton CC: , In-Reply-To: <20170825152211.10911-1-dharton@cisco.com> Message-ID: References: <20170825152211.10911-1-dharton@cisco.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Received-SPF: None (EX13-EDG-OU-002.vmware.com: skhare@shri-linux.eng.vmware.com does not designate permitted sender hosts) Subject: Re: [dpdk-dev] [PATCH] vmxnet3: replenish ring buffers in rx processing 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: , X-List-Received-Date: Sun, 10 Sep 2017 16:47:56 -0000 On Fri, 25 Aug 2017, David Harton wrote: > vmxnet3 rx processing should replenish ring buffers after new buffers > are available to prevent the interface from getting stuck in a state > that no new work is processed. > > Signed-off-by: David Harton Thanks for the fix. Acked-by: Shrikrishna Khare > --- > drivers/net/vmxnet3/vmxnet3_rxtx.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c > index d9cf437..9861d35 100644 > --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c > +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c > @@ -880,6 +880,23 @@ > } > } > > + if (unlikely(nb_rxd == 0)) { > + uint32_t avail; > + for (ring_idx = 0; ring_idx < VMXNET3_RX_CMDRING_SIZE; ring_idx++) { > + avail = vmxnet3_cmd_ring_desc_avail(&rxq->cmd_ring[ring_idx]); > + if (unlikely(avail > 0)) { > + /* try to alloc new buf and renew descriptors */ > + vmxnet3_post_rx_bufs(rxq, ring_idx); > + } > + } > + if (unlikely(rxq->shared->ctrl.updateRxProd)) { > + for (ring_idx = 0; ring_idx < VMXNET3_RX_CMDRING_SIZE; ring_idx++) { > + VMXNET3_WRITE_BAR0_REG(hw, rxprod_reg[ring_idx] + (rxq->queue_id * VMXNET3_REG_ALIGN), > + rxq->cmd_ring[ring_idx].next2fill); > + } > + } > + } > + > return nb_rx; > } > > -- > 1.8.3.1 > >