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 594A6A0A02; Thu, 20 Oct 2022 09:07:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1366742C5C; Thu, 20 Oct 2022 09:07:39 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 8722442C4D for ; Thu, 20 Oct 2022 09:07:38 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 0A2AC67; Thu, 20 Oct 2022 10:07:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 0A2AC67 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1666249658; bh=6CmIW9/7L4WdOHUKZzMuFAIpPA2v58JLwicjt3np0x0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=MZTVYkqPyGZ/SqpplIvbOp2vxf/5isvBIWGRCxluZth5kAXiirCKXzHoi5jJaDcPS pYxKPepZD+NIgj8JCXCAXyxyByyhS64Vcnyt2u3vLlBRHTCtGECmrGMNMm7uot2d7O aGyiHND+zu4ro7q1GZcvrrtZE7Ts1GpL3hbf9Zug= Message-ID: Date: Thu, 20 Oct 2022 10:07:37 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v5] net/bonding: call Tx prepare before Tx burst Content-Language: en-US To: Chas Williams <3chas3@gmail.com>, Chengwen Feng , thomas@monjalon.net, ferruh.yigit@xilinx.com Cc: dev@dpdk.org, chas3@att.com, humin29@huawei.com, konstantin.ananyev@huawei.com References: <1619171202-28486-2-git-send-email-tangchengchang@huawei.com> <20221011132033.8547-1-fengchengwen@huawei.com> <54222d64-3b87-e426-ea26-2301dc8772b1@gmail.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <54222d64-3b87-e426-ea26-2301dc8772b1@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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 10/15/22 18:26, Chas Williams wrote: > On 10/11/22 09:20, Chengwen Feng wrote: >> Normally, to use the HW offloads capability (e.g. checksum and TSO) in >> the Tx direction, the application needs to call rte_eth_tx_prepare() to >> do some adjustment with the packets before sending them. But the >> tx_prepare callback of the bonding driver is not implemented. Therefore, >> the sent packets may have errors (e.g. checksum errors). >> >> However, it is difficult to design the tx_prepare callback for bonding >> driver. Because when a bonded device sends packets, the bonded device >> allocates the packets to different slave devices based on the real-time >> link status and bonding mode. That is, it is very difficult for the >> bonded device to determine which slave device's prepare function should >> be invoked. >> >> So in this patch, the tx_prepare callback of bonding driver is not >> implemented. Instead, the rte_eth_tx_prepare() will be called before >> rte_eth_tx_burst(). In this way, all tx_offloads can be processed >> correctly for all NIC devices. >> >> Note: because it is rara that bond different PMDs together, so just >> call tx-prepare once in broadcast bonding mode. >> >> Also the following description was added to the rte_eth_tx_burst() >> function: >> "@note This function must not modify mbufs (including packets data) >> unless the refcnt is 1. The exception is the bonding PMD, which does not >> have tx-prepare function, in this case, mbufs maybe modified." >> >> Signed-off-by: Chengchang Tang >> Signed-off-by: Chengwen Feng >> Reviewed-by: Min Hu (Connor) >> >> --- >> v5: address Chas's comments. >> v4: address Chas and Konstantin's comments. >> v3: support tx-prepare when Tx internal generate mbufs. >> v2: support tx-prepare enable flag and fail stats. > > This looks fine. Thanks for making the changes! > > Signed-off-by: Chas Williams <3chas3@gmail.com> Treat it as Acked-by: Chas Williams <3chas3@gmail.com> Applied to dpdk-next-net/main, thanks.