From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from alln-iport-6.cisco.com (alln-iport-6.cisco.com [173.37.142.93]) by dpdk.org (Postfix) with ESMTP id 61DE67D1C for ; Fri, 25 Aug 2017 17:51:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2295; q=dns/txt; s=iport; t=1503676304; x=1504885904; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=3avgfJg8bNzq0UNDud1vVjRhvFoxB06hljZeD1ezHzU=; b=Z7QxxMU2sSqyKKRZRP88cDHhx8CRY01bypVy0daGCdGiYcT4aSNIVTGC PUHYu+LhQ+ABc3QtrMFQNtAGdrL64M3oIr8y54Ml+Kws7RNmLW2EkJflQ n75UuRtoe6jAWIOi61J7ImIKXhcKzsH90dgdaKJ/HTZIlTmbS2VcvH3A1 k=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CdAACnRqBZ/4wNJK1cGQEBAQEBAQEBA?= =?us-ascii?q?QEBBwEBAQEBg1qBeQeODZAXgXGWJYIShUcCg2M/GAECAQEBAQEBAWsohRgBAQE?= =?us-ascii?q?BAgEnEz8MBAIBCBEEAQEBHgkHMhQJCAIEDgUIiiEIr3w6i2ABAQEBAQEBAQEBA?= =?us-ascii?q?QEBAQEBAQEBAQEdgyqCAoFOhQuKaQWgYQKUO5JvljYBHziBDXcVhWEcgWd2iSm?= =?us-ascii?q?BDwEBAQ?= X-IronPort-AV: E=Sophos;i="5.41,426,1498521600"; d="scan'208";a="476885955" Received: from alln-core-7.cisco.com ([173.36.13.140]) by alln-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Aug 2017 15:51:43 +0000 Received: from XCH-ALN-016.cisco.com (xch-aln-016.cisco.com [173.36.7.26]) by alln-core-7.cisco.com (8.14.5/8.14.5) with ESMTP id v7PFphQv014588 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 25 Aug 2017 15:51:43 GMT Received: from xch-rcd-016.cisco.com (173.37.102.26) by XCH-ALN-016.cisco.com (173.36.7.26) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 25 Aug 2017 10:51:42 -0500 Received: from xch-rcd-016.cisco.com ([173.37.102.26]) by XCH-RCD-016.cisco.com ([173.37.102.26]) with mapi id 15.00.1210.000; Fri, 25 Aug 2017 10:51:42 -0500 From: "David Harton (dharton)" To: "Wiles, Keith" CC: "skhare@vmware.com" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] vmxnet3: replenish ring buffers in rx processing Thread-Index: AQHTHbXtoc8OeHO73k+pNB4LjGFkOqKViYYA//+tvKA= Date: Fri, 25 Aug 2017 15:51:42 +0000 Message-ID: <70fc1a1c786b4643b55d2f24284b6d2b@XCH-RCD-016.cisco.com> References: <20170825152211.10911-1-dharton@cisco.com> <6EECE57F-E22D-4513-B232-B97548EE4676@intel.com> In-Reply-To: <6EECE57F-E22D-4513-B232-B97548EE4676@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.82.234.189] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Fri, 25 Aug 2017 15:51:44 -0000 > -----Original Message----- > From: Wiles, Keith [mailto:keith.wiles@intel.com] > Sent: Friday, August 25, 2017 11:41 AM > To: David Harton (dharton) > Cc: skhare@vmware.com; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] vmxnet3: replenish ring buffers in rx > processing >=20 >=20 > > On Aug 25, 2017, at 10:22 AM, 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 > > --- > > 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 =3D=3D 0)) { > > + uint32_t avail; > > + for (ring_idx =3D 0; ring_idx < VMXNET3_RX_CMDRING_SIZE; > ring_idx++) { > > + avail =3D 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 =3D 0; ring_idx < VMXNET3_RX_CMDRING_SIZE; > ring_idx++) { > > + VMXNET3_WRITE_BAR0_REG(hw, rxprod_reg[ring_idx] + > (rxq->queue_id > > +* VMXNET3_REG_ALIGN), >=20 > Did you run checkpatch here as it seems the line length is greater then > 80. I did. I'm following the conventions already established in the file. Several lines above the file are > 80 characters. In fact, some just a few= lines above these diffs. Are you asking me to deviate from the established code convention? Thanks, Dave >=20 > BTW, I think requirements of 80 and tab length of 8, is a bit outdated in > 2017 :-( >=20 > > + rxq- > >cmd_ring[ring_idx].next2fill); > > + } > > + } > > + } > > + > > return nb_rx; > > } > > > > -- > > 1.8.3.1 > > >=20 > Regards, > Keith