From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 251D545E94; Fri, 13 Dec 2024 22:06:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 390F740E32; Fri, 13 Dec 2024 22:06:02 +0100 (CET) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id 6B4BC40E25 for ; Fri, 13 Dec 2024 22:06:01 +0100 (CET) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-725dbdf380aso1893286b3a.3 for ; Fri, 13 Dec 2024 13:06:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734123960; x=1734728760; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=IIcbtN0YNUL/O+dlYagtNRryVhB0OP4iqFAlcaEODG0=; b=foo3k5GYqqy3MpfBZNKqtJuaKkG0QJ24okv9XBfLop51H2pH3jHHegHO4Xu92dUNUa YGGQbcQ52DIkW53uHXltG1m6TSlN+xQP5RRIFC+lGWBV6+MFIk9yfh91ADcS2Bv1YimG fmKM1J9T16p07rdnsbZ+Vv2P17ufKt+Nw5ZKgRq8luvo7p1WZzB1CAnhm0azMRMpOyok 4VCjU1B0mkHSOY8laLpEdH2q0vGR+5yBBuPmBdAY3rrQ/BWWy2/n2LJJXK3ToWfxEFXB Osw/2B6yHI0UsNOPRKC0XBQw5VdOjXJGYj+tXeyei8na1MTwQGsENYxa3vAWxusZjh1J mSvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734123960; x=1734728760; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IIcbtN0YNUL/O+dlYagtNRryVhB0OP4iqFAlcaEODG0=; b=V/WpTwKozSE5zpYj/1Wf/JulKozVCMsUZi02/DVzgmkNEHBFn+47nCYNmI8HYL5kDt i7r1kYIgcHvkUr12a+bsFn6LXhCYz3HX4mqEneWV/lrM/vZp6zYmgYQAAt/YM/frGAz7 P373cNPR9HNvO86p0YwCZ4wS+thFd3cYPo/wlLjzmvpEBDt0ojTHd9EwLQnuVT56OOHn tcSu3WDiXwrfEW1mYkzqRaVOJwZCEy+HAECE9tZSvIzbLM86yRNnoytkct4Y8ylcIxHc jmGdFHwO+ZnghmJEdbxq0k8vdzve9LZmF8arshs+3WFf2KElWXaPNZ0AUlq2TFcMugEp hwsw== X-Forwarded-Encrypted: i=1; AJvYcCU07KJJblMlOk1KkJTFFZ/SLa2byGfkhiTp4v22cN7D2sx/9IkbDNp+FiDyDcEZvV2twvo=@dpdk.org X-Gm-Message-State: AOJu0YzUtFjtj7RpFp2lv9031gl52fz/7ei+D9FYIElQKuJYaIkYOdko iJi9KwQshsgbknvOV0OCcf1wFbrMa1ka5pyNWx+r/kc/I54Q81Rhq35nB91N3l31BuDgMhlIlfy 4 X-Gm-Gg: ASbGncseBZU5XF7V1Egb5DPHT8LtTsg6HY/tE7DvUmtWbUzGmT+C2sEIqzDDyQqgF8r v+iOJPWXjFicd5US4c626BSYzXv7F8iEX+Tw3Ha9cbTAeNGJXEbPt4h0AWlUkOa+u83/cDQ+r83 GJ1rlbcp8oM59GsoK6BS+BOAScbjaQtC/H3/wpG9Y96HoC3PKVvLqX4FHLNdRgl/BzerUvDXgWX ropFhDIQZFgHe28DE2tYITD6sW/hhBIehwxmPCtdzZwN1HqRrucIed1XN2acCiVlqNpbDJGCPAd PIJnkL0HiJo77LGl9hz75FVlQdDwTCwe+A== X-Google-Smtp-Source: AGHT+IFI3VyKmROCO+kNeJIp7BS8+WfSSmFcTk+h3CymG0PP1d+ZXhoy2KY5PkDdhDJ22g/lRkg8dQ== X-Received: by 2002:a05:6a00:3d56:b0:71e:21:d2d8 with SMTP id d2e1a72fcca58-7290c1271a5mr5602965b3a.7.1734123960605; Fri, 13 Dec 2024 13:06:00 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918bc020csm210583b3a.178.2024.12.13.13.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 13:06:00 -0800 (PST) Date: Fri, 13 Dec 2024 11:38:52 -0800 From: Stephen Hemminger To: Junlong Wang Cc: ferruh.yigit@amd.com, dev@dpdk.org Subject: Re: [PATCH v2 02/15] net/zxdh: zxdh np uninit implementation Message-ID: <20241213113852.2246c6d2@hermes.local> In-Reply-To: <20241210055333.782901-3-wang.junlong1@zte.com.cn> References: <20241206055715.506961-2-wang.junlong1@zte.com.cn> <20241210055333.782901-1-wang.junlong1@zte.com.cn> <20241210055333.782901-3-wang.junlong1@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, 10 Dec 2024 13:53:20 +0800 Junlong Wang wrote: > (np)network processor release resources in host. > > Signed-off-by: Junlong Wang > --- > drivers/net/zxdh/zxdh_ethdev.c | 48 ++++ > drivers/net/zxdh/zxdh_np.c | 494 ++++++++++++++++++++++++++++++++- > drivers/net/zxdh/zxdh_np.h | 107 +++++++ > 3 files changed, 647 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/zxdh/zxdh_ethdev.c b/drivers/net/zxdh/zxdh_ethdev.c > index c54d1f6669..b28ea4ae6f 100644 > --- a/drivers/net/zxdh/zxdh_ethdev.c > +++ b/drivers/net/zxdh/zxdh_ethdev.c > @@ -841,6 +841,51 @@ zxdh_dev_configure(struct rte_eth_dev *dev) > return ret; > } > > +static void > +zxdh_np_dtb_data_res_free(struct zxdh_hw *hw) > +{ > + struct rte_eth_dev *dev = hw->eth_dev; > + int ret = 0; > + int i = 0; > + Why initialize these variables (ret and i)? They are set immediately later in the loop. Programmers are often taught to always initialize all variables, but doing so defeats the checking in modern compilers that are able to detect variables that are used uninitialized.