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 C3EE54318A; Tue, 17 Oct 2023 13:34:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B60A240E4A; Tue, 17 Oct 2023 13:34:37 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id ED48240C35 for ; Tue, 17 Oct 2023 13:34:35 +0200 (CEST) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4S8sJQ6XTSzrTVn; Tue, 17 Oct 2023 19:31:50 +0800 (CST) Received: from [10.67.121.59] (10.67.121.59) by kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 17 Oct 2023 19:34:32 +0800 Message-ID: Date: Tue, 17 Oct 2023 19:34:32 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v3 7/8] net/bonding: support checking valid bonding port ID To: Chaoyong He , "dev@dpdk.org" CC: oss-drivers , Long Wu References: <20231007013440.1309422-1-chaoyong.he@corigine.com> <20231008015041.1551165-1-chaoyong.he@corigine.com> <20231008015041.1551165-8-chaoyong.he@corigine.com> <9d3ed36d-5fd1-3a13-82ee-9bd955a10b0f@huawei.com> From: "lihuisong (C)" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm000004.china.huawei.com (7.193.23.18) X-CFilter-Loop: Reflected 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 在 2023/10/17 17:25, Chaoyong He 写道: >> Hi Chaoyong, >> >> It is better to separate patch 3/8 and patch 6/8 from this series. > The patch 3/8 is okay to separate, there is no problem. > But if patch 6/8 be a separate patch, this patch series will need depend on it. > I'm not sure if that is okay? I doesn't see the dependency of patch 7/8 and 8/8 on it. If you remove the patches which isn't releated with the subject of this series, it is helpful for reviewing. > >> 在 2023/10/8 9:50, Chaoyong He 写道: >>> From: Long Wu >>> >>> Add API to support checking if the port id is a bonding port id. >>> >>> Signed-off-by: Long Wu >>> Reviewed-by: James Hershaw >>> Reviewed-by: Chaoyong He >>> --- >>> drivers/net/bonding/rte_eth_bond.h | 13 +++++++++++++ >>> drivers/net/bonding/rte_eth_bond_api.c | 7 +++++++ >>> drivers/net/bonding/version.map | 1 + >>> 3 files changed, 21 insertions(+) >>> >>> diff --git a/drivers/net/bonding/rte_eth_bond.h >>> b/drivers/net/bonding/rte_eth_bond.h >>> index 3f427b6bab..e8152a155f 100644 >>> --- a/drivers/net/bonding/rte_eth_bond.h >>> +++ b/drivers/net/bonding/rte_eth_bond.h >>> @@ -461,6 +461,19 @@ __rte_experimental >>> int >>> rte_eth_bond_hw_create_get(uint16_t bonding_port_id, uint16_t >>> member_port_id); >>> >>> +/** >>> + * Check whether bonding port id is valid. >>> + * >>> + * @param bonding_port_id >>> + * Port ID of bonding device. >>> + * >>> + * @return >>> + * 0 on success, negative value otherwise. >>> + */ >>> +__rte_experimental >>> +int >>> +rte_eth_bond_valid_bonding_port_id(uint16_t bonding_port_id); >>> + >>> #ifdef __cplusplus >>> } >>> #endif >>> diff --git a/drivers/net/bonding/rte_eth_bond_api.c >>> b/drivers/net/bonding/rte_eth_bond_api.c >>> index 0113dfdc16..80d71529cc 100644 >>> --- a/drivers/net/bonding/rte_eth_bond_api.c >>> +++ b/drivers/net/bonding/rte_eth_bond_api.c >>> @@ -1214,3 +1214,10 @@ rte_eth_bond_hw_create_get(uint16_t >>> bonding_port_id, uint16_t member_port_id) >>> >>> return member_dev->dev_ops->bond_hw_create_get(member_dev, >> bonding_dev); >>> } >>> + >>> + >>> +int >>> +rte_eth_bond_valid_bonding_port_id(uint16_t port_id) { >>> + return valid_bonding_port_id(port_id); } >>> diff --git a/drivers/net/bonding/version.map >>> b/drivers/net/bonding/version.map index 3cfff51269..bf5e50521e 100644 >>> --- a/drivers/net/bonding/version.map >>> +++ b/drivers/net/bonding/version.map >>> @@ -39,4 +39,5 @@ EXPERIMENTAL { >>> rte_eth_bond_notify_member_flag_get; >>> rte_eth_bond_notify_member_flag_set; >>> rte_eth_bond_notify_members; >>> + rte_eth_bond_valid_bonding_port_id; >>> };