From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 93AA37D22 for ; Fri, 25 Aug 2017 17:57:39 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Aug 2017 08:57:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,426,1498546800"; d="scan'208";a="143917808" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 25 Aug 2017 08:57:37 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 Aug 2017 08:57:37 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.198]) by FMSMSX151.amr.corp.intel.com ([169.254.7.239]) with mapi id 14.03.0319.002; Fri, 25 Aug 2017 08:57:37 -0700 From: "Wiles, Keith" To: "David Harton (dharton)" CC: "skhare@vmware.com" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] vmxnet3: replenish ring buffers in rx processing Thread-Index: AQHTHbX8ETBKbEdruki/s+2clQo2BaKVqwsAgAAC+QCAAAGjAA== Date: Fri, 25 Aug 2017 15:57:36 +0000 Message-ID: <42204197-36CC-42A9-9F52-144F9DB89E58@intel.com> References: <20170825152211.10911-1-dharton@cisco.com> <6EECE57F-E22D-4513-B232-B97548EE4676@intel.com> <70fc1a1c786b4643b55d2f24284b6d2b@XCH-RCD-016.cisco.com> In-Reply-To: <70fc1a1c786b4643b55d2f24284b6d2b@XCH-RCD-016.cisco.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.72.216] Content-Type: text/plain; charset="us-ascii" Content-ID: <08B8EC67666E6C47BE944DBFB4EE3CAD@intel.com> 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:57:40 -0000 > On Aug 25, 2017, at 10:51 AM, David Harton (dharton) = wrote: >=20 >=20 >=20 >> -----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: >>>=20 >>> 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. >>>=20 >>> Signed-off-by: David Harton >>> --- >>> drivers/net/vmxnet3/vmxnet3_rxtx.c | 17 +++++++++++++++++ >>> 1 file changed, 17 insertions(+) >>>=20 >>> 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 @@ >>> } >>> } >>>=20 >>> + 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. >=20 > 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 f= ew lines above these diffs. >=20 > Are you asking me to deviate from the established code convention? If that is the existing convention in the file, then no. >=20 > Thanks, > Dave >=20 >>=20 >> BTW, I think requirements of 80 and tab length of 8, is a bit outdated i= n >> 2017 :-( >>=20 >>> + rxq- >>> cmd_ring[ring_idx].next2fill); >>> + } >>> + } >>> + } >>> + >>> return nb_rx; >>> } >>>=20 >>> -- >>> 1.8.3.1 >>>=20 >>=20 >> Regards, >> Keith Regards, Keith