From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) by dpdk.org (Postfix) with ESMTP id 299FD2C18 for ; Mon, 5 Mar 2018 20:45:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2461; q=dns/txt; s=iport; t=1520279110; x=1521488710; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PvkfA4ACkOFr2eA3ILmAQFDEtVb/MhbWTWqdg1AVD1Q=; b=OVPdPTiCXg8Tmcp4JF0Hw6mgru/NnR+KEGhW2ZPr9QydOXfVe7CHkiPP 5OmiKHjFXQSP6w95bSPeouQztiREJRiN5HYHwS4YnExGloUMvr5KGy/3X JCFHZN8C48U3nWXH77s1inJoduJliYcIcpR9OmMNwOgEzv0RYSrBHmper o=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0D7AAAdnZ1a/40NJK1dGQEBAQEBAQE?= =?us-ascii?q?BAQEBAQcBAQEBAYNQgVYoCo1ujXmCAoEWlDSCFQqFMAKCcyE0GAECAQEBAQE?= =?us-ascii?q?BAmsnhSMBAQEEJxM/DAQCAQgRBAEBHwkHMhQJCAIEAQ0FCIUTqwc6iGOCK4U?= =?us-ascii?q?tgi6BV4UTiw4EiBqFX4E7iy4JApBzjwKRKAIRGQGBLQEeOIFScBWCfYIuAxy?= =?us-ascii?q?Be3cBi1aBGAEBAQ?= X-IronPort-AV: E=Sophos;i="5.47,428,1515456000"; d="scan'208";a="366827714" Received: from alln-core-8.cisco.com ([173.36.13.141]) by rcdn-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2018 19:45:08 +0000 Received: from XCH-ALN-002.cisco.com (xch-aln-002.cisco.com [173.36.7.12]) by alln-core-8.cisco.com (8.14.5/8.14.5) with ESMTP id w25Jj8k5021639 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 5 Mar 2018 19:45:08 GMT Received: from xch-rcd-007.cisco.com (173.37.102.17) by XCH-ALN-002.cisco.com (173.36.7.12) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 5 Mar 2018 13:45:07 -0600 Received: from xch-rcd-007.cisco.com ([173.37.102.17]) by XCH-RCD-007.cisco.com ([173.37.102.17]) with mapi id 15.00.1320.000; Mon, 5 Mar 2018 13:45:07 -0600 From: "John Daley (johndale)" To: Anatoly Burakov , "dev@dpdk.org" CC: "Hyong Youb Kim (hyonkim)" Thread-Topic: [PATCH 37/41] net/enic: use contiguous allocation for DMA memory Thread-Index: AQHTsvYRGEUttG96yEC6C9Xuv+PCPaPCDX4Q Date: Mon, 5 Mar 2018 19:45:07 +0000 Message-ID: <4e37f47997324f8b92bfefc10f4e05fc@XCH-RCD-007.cisco.com> References: <02c5ec20a2faa96f18dc58f869a330475c0bb018.1520083504.git.anatoly.burakov@intel.com> In-Reply-To: <02c5ec20a2faa96f18dc58f869a330475c0bb018.1520083504.git.anatoly.burakov@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.19.145.150] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 37/41] net/enic: use contiguous allocation for DMA memory 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: Mon, 05 Mar 2018 19:45:10 -0000 Hi Anatoly, Looks good, see inline for details. Acked-by: John Daley Thanks, John > -----Original Message----- > From: Anatoly Burakov [mailto:anatoly.burakov@intel.com] > Sent: Saturday, March 03, 2018 5:46 AM > To: dev@dpdk.org > Cc: John Daley (johndale) ; Hyong Youb Kim (hyonkim) > ; keith.wiles@intel.com; jianfeng.tan@intel.com; > andras.kovacs@ericsson.com; laszlo.vadkeri@ericsson.com; > benjamin.walker@intel.com; bruce.richardson@intel.com; > thomas@monjalon.net; konstantin.ananyev@intel.com; > kuralamudhan.ramakrishnan@intel.com; louise.m.daly@intel.com; > nelio.laranjeiro@6wind.com; yskoh@mellanox.com; pepperjo@japf.ch; > jerin.jacob@caviumnetworks.com; hemant.agrawal@nxp.com; > olivier.matz@6wind.com > Subject: [PATCH 37/41] net/enic: use contiguous allocation for DMA memory >=20 > Signed-off-by: Anatoly Burakov > --- >=20 > Notes: > It is not 100% clear that second call to memzone_reserve > is allocating DMA memory. Corrections welcome. The 2nd call is allocating DMA memory so I believe your patch is correct. >=20 > drivers/net/enic/enic_main.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c = index > ec9d343..cb2a7ba 100644 > --- a/drivers/net/enic/enic_main.c > +++ b/drivers/net/enic/enic_main.c > @@ -319,7 +319,7 @@ enic_alloc_consistent(void *priv, size_t size, > struct enic *enic =3D (struct enic *)priv; > struct enic_memzone_entry *mze; >=20 > - rz =3D rte_memzone_reserve_aligned((const char *)name, > + rz =3D rte_memzone_reserve_aligned_contig((const char *)name, > size, SOCKET_ID_ANY, 0, > ENIC_ALIGN); > if (!rz) { > pr_err("%s : Failed to allocate memory requested for %s\n", > @@ -787,7 +787,7 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_i= dx, > "vnic_cqmsg-%s-%d-%d", enic->bdf_name, queue_idx, > instance++); >=20 > - wq->cqmsg_rz =3D rte_memzone_reserve_aligned((const char *)name, > + wq->cqmsg_rz =3D rte_memzone_reserve_aligned_contig((const char > *)name, > sizeof(uint32_t), > SOCKET_ID_ANY, 0, > ENIC_ALIGN); This is a send completion landing spot which is DMA'd to by the NIC so it d= oes have to be contiguous. However the size is only 4 bytes so it might not= matter. > -- > 2.7.4