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 C18BD45E94; Fri, 13 Dec 2024 22:06:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99C3840E39; Fri, 13 Dec 2024 22:06:08 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 4E3CD40E39 for ; Fri, 13 Dec 2024 22:06:07 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-728e78c4d7bso1675653b3a.0 for ; Fri, 13 Dec 2024 13:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734123966; x=1734728766; 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=HbWZ3I0pPlkCleCQ89xjBDGtJPKSRmP6CFDwqBTgp/4=; b=xW8mtvyXigS4jpjtAY2CHpaW09z8QkA2s/IrHNThc0kz+JT/tVoYouBAllJFAUdqSQ 6KS0hEkWl6rPE+FgDC1vdWjwPQArUlQOxXjyOsGhCxvxBJfCyUaa3DYLo2ssFom5J8Pt jtZ1w3Vu0tSZezxakCUzSgylrf0pMqzL2xQaB7AvMw45NnjVxGsy1y2d6pfBGYSFFf/0 8mjraCJFjwKp8mR+r64QUFFxRhxP1NMm2AAQ/XCgIu304iiZuOh2LehAXK5AB8ZVvKaG saRqq/mlcT7irdZf8o7xUok18lyPOV4W6MNC6gSCuwwkPDFJgllhaVBE//T69kMygDum b2MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734123966; x=1734728766; 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=HbWZ3I0pPlkCleCQ89xjBDGtJPKSRmP6CFDwqBTgp/4=; b=JIg2x3iDN7s3PIJTrNd1XA+CfRf0ddq2xWQwxsX2FQ3MB5ViHDFoAzmOOaN3XyFM8M 6L/bmyPWaNtTYVroBJ0SgKU5N/rcBVBP8Al6v1XJgTVqCf1bRouWI3xxEyKT/gn7BuOD gGrKebt9Kx3OmQoH7PZ/Ac3x9AyH/5vi3ei99IoufHwoJC0iNIvfILjiSht092L72oAa sZ7YbnrJCkb80FMzjNmQ0FzGvoeLnVUl7/4xmqcsDK5qp59JjW6mW6IKd4xzqTTKxs5n O3/ln5eZPEegeETJGDfnCAYDB1U38UklARSOXvMv1nolyyPBqPOZHiaXQPpr2WO/xDYm zd2Q== X-Forwarded-Encrypted: i=1; AJvYcCWiCkK9XtlTjxFRgClO0NUPfVF5WOreQuKnWF5cGyT/4zbP8OC+AXRl7n3a+7ZlA7so/G8=@dpdk.org X-Gm-Message-State: AOJu0Yyztw3Zp7zk7HX+17FMoS0PotWcjlRchAZ4yOmbOoDGR04kvYz6 AwsW3vcx1cdPdgfTRFa5jRSvr9MpLyM6IyaFfNbCEufgEmjGOlPSmmMGikBnOug= X-Gm-Gg: ASbGncvK1RaPxz5o8IHBrgmu4Lhk0/Qi2uLgPvDUGQpdPVnZnySuWHm87oE1rz6wZX6 OHBooc+ynYeuragIlQkF1GaAL2VMJm+Mb5Eg744aoX1loG6meG7Nagbp7FkgLlwBLMFSsAz3JKs xngAaIcFOHv0mZkLRJ5LuK3JvHlq8D70l7CIxeP/AT5ZLGUPFI4NPenrA/BwYmzP7KcTvLvbByj BVRZKBiiKrxaqV1AT6KT24CrzPuOfuwQlIV7PN0k29ObjeoSa7EvDCVxGE7DD9Bceq3p0OsDvT2 Y1OqSaRF91kLXc2rgesWl4R5P+/9iCBdmQ== X-Google-Smtp-Source: AGHT+IGeKIEj7ZJi/9kYkr0lX3eo3A5vG4QD7CMLjKtvAly5Lg5mdD2G4wdosgxmDJe/xbi7KoB7kw== X-Received: by 2002:a05:6a00:4207:b0:725:e386:3c5b with SMTP id d2e1a72fcca58-729073432a3mr8806444b3a.5.1734123966438; Fri, 13 Dec 2024 13:06:06 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 13:06:06 -0800 (PST) Date: Fri, 13 Dec 2024 11:45:18 -0800 From: Stephen Hemminger To: Junlong Wang Cc: ferruh.yigit@amd.com, dev@dpdk.org Subject: Re: [PATCH v2 04/15] net/zxdh: port tables unint implementations Message-ID: <20241213114518.14ea1544@hermes.local> In-Reply-To: <20241210055333.782901-5-wang.junlong1@zte.com.cn> References: <20241206055715.506961-2-wang.junlong1@zte.com.cn> <20241210055333.782901-1-wang.junlong1@zte.com.cn> <20241210055333.782901-5-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:22 +0800 Junlong Wang wrote: > elete port tables in host. > > Signed-off-by: Junlong Wang > --- > drivers/net/zxdh/zxdh_ethdev.c | 19 ++++++ > drivers/net/zxdh/zxdh_msg.h | 1 + > drivers/net/zxdh/zxdh_np.c | 113 +++++++++++++++++++++++++++++++++ > drivers/net/zxdh/zxdh_np.h | 9 +++ > drivers/net/zxdh/zxdh_tables.c | 36 ++++++++++- > drivers/net/zxdh/zxdh_tables.h | 1 + > 6 files changed, 177 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/zxdh/zxdh_ethdev.c b/drivers/net/zxdh/zxdh_ethdev.c > index 8a9ca87183..a72319758a 100644 > --- a/drivers/net/zxdh/zxdh_ethdev.c > +++ b/drivers/net/zxdh/zxdh_ethdev.c > @@ -887,12 +887,31 @@ zxdh_np_uninit(struct rte_eth_dev *dev) > zxdh_np_dtb_data_res_free(hw); > } > > +static int > +zxdh_tables_uninit(struct rte_eth_dev *dev) > +{ > + int ret = 0; > + > + ret = zxdh_port_attr_uninit(dev); > + if (ret) { > + PMD_DRV_LOG(ERR, "zxdh_port_attr_uninit failed"); > + return ret; > + } > + return ret; > +} > + Could be simplified to: static int zxdh_tables_uninit(struct rte_eth_dev *dev) { int ret; ret = zxdh_port_attr_uninit(dev); if (ret) PMD_DRV_LOG(ERR, "zxdh_port_attr_uninit failed"); return ret; }