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 13DA7A0093; Tue, 8 Nov 2022 19:01:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 030B0400D7; Tue, 8 Nov 2022 19:01:32 +0100 (CET) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id D56EE400D4 for ; Tue, 8 Nov 2022 19:01:30 +0100 (CET) Received: by mail-pg1-f173.google.com with SMTP id 130so1662327pgc.5 for ; Tue, 08 Nov 2022 10:01:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=g596HXdwvz4ehMzaTUWixQu2TDplyK7ZnKyH+vpKalg=; b=vVHmDgijhzamJgGxPEzEa6oI4cm29nZ+OA9pqSUyhIPL5vGL6AX8+Ck2mCKac+S5A5 o40kkyHFYC/hLNvkBWmFZ4cE8Mm3h74sgZS7UezS32yHZNN9LEEp4zqU59l+NcRpVZd2 66WSaU9hLa7JmeZtu3PeQJ08JJ8kQ8uF9rKK1NfevCCCcGGAWJKv/eiwSPv9O/anls5W 5St205cxJU6/YsIOf7HiSuypaJ0V4Zh6gK02nb9vyRNVTJGHJvlfdzvaiT3CiPgXEYMq 1KnxyRivVjT8XgYm9CEtw/AZBd0j10Ax7YcNlJk5kCu56Tge7/KXqhriQVhrjCiLO5wG PqFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=g596HXdwvz4ehMzaTUWixQu2TDplyK7ZnKyH+vpKalg=; b=S0t2GPICkNrL3Ss3se/FAgRZKMPjV2RrS47/fvcqQ0jIB+dAIAdAb+Ql1MxX9o+vcA bHTXzGz1n5H94wWQdCJzcS1EUu9GULSZGWH+6069HoepY7nCb4pIHlLQmTTEgigTO/2Y Tp0oLn6xnAphFyKsmOO+EMH2Op79rgV87fPBodvPC6JCNfYKkyr/SyTRTYDWKe2dtrtl 3/rEFlKtnJn0tSmLIj+QNhVKzMDgNTnDuylPSIAz051WAd4jPMYOlt9I0yUYjdNOp/gz 6mrvYlFNMWoGYsm3wuU6hnwWDUC+eL/1B0uRpLktEcrBgIRHE8Z/dbjhPnsbNgRz6w3l 4TyQ== X-Gm-Message-State: ACrzQf0TAHD8RTCu0JfDZPDxNpMmwUq1xAczakGbppggrKkjq+RBHS34 pmVsE7uy+UrVv5+WMHw3FcVy6ClqMv5suw== X-Google-Smtp-Source: AMsMyM7t9zYVV99/EfeN3Dg0y7vtZQ+8wVY/l/U+OqoQByiPKqL++tOexmkRXMRNrNKxgbSbiMcdEA== X-Received: by 2002:a63:d211:0:b0:46f:6229:c380 with SMTP id a17-20020a63d211000000b0046f6229c380mr48427623pgg.621.1667930490050; Tue, 08 Nov 2022 10:01:30 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id x11-20020aa7940b000000b0056bf29c9ba3sm6903092pfo.146.2022.11.08.10.01.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 10:01:29 -0800 (PST) Date: Tue, 8 Nov 2022 10:01:26 -0800 From: Stephen Hemminger To: Huisong Li Cc: , , , , <3chas3@gmail.com>, , Subject: Re: [PATCH 2/2] app/testpmd: remove fast free offload for bond3 and bond4 Message-ID: <20221108100126.3b963338@hermes.local> In-Reply-To: <20221108084038.25136-3-lihuisong@huawei.com> References: <20221108084038.25136-1-lihuisong@huawei.com> <20221108084038.25136-3-lihuisong@huawei.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 Tue, 8 Nov 2022 16:40:38 +0800 Huisong Li wrote: > The port configurations of bonding device need to be updated when add a > slave device. But mbuf fast free offload can't be used in bonding mode > Broadcast and mode 8023AD. So remove this offload for both mode in case > of failing to initialize bonding device. > > Fixes: 76376bd9cd49 ("app/testpmd: update bond port configurations when add slave") > > Signed-off-by: Huisong Li int ret; > > @@ -2825,6 +2826,13 @@ update_bonding_port_dev_conf(portid_t bond_pid) > if (port->dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) > port->dev_conf.txmode.offloads |= > RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; > + /* Bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload */ > + bonding_mode = rte_eth_bond_mode_get(bond_pid); > + if (bonding_mode == BONDING_MODE_8023AD || > + bonding_mode == BONDING_MODE_BROADCAST) > + port->dev_conf.txmode.offloads &= > + ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE; > + This would be better handled in the bonding driver. It should return the correct txmode offloads based on bonding mode. That way it would work for any application not just testpmd.