From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from alln-iport-1.cisco.com (alln-iport-1.cisco.com [173.37.142.88]) by dpdk.org (Postfix) with ESMTP id 77CA11B30D for ; Tue, 10 Oct 2017 19:31:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1454; q=dns/txt; s=iport; t=1507656678; x=1508866278; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=YdXT60ACM3XJncDda464NuGcDILaLsEdH8IH8ZtiSKM=; b=cDhelDEtdOWb0b0p5OUSY8Ba1cPoBqiag/TdMF5A1sz1rnHa67D3tN7R 7KMfoLFaVAKzi1dyjDAuVMCtsZQn25bkFtQIL39FCzMNQONeHPfCpT629 U6Ai32vOXZIqyPF2rytB6O43LRbCRaqt8Pi71VhSJl58xBUwcHEr1DjOR M=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CdAAB0A91Z/5RdJa1dGQEBAQEBAQEBA?= =?us-ascii?q?QEBBwEBAQEBg1uBUicHjhKPdIF2li+CEgqFOwKETj8YAQIBAQEBAQEBayiFHQE?= =?us-ascii?q?BAQEDOksEAgEIDgMEAQEfCQcyFAkIAgQBEgiKHKpVizEBAQEBAQEBAQEBAQEBA?= =?us-ascii?q?QEBAQEBAQEdgy2CAoFRgWqDKYRNhisFoTwClF6TGJU0AhEZAYE4AR84gQ54FYV?= =?us-ascii?q?jHIFndod/gTOBEAEBAQ?= X-IronPort-AV: E=Sophos;i="5.43,359,1503360000"; d="scan'208";a="15141948" Received: from rcdn-core-12.cisco.com ([173.37.93.148]) by alln-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2017 17:31:17 +0000 Received: from XCH-RCD-006.cisco.com (xch-rcd-006.cisco.com [173.37.102.16]) by rcdn-core-12.cisco.com (8.14.5/8.14.5) with ESMTP id v9AHVHVo000917 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 10 Oct 2017 17:31:17 GMT Received: from xch-rcd-007.cisco.com (173.37.102.17) by XCH-RCD-006.cisco.com (173.37.102.16) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 10 Oct 2017 12:31:16 -0500 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; Tue, 10 Oct 2017 12:31:16 -0500 From: "John Daley (johndale)" To: Aaron Conole , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC 2/4] enic: fix assignment Thread-Index: AQHTNvjVLHAMHPJGWkmgQ6GK9lJqk6LcgIjw Date: Tue, 10 Oct 2017 17:31:16 +0000 Message-ID: References: <20170926185329.2776-1-aconole@redhat.com> <20170926185329.2776-3-aconole@redhat.com> In-Reply-To: <20170926185329.2776-3-aconole@redhat.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.149] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC 2/4] enic: fix assignment 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: Tue, 10 Oct 2017 17:31:18 -0000 Aaron, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Aaron Conole > Sent: Tuesday, September 26, 2017 11:53 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [RFC 2/4] enic: fix assignment >=20 > As it stands, the existing assingment to mbuf has no effect outside of th= e > function. Prior to this change, the mbuf argument would contain an inval= id > address, but it would not be null. After this change, the caller gets a = null > mbuf back. >=20 > Signed-off-by: Aaron Conole > --- > drivers/net/enic/enic_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c > index 40dbec7..ff8e4c5 100644 > --- a/drivers/net/enic/enic_main.c > +++ b/drivers/net/enic/enic_main.c > @@ -224,7 +224,7 @@ enic_free_rq_buf(struct rte_mbuf **mbuf) > return; >=20 > rte_pktmbuf_free(*mbuf); > - mbuf =3D NULL; > + *mbuf =3D NULL; > } >=20 > void enic_init_vnic_resources(struct enic *enic) As it turns out, this function is only called when the device is stopped an= d restarting the device overwrites the mbuf pointers with newly allocated o= nes, so there is currently no bad behavior. The intent was to NULL out the = pointer though and it's certainly better form so I agree with the change. Reviewed-by: John Daley Thanks, Johnd > -- > 2.9.5