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 4DE5FA0C56; Fri, 5 Nov 2021 03:50:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96EB14114B; Fri, 5 Nov 2021 03:49:27 +0100 (CET) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 49E2941145 for ; Fri, 5 Nov 2021 03:49:25 +0100 (CET) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4HllL06wxVz8v7k; Fri, 5 Nov 2021 10:47:52 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.15; Fri, 5 Nov 2021 10:49:23 +0800 To: Ferruh Yigit , CC: References: <20211102031729.35536-1-humin29@huawei.com> <20211102031729.35536-10-humin29@huawei.com> <51d6f048-5852-9191-029c-8c4bfaddb2a3@intel.com> From: "Min Hu (Connor)" Message-ID: <020e0b3b-5479-e1a1-e31d-c5e761d2f012@huawei.com> Date: Fri, 5 Nov 2021 10:49:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <51d6f048-5852-9191-029c-8c4bfaddb2a3@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH 9/9] net/hns3: remove PF/VF duplicate code 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 Sender: "dev" Hi, 在 2021/11/4 22:55, Ferruh Yigit 写道: > On 11/2/2021 3:17 AM, Min Hu (Connor) wrote: >> From: Chengwen Feng >> >> This patch remove PF/VF duplicate code of: >> 1. get firmware version. >> 2. get device info. >> 3. rx interrupt related functions. >> >> Signed-off-by: Chengwen Feng >> Signed-off-by: Min Hu (Connor) > > <...> > >> +int >> +hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct >> rte_eth_dev_info *info) >> +{ >> +    struct hns3_adapter *hns = eth_dev->data->dev_private; >> +    struct hns3_hw *hw = &hns->hw; >> +    uint16_t queue_num = hw->tqps_num; >> + >> +    /* >> +     * In interrupt mode, 'max_rx_queues' is set based on the number of >> +     * MSI-X interrupt resources of the hardware. >> +     */ >> +    if (hw->data->dev_conf.intr_conf.rxq == 1) >> +        queue_num = hw->intr_tqps_num; >> + >> +    info->max_rx_queues = queue_num; >> +    info->max_tx_queues = hw->tqps_num; >> +    info->max_rx_pktlen = HNS3_MAX_FRAME_LEN; /* CRC included */ >> +    info->min_rx_bufsize = HNS3_MIN_BD_BUF_SIZE; >> +    info->max_mtu = info->max_rx_pktlen - HNS3_ETH_OVERHEAD; >> +    info->max_lro_pkt_size = HNS3_MAX_LRO_SIZE; >> +    info->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM | >> +                 DEV_RX_OFFLOAD_TCP_CKSUM | >> +                 DEV_RX_OFFLOAD_UDP_CKSUM | >> +                 DEV_RX_OFFLOAD_SCTP_CKSUM | >> +                 DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | >> +                 DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | >> +                 DEV_RX_OFFLOAD_SCATTER | >> +                 DEV_RX_OFFLOAD_VLAN_STRIP | >> +                 DEV_RX_OFFLOAD_VLAN_FILTER | >> +                 DEV_RX_OFFLOAD_RSS_HASH | >> +                 DEV_RX_OFFLOAD_TCP_LRO); >> +    info->tx_offload_capa = (DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | >> +                 DEV_TX_OFFLOAD_IPV4_CKSUM | >> +                 DEV_TX_OFFLOAD_TCP_CKSUM | >> +                 DEV_TX_OFFLOAD_UDP_CKSUM | >> +                 DEV_TX_OFFLOAD_SCTP_CKSUM | >> +                 DEV_TX_OFFLOAD_MULTI_SEGS | >> +                 DEV_TX_OFFLOAD_TCP_TSO | >> +                 DEV_TX_OFFLOAD_VXLAN_TNL_TSO | >> +                 DEV_TX_OFFLOAD_GRE_TNL_TSO | >> +                 DEV_TX_OFFLOAD_GENEVE_TNL_TSO | >> +                 DEV_TX_OFFLOAD_MBUF_FAST_FREE | >> +                 DEV_TX_OFFLOAD_VLAN_INSERT); > > The function changed while moving, please be aware renamed macros in > upsteram. > Can you please rebase your patch on top of latest next-net? fixed in v2, thanks. > > .