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 40A00A0548; Fri, 23 Apr 2021 11:46:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C61B941DD7; Fri, 23 Apr 2021 11:46:40 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 73648410E3 for ; Fri, 23 Apr 2021 11:46:37 +0200 (CEST) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FRTrp4kj9z1BH7M; Fri, 23 Apr 2021 17:44:10 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Fri, 23 Apr 2021 17:46:26 +0800 From: Chengchang Tang To: CC: , , , , Date: Fri, 23 Apr 2021 17:46:40 +0800 Message-ID: <1619171202-28486-1-git-send-email-tangchengchang@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618571071-5927-1-git-send-email-tangchengchang@huawei.com> References: <1618571071-5927-1-git-send-email-tangchengchang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 0/2] add Tx prepare support for bonding device 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" This patch set add Tx prepare for bonding device. Currently, the bonding driver has not implemented the callback of rte_eth_tx_prepare function. Therefore, the TX prepare function of the slave devices will never be invoked. When hardware offloading such as CKSUM and TSO are enabled for some drivers, tx_prepare needs to be used to adjust packets (for example, set correct pseudo packet headers). Otherwise, related offloading fails and even packets are sent incorrectly. Due to this limitation, the bonded device cannot use these HW offloading in the Tx direction. Because packet sending algorithms are numerous and complex in bond PMD, it is hard to design the callback for rte_eth_tx_prepare. In this patchset, the tx_prepare callback of bonding PMD is not implemented. Instead, rte_eth_tx_prepare has been called in tx_burst callback. In this way, all tx_offloads can be processed correctly for all NIC devices. It is the responsibility of the slave PMDs to decide when the real tx_prepare needs to be used. If tx_prepare is not required in some cases, then slave PMDs tx_prepare pointer should be NULL and rte_eth_tx_prepare() will be just a NOOP. That is, the effectiveness and security of tx_prepare and its impact on performance depend on the design of slave PMDs. And configuring Tx offloading for bonding is also added in this patchset. This solves the problem that we need to configure slave devices one by one when configuring Tx offloading. Chengchang Tang (2): net/bonding: support Tx prepare for bonding net/bonding: support configuring Tx offloading for bonding drivers/net/bonding/rte_eth_bond.h | 1 - drivers/net/bonding/rte_eth_bond_pmd.c | 41 ++++++++++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 5 deletions(-) -- 2.7.4