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 B96084601A; Mon, 20 Jan 2025 19:30:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C200642708; Mon, 20 Jan 2025 19:30:36 +0100 (CET) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id 28AC742707 for ; Mon, 20 Jan 2025 19:30:36 +0100 (CET) Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2ee74291415so6321853a91.3 for ; Mon, 20 Jan 2025 10:30:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1737397835; x=1738002635; 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=y1Rr2H98/JuTD/SywI9g2gn9Xv3dEYlc7/eh+BK5n4E=; b=iWJ+ojZdJJAGZMtI0K8Lt23R34/Hu+C7thd9QkgrTl5mee2V4G7DCgVpkj/2h7rW8E trhPappDjEhe+LlOIFnwDtkEkxV1jOTziPLAxMNQvUDPNZLv8/GpaCgHPjLHD72A8KHM ZMqkU7rVTBrDnC/qspR6gKQdi+jDr+36+mGYhEH4fg1b+nxAoWbV2WR1Jrz23BPkTG5X O4sYkzRyJplIPI3Aki0z02lTwZHLzcQbNmPu6wwzfLXToSbyKx0ZoyxqXL+BaQFQ6ZFW 9yxYGH+c4juUveuCtycPYPpikg2s+bvLWcfEW6t29/Z3EM8lhm87w9BJ2rYzdR1uDKvg lhug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737397835; x=1738002635; 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=y1Rr2H98/JuTD/SywI9g2gn9Xv3dEYlc7/eh+BK5n4E=; b=U6I8qAD4bwwmX8BI8lou2sowWZJSbM36fEn7ic61peczvxWyVvUHLTcOgxLR3XZjwX bNBCaJq4Os/ee67pk9OB+r8RZkLB5PsrpQkODk4lbyjLe/OXmPwe/RGqxWkpUgZ5scQD CHL66euP4Ds8/MJKUx7idUDelMTXuAXKfGWBHqmJeaBedfpMwU1vcybEMcg3cikxi73x Fif7AsQQfLW+c57YMfnvAElHWqTXdwMW/cmKT3g3TD68cu9YRdkUobv8BDduyp7C1eyd l8I9gGx7W/0E+4XTZXlnHNi2iILrDLUuPza88ZvvFQVPNmrXvhFvpi2m+vO6mBXr7lwo qPxg== X-Gm-Message-State: AOJu0YxgKoF34aT5qcT5AvmyrVvYaleOE7m36tlhwMfcaoxuTQ8vmaf4 EzdWzRsv+OTtZwrlHtKJE7N+hlEdvOsIsltXyjFLTOjXoSbuOp1bwajTJKJ2wsk= X-Gm-Gg: ASbGnctQNjosK10TSnoAcSrB77yuDynXsruyPc2RR0H9LfzLOfdnakRTikUjZe3gdl+ RYxHaqxIILWE1+lsxw5mKS4pur+a4SbSGDlUY29qxuX+5YGHw+0qelNY9pcoIQ50iKqnI0LRmmA enYozon/Z5wmmP48l+zDN4C/hl7mmsZ7G6H5JU2IfkQRQyf01aAgs7HBf2i9fOwRlyyeWhuv3tW dpDdTJpJVeXXUa2/apS+FcnMC2QWhCSUh9FKZH8A7VuGWFGUPYr6S+0Aw6s6lGBQh2MHpFebNmK yxdXvQMwWVDs/R9sumPoZArBe1qxbHO4VBjV0erofbCmads= X-Google-Smtp-Source: AGHT+IHUBhJEFJlCwLxQX4rz5/MuJqFi/h+z+GoLcMKycdxS3ERALibyLFawIlGyGSeXVfQXJSZAhQ== X-Received: by 2002:a17:90b:258c:b0:2ee:dd9b:e3e8 with SMTP id 98e67ed59e1d1-2f782c73b69mr20305169a91.8.1737397835452; Mon, 20 Jan 2025 10:30:35 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f7c6c079fasm2361777a91.5.2025.01.20.10.30.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2025 10:30:35 -0800 (PST) Date: Mon, 20 Jan 2025 10:24:33 -0800 From: Stephen Hemminger To: "WanRenyong" Cc: , , , , , , , , Subject: Re: [PATCH v6 05/15] net/xsc: add PCT interfaces Message-ID: <20250120102433.6f6b342e@hermes.local> In-Reply-To: <20250120111440.1048479-6-wanry@yunsilicon.com> References: <20250120111431.1048479-1-wanry@yunsilicon.com> <20250120111440.1048479-6-wanry@yunsilicon.com> 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 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.