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 D0599460CB; Tue, 21 Jan 2025 04:45:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 649B442707; Tue, 21 Jan 2025 04:45:11 +0100 (CET) Received: from lf-2-19.ptr.blmpb.com (lf-2-19.ptr.blmpb.com [101.36.218.19]) by mails.dpdk.org (Postfix) with ESMTP id 010E340264 for ; Tue, 21 Jan 2025 04:45:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=feishu2403070942; d=yunsilicon.com; t=1737431098; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=AVjUIcpUMIRHGGxLGu9PpndNhKqvr2mr2Le0h0Tz6Qs=; b=khKBJ+efSKEgOkzr4ltlQFZF+0M4xnn7brdcr0+FK0bhvqQZ4sGE/qs4TdodpkSXHn9n2D v4zT+sUXhYzvJebHPAPmEEl/Q801AlEDK0ZNOFM/iSEeIrQBLLTnWAW3j+umNUGHnrucvl cpwaDINX858/g2/ShatF1IVTduPkeY5VjZZ9aYvV66j4Kg9FofU2FPTYuPGYmaUwo2Mik6 ZjbImA8we7GHdghT0mV2rGz5plbLIUrJ/IRDU/F3ewD5SibpLIvhqNzz/wN/W2qQF+tzb/ zV5odj0gPs8OWq6OrzrvXyUob4cHBia0Fj2XYTpyZ2GWLJ2htLOBOlBqMkwQ8g== To: "Stephen Hemminger" Message-Id: <454cf3a4-aeb1-480d-aae8-ab6abfb0e73f@yunsilicon.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8 From: "WanRenyong" Received: from [127.0.0.1] ([218.1.186.193]) by smtp.feishu.cn with ESMTPS; Tue, 21 Jan 2025 11:44:56 +0800 In-Reply-To: <20250120102433.6f6b342e@hermes.local> X-Lms-Return-Path: Cc: , , , , , , , , Mime-Version: 1.0 X-Original-From: WanRenyong Subject: Re: [PATCH v6 05/15] net/xsc: add PCT interfaces Date: Tue, 21 Jan 2025 11:44:55 +0800 References: <20250120111431.1048479-1-wanry@yunsilicon.com> <20250120111440.1048479-6-wanry@yunsilicon.com> <20250120102433.6f6b342e@hermes.local> User-Agent: Mozilla Thunderbird 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 2025/1/21 2:24, Stephen Hemminger wrote: > On Mon, 20 Jan 2025 19:14:42 +0800 > "WanRenyong" wrote: > >> +int >> +xsc_dev_create_ipat(struct xsc_dev *xdev, uint16_t logic_in_port, uint16_t dst_info) >> +{ >> + struct xsc_np_ipat add; >> + >> + memset(&add, 0, sizeof(add)); >> + add.key.logical_in_port = logic_in_port; >> + add.action.dst_info = dst_info; >> + add.action.vld = 1; > You could use initializer here, and avoid a few steps: > > struct xsd_np_ipat add = { > .key.logical_in_port = logic_in_port, > .action = { > .dst_info = dst_info, > .vlid = 1, > }, > }; > > And several other places. > > This is purely a suggestion, either way is fine will accept it either way. Hello, Stephen Hemminger, Thanks for your suggestion, I don't plan to address this issue. -- Best regards, WanRenyong