From patchwork Fri Apr 12 12:27:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Vojanec X-Patchwork-Id: 139249 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 47B1943E52; Fri, 12 Apr 2024 14:27:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 34F34402A8; Fri, 12 Apr 2024 14:27:52 +0200 (CEST) Received: from office2.cesnet.cz (office2.cesnet.cz [78.128.248.237]) by mails.dpdk.org (Postfix) with ESMTP id E4CFC402A2 for ; Fri, 12 Apr 2024 14:27:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2-2020; t=1712924870; bh=nIKSsGGV4Xzsk1SERX1dDY+u+7ydUBXNEt8eh/R38Gs=; h=From:To:Cc:Subject:Date; b=IS/hyHky0TdFuc4vmaC4wAGCJfRLy4YpovwrdzYxUQr9pUGhEIejuVChaNPt16Sjz QEJ7PFnWFMLujQqZDQae7ZTwKFclSzyDd6SphygzPStjsHUjPldmeOJ64cJ85etsLp eEoPywdjpzt5Z8jT9z7d0C6HG1d7alshdJJqS8sp7zlrcVNSefnyFayhPbztnsFcQY FgaGRvGN4iwfgCLXv62H8R2ih0rtxzmCUruz8XBdWQyJ+nKUZU6mmc6NhqLTy26VYb lBBcnz/x3QEf/ik+7zPPmqvbF82ZPwieEWu6SqLbrY9gdMl6mLpFeKBUML/mad7EDX qzdIeoB+AqXLg== Received: from dpdk-test6.liberouter.org (rt-tmc-kou.liberouter.org [195.113.172.126]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id AF7A6118007D; Fri, 12 Apr 2024 14:27:48 +0200 (CEST) From: Kamil Vojanec To: dev@dpdk.org Cc: Kamil Vojanec , Chas Williams , "Min Hu (Connor)" Subject: [PATCH v2 1/2] net/bonding: introduce direct link bonding mode Date: Fri, 12 Apr 2024 14:27:39 +0200 Message-Id: <20240412122740.104121-1-vojanec@cesnet.cz> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 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 This patch adds a new bonding mode: 'direct'. The purpose of this mode is to redirect output packets to the same member port on which they were received. In case the requested port is not among the member ports, round robin TX mode is used as a fallback. Signed-off-by: Kamil Vojanec --- app/test/test_link_bonding.c | 205 ++++++++++++++++++++++++ drivers/net/bonding/rte_eth_bond.h | 5 + drivers/net/bonding/rte_eth_bond_args.c | 1 + drivers/net/bonding/rte_eth_bond_pmd.c | 50 +++++- 4 files changed, 258 insertions(+), 3 deletions(-) diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index 4d54706c21..254cacf5aa 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -2134,6 +2134,208 @@ test_roundrobin_verify_polling_member_link_status_change(void) return remove_members_and_stop_bonding_device(); } +/** Direct mode Tests */ + +static int +test_direct_tx_burst_single_member(void) +{ + unsigned int i; + int member_port_id; + struct rte_eth_stats port_stats; + struct rte_mbuf *pkts[MAX_PKT_BURST]; + const unsigned int burst_size = 20; + + TEST_ASSERT(burst_size <= MAX_PKT_BURST, + "Burst size specified is greater than supported."); + + TEST_ASSERT_SUCCESS(initialize_bonding_device_with_members( + BONDING_MODE_DIRECT, 0, 1, 1), + "Failed to initialize bonding device with single member"); + + /* Generate burst of test packets */ + TEST_ASSERT_EQUAL(generate_test_burst(pkts, burst_size, 0, 1, 0, 0, 0), + (int) burst_size, "Failed to generate test burst"); + + member_port_id = test_params->member_port_ids[0]; + + /* Set the 'port' mbuf attribute to the appropriate value */ + for (i = 0; i < burst_size; i++) + pkts[i]->port = member_port_id; + + /* Send burst on bonding port */ + TEST_ASSERT_EQUAL(rte_eth_tx_burst( + test_params->bonding_port_id, 0, pkts, burst_size), + burst_size, + "TX burst failed"); + + /* Verify stats on bonding port */ + rte_eth_stats_get(test_params->bonding_port_id, &port_stats); + TEST_ASSERT_EQUAL(port_stats.opackets, burst_size, + "Bonding port (%d) opackets value (%u) not as expected (%u)\n", + test_params->bonding_port_id, (unsigned int) port_stats.opackets, + burst_size); + + /* Verify stats on member port */ + rte_eth_stats_get(member_port_id, &port_stats); + TEST_ASSERT_EQUAL(port_stats.opackets, burst_size, + "Member port (%d) opackets value (%u) not as expected (%u)\n", + member_port_id, (unsigned int) port_stats.opackets, + burst_size); + + /* Put all members down and try to transmit */ + virtual_ethdev_simulate_link_status_interrupt(member_port_id, 0); + + /* Try to send burst on bonding port */ + TEST_ASSERT_EQUAL(rte_eth_tx_burst(test_params->bonding_port_id, 0, + pkts, burst_size), 0, + "TX burst returned unexpected value"); + + /* Clean up and remove members from bonding device */ + return remove_members_and_stop_bonding_device(); +} + +static int +test_direct_tx_burst_multiple_members_single_tx(void) +{ + unsigned int i; + struct rte_eth_stats port_stats; + struct rte_mbuf *pkts[MAX_PKT_BURST]; + const unsigned int num_members = 4; + const unsigned int burst_size = 20; + const int exp_member_port_id = test_params->member_port_ids[0]; + int cmember_port_id; + unsigned int expected_pkts; + + + TEST_ASSERT(burst_size <= MAX_PKT_BURST, + "Burst size specified is greater than supported."); + + TEST_ASSERT_SUCCESS(initialize_bonding_device_with_members( + BONDING_MODE_DIRECT, 0, num_members, 1), + "Failed to initialize bonding device with single member"); + + /* Generate burst of test packets */ + TEST_ASSERT_EQUAL(generate_test_burst( + pkts, burst_size, 0, 1, 0, 0, 0), + (int) burst_size, + "Failed to generate test burst"); + + + /* Set the 'port' mbuf attribute to the appropriate value */ + for (i = 0; i < burst_size; i++) + pkts[i]->port = exp_member_port_id; + + /* Send burst on bonding port */ + TEST_ASSERT_EQUAL(rte_eth_tx_burst( + test_params->bonding_port_id, 0, pkts, burst_size), + burst_size, + "TX burst failed"); + + /* Verify stats on bonding port */ + rte_eth_stats_get(test_params->bonding_port_id, &port_stats); + TEST_ASSERT_EQUAL(port_stats.opackets, burst_size, + "Bonding port (%d) opackets value (%u) not as expected (%u)\n", + test_params->bonding_port_id, (unsigned int) port_stats.opackets, + burst_size); + + /* Verify member ports tx stats */ + for (i = 0; i < test_params->bonding_member_count; i++) { + cmember_port_id = test_params->member_port_ids[i]; + + if (cmember_port_id == exp_member_port_id) + expected_pkts = burst_size; + else + expected_pkts = 0; + + rte_eth_stats_get(cmember_port_id, &port_stats); + TEST_ASSERT_EQUAL(port_stats.opackets, + (uint64_t)expected_pkts, + "Member Port (%d) opackets value (%u) not as expected (%u)\n", + test_params->bonding_port_id, (unsigned int)port_stats.opackets, + expected_pkts); + } + + /* Put all members down and try and transmit */ + for (i = 0; i < test_params->bonding_member_count; i++) { + virtual_ethdev_simulate_link_status_interrupt( + test_params->member_port_ids[i], 0); + } + + /* Try to send burst on bonding port */ + TEST_ASSERT_EQUAL(rte_eth_tx_burst(test_params->bonding_port_id, 0, + pkts, burst_size), 0, + "TX burst returned unexpected value"); + + /* Clean up and remove members from bonding device */ + return remove_members_and_stop_bonding_device(); +} + +static int +test_direct_tx_burst_multiple_members_rr_fallback(void) +{ + unsigned int i; + struct rte_eth_stats port_stats; + struct rte_mbuf *pkts[MAX_PKT_BURST]; + const unsigned int num_members = 4; + const unsigned int pkts_per_member = 20; + const unsigned int burst_size = num_members * pkts_per_member; + + + TEST_ASSERT(burst_size <= MAX_PKT_BURST, + "Burst size specified is greater than supported."); + + TEST_ASSERT_SUCCESS(initialize_bonding_device_with_members( + BONDING_MODE_DIRECT, 0, num_members, 1), + "Failed to initialize bonding device with single member"); + + /* Generate burst of test packets */ + TEST_ASSERT_EQUAL(generate_test_burst( + pkts, burst_size, 0, 1, 0, 0, 0), + (int) burst_size, + "Failed to generate test burst"); + + + /* Set the 'port' mbuf attribute to the appropriate value */ + for (i = 0; i < burst_size; i++) + pkts[i]->port = RTE_MAX_ETHPORTS; + + /* Send burst on bonding port */ + TEST_ASSERT_EQUAL(rte_eth_tx_burst( + test_params->bonding_port_id, 0, pkts, burst_size), + burst_size, + "TX burst failed"); + + /* Verify stats on bonding port */ + rte_eth_stats_get(test_params->bonding_port_id, &port_stats); + TEST_ASSERT_EQUAL(port_stats.opackets, burst_size, + "Bonding port (%d) opackets value (%u) not as expected (%u)\n", + test_params->bonding_port_id, (unsigned int) port_stats.opackets, + burst_size); + + /* Verify member ports tx stats */ + for (i = 0; i < test_params->bonding_member_count; i++) { + rte_eth_stats_get(test_params->member_port_ids[i], &port_stats); + TEST_ASSERT_EQUAL(port_stats.opackets, + (uint64_t)pkts_per_member, + "Member Port (%d) opackets value (%u) not as expected (%u)\n", + test_params->bonding_port_id, (unsigned int)port_stats.opackets, + pkts_per_member); + } + + /* Put all members down and try and transmit */ + for (i = 0; i < test_params->bonding_member_count; i++) { + virtual_ethdev_simulate_link_status_interrupt( + test_params->member_port_ids[i], 0); + } + + /* Try to send burst on bonding port */ + TEST_ASSERT_EQUAL(rte_eth_tx_burst(test_params->bonding_port_id, 0, + pkts, burst_size), 0, + "TX burst returned unexpected value"); + + /* Clean up and remove members from bonding device */ + return remove_members_and_stop_bonding_device(); +} /** Active Backup Mode Tests */ @@ -5174,6 +5376,9 @@ static struct unit_test_suite link_bonding_test_suite = { TEST_CASE(test_roundrobin_verify_mac_assignment), TEST_CASE(test_roundrobin_verify_member_link_status_change_behaviour), TEST_CASE(test_roundrobin_verify_polling_member_link_status_change), + TEST_CASE(test_direct_tx_burst_single_member), + TEST_CASE(test_direct_tx_burst_multiple_members_single_tx), + TEST_CASE(test_direct_tx_burst_multiple_members_rr_fallback), TEST_CASE(test_activebackup_tx_burst), TEST_CASE(test_activebackup_rx_burst), TEST_CASE(test_activebackup_verify_promiscuous_enable_disable), diff --git a/drivers/net/bonding/rte_eth_bond.h b/drivers/net/bonding/rte_eth_bond.h index f10165f2c6..82d6644500 100644 --- a/drivers/net/bonding/rte_eth_bond.h +++ b/drivers/net/bonding/rte_eth_bond.h @@ -83,6 +83,11 @@ extern "C" { * information from it. When ARP reply from that peer is received, its MAC is * stored, one of member MACs assigned and ARP reply send to that peer. */ +#define BONDING_MODE_DIRECT (7) +/**< Direct bonding mode (Mode 7) + * In this mode, all packets are transmitted using the same member port on which + * it was received. This is decided based on the 'port' field of 'rte_mbuf'. + */ /* Balance Mode Transmit Policies */ #define BALANCE_XMIT_POLICY_LAYER2 (0) diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c index bdec5d61d4..44e20568db 100644 --- a/drivers/net/bonding/rte_eth_bond_args.c +++ b/drivers/net/bonding/rte_eth_bond_args.c @@ -158,6 +158,7 @@ bond_ethdev_parse_member_mode_kvarg(const char *key __rte_unused, case BONDING_MODE_8023AD: case BONDING_MODE_TLB: case BONDING_MODE_ALB: + case BONDING_MODE_DIRECT: return 0; default: RTE_BOND_LOG(ERR, "Invalid member mode value (%s) specified", value); diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index c40d18d128..57ac5879c4 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -578,9 +578,14 @@ bond_ethdev_rx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) return nb_recv_pkts; } +enum tx_member_populate_mode { + RR_ONLY, + DIRECT_WITH_RR_FALLBACK, +}; + static uint16_t -bond_ethdev_tx_burst_round_robin(void *queue, struct rte_mbuf **bufs, - uint16_t nb_pkts) +bond_ethdev_tx_burst_rr_generic(void *queue, struct rte_mbuf **bufs, + uint16_t nb_pkts, enum tx_member_populate_mode pop_mode) { struct bond_dev_private *internals; struct bond_tx_queue *bd_tx_q; @@ -594,7 +599,7 @@ bond_ethdev_tx_burst_round_robin(void *queue, struct rte_mbuf **bufs, uint16_t num_tx_total = 0, num_tx_member; static int member_idx; - int i, cmember_idx = 0, tx_fail_total = 0; + int i, j, cmember_idx = 0, tx_fail_total = 0; bd_tx_q = (struct bond_tx_queue *)queue; internals = bd_tx_q->dev_private; @@ -611,6 +616,17 @@ bond_ethdev_tx_burst_round_robin(void *queue, struct rte_mbuf **bufs, /* Populate members mbuf with which packets are to be sent on it */ for (i = 0; i < nb_pkts; i++) { cmember_idx = (member_idx + i) % num_of_members; + + if (pop_mode == DIRECT_WITH_RR_FALLBACK) { + /* Try to find correct member index */ + for (j = 0; j < num_of_members; j++) { + if (bufs[i]->port == members[j]) { + cmember_idx = j; + break; + } + } + } + member_bufs[cmember_idx][(member_nb_pkts[cmember_idx])++] = bufs[i]; } @@ -646,6 +662,20 @@ bond_ethdev_tx_burst_round_robin(void *queue, struct rte_mbuf **bufs, return num_tx_total; } +static uint16_t +bond_ethdev_tx_burst_round_robin(void *queue, struct rte_mbuf **bufs, + uint16_t nb_pkts) +{ + return bond_ethdev_tx_burst_rr_generic(queue, bufs, nb_pkts, RR_ONLY); +} + +static uint16_t +bond_ethdev_tx_burst_direct(void *queue, struct rte_mbuf **bufs, + uint16_t nb_pkts) +{ + return bond_ethdev_tx_burst_rr_generic(queue, bufs, nb_pkts, DIRECT_WITH_RR_FALLBACK); +} + static uint16_t bond_ethdev_tx_burst_active_backup(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) @@ -1551,6 +1581,7 @@ mac_address_members_update(struct rte_eth_dev *bonding_eth_dev) case BONDING_MODE_ROUND_ROBIN: case BONDING_MODE_BALANCE: case BONDING_MODE_BROADCAST: + case BONDING_MODE_DIRECT: for (i = 0; i < internals->member_count; i++) { if (rte_eth_dev_default_mac_addr_set( internals->members[i].port_id, @@ -1648,6 +1679,10 @@ bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, uint8_t mode) eth_dev->tx_pkt_burst = bond_ethdev_tx_burst_alb; eth_dev->rx_pkt_burst = bond_ethdev_rx_burst_alb; break; + case BONDING_MODE_DIRECT: + eth_dev->tx_pkt_burst = bond_ethdev_tx_burst_direct; + eth_dev->rx_pkt_burst = bond_ethdev_rx_burst; + break; default: return -1; } @@ -2581,6 +2616,7 @@ bond_ethdev_link_update(struct rte_eth_dev *ethdev, int wait_to_complete) case BONDING_MODE_BALANCE: case BONDING_MODE_TLB: case BONDING_MODE_ALB: + case BONDING_MODE_DIRECT: default: /** * In theses mode the maximum theoretical link speed is the sum @@ -2678,6 +2714,7 @@ bond_ethdev_promiscuous_enable(struct rte_eth_dev *eth_dev) case BONDING_MODE_ROUND_ROBIN: case BONDING_MODE_BALANCE: case BONDING_MODE_BROADCAST: + case BONDING_MODE_DIRECT: case BONDING_MODE_8023AD: { unsigned int member_ok = 0; @@ -2732,6 +2769,7 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev *dev) case BONDING_MODE_ROUND_ROBIN: case BONDING_MODE_BALANCE: case BONDING_MODE_BROADCAST: + case BONDING_MODE_DIRECT: case BONDING_MODE_8023AD: { unsigned int member_ok = 0; @@ -2790,6 +2828,7 @@ bond_ethdev_promiscuous_update(struct rte_eth_dev *dev) case BONDING_MODE_BALANCE: case BONDING_MODE_BROADCAST: case BONDING_MODE_8023AD: + case BONDING_MODE_DIRECT: /* As promiscuous mode is propagated to all members for these * mode, no need to update for bonding device. */ @@ -2825,6 +2864,7 @@ bond_ethdev_allmulticast_enable(struct rte_eth_dev *eth_dev) case BONDING_MODE_ROUND_ROBIN: case BONDING_MODE_BALANCE: case BONDING_MODE_BROADCAST: + case BONDING_MODE_DIRECT: case BONDING_MODE_8023AD: { unsigned int member_ok = 0; @@ -2879,6 +2919,7 @@ bond_ethdev_allmulticast_disable(struct rte_eth_dev *eth_dev) case BONDING_MODE_ROUND_ROBIN: case BONDING_MODE_BALANCE: case BONDING_MODE_BROADCAST: + case BONDING_MODE_DIRECT: case BONDING_MODE_8023AD: { unsigned int member_ok = 0; @@ -2936,6 +2977,7 @@ bond_ethdev_allmulticast_update(struct rte_eth_dev *dev) case BONDING_MODE_BALANCE: case BONDING_MODE_BROADCAST: case BONDING_MODE_8023AD: + case BONDING_MODE_DIRECT: /* As allmulticast mode is propagated to all members for these * mode, no need to update for bonding device. */ @@ -3365,6 +3407,8 @@ bond_mode_name(uint8_t mode) return "TLB"; case BONDING_MODE_ALB: return "ALB"; + case BONDING_MODE_DIRECT: + return "DIRECT"; default: return "Unknown"; } From patchwork Fri Apr 12 12:27:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Vojanec X-Patchwork-Id: 139250 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C087C43E52; Fri, 12 Apr 2024 14:27:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62AB340E28; Fri, 12 Apr 2024 14:27:54 +0200 (CEST) Received: from office2.cesnet.cz (office2.cesnet.cz [78.128.248.237]) by mails.dpdk.org (Postfix) with ESMTP id A897740E13 for ; Fri, 12 Apr 2024 14:27:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2-2020; t=1712924873; bh=/VozFjvcU8tYMKNfgC1VFGiNGfO/CGbqBSdLsxo7OL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=co/KDQC/BDNVRAOJ37uex4GVh1/A1/Sy8XFav9ZI4xM4Kogi6Thn6ODIoJ3wBbK34 0plbWTwWih1WDxCEekunwfZjbuQChdiuPmj0mDNPAwd4qikVAMpI1iY/Yfi+bJOI2u AmWIdCBVpy4Tv7l16gCv43+4mAQ2TzXsnXw58g7+wiF3lnt8Qdby3fZhLsPaWj2I2o 8jerfvaOJDTxfi2dpC1ZsMCClP1k0mMQVNCYBEcMKyEZpMxIPP9s1mXcxdx939gKt0 PjsCqDtACvix/F7Hp500pW0ER58XOvMSHwxy8uRkMfOyyy1XHDfabwjVUdOesYrgpE YOPY4KNYeajtw== Received: from dpdk-test6.liberouter.org (rt-tmc-kou.liberouter.org [195.113.172.126]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id B7B5D1180081; Fri, 12 Apr 2024 14:27:51 +0200 (CEST) From: Kamil Vojanec To: dev@dpdk.org Cc: Kamil Vojanec , Chas Williams , "Min Hu (Connor)" Subject: [PATCH v2 2/2] doc/prog_guide: document direct link bonding mode Date: Fri, 12 Apr 2024 14:27:40 +0200 Message-Id: <20240412122740.104121-2-vojanec@cesnet.cz> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240412122740.104121-1-vojanec@cesnet.cz> References: <20240412122740.104121-1-vojanec@cesnet.cz> MIME-Version: 1.0 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 This commit introduces documentation for the newly introduced link bonding mode. Signed-off-by: Kamil Vojanec --- doc/guides/prog_guide/img/bond-mode-7.svg | 908 ++++++++++++++++++ .../link_bonding_poll_mode_drv_lib.rst | 13 + 2 files changed, 921 insertions(+) create mode 100644 doc/guides/prog_guide/img/bond-mode-7.svg diff --git a/doc/guides/prog_guide/img/bond-mode-7.svg b/doc/guides/prog_guide/img/bond-mode-7.svg new file mode 100644 index 0000000000..aae0a5132e --- /dev/null +++ b/doc/guides/prog_guide/img/bond-mode-7.svg @@ -0,0 +1,908 @@ + + + +image/svg+xmlPage-4Rectangle.7User ApplicationUser Application +Sheet.2Rectangle.38DPDKDPDK +Rectangle.16bonding ethdevbonding ethdev +Rectangle.11ethdev portethdev port +Rectangle.14ethdev portethdev port +Rectangle.15ethdev portethdev port +Simple Double Arrow.14Simple ArrowSimple Arrow.37Simple Arrow.37Simple Arrow.37Simple Arrow.38Simple Arrow.39Square.11411 +Square.11522 +Square.11633 +Square.11744 +Square.11855 +Square.12011 +Square.12011 +Square.12123 +Square.12123 +Square.12235 +Square.12235 +Square.12342 +Square.12342 +Square.12454 +Square.12454 + diff --git a/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst b/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst index 60717a3587..146add35a5 100644 --- a/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst +++ b/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst @@ -129,6 +129,19 @@ Currently the Link Bonding PMD library supports following modes of operation: changes the transmitting member, according to the computed load. Statistics are collected in 100ms intervals and scheduled every 10ms. +* **Transmit Load Balancing (Mode 7):** + +.. figure:: img/bond-mode-7.* + + Direct TX (Mode 7) + + + This mode is a specialized version of round robin bonding mode. It transmits + packets to the same member ports on which they were received (based on the + ``port`` attribute of ``struct rte_mbuf``). In case the port attribute does + not belong to any managed bonding members, this mode reverts back to round + robin TX mode. Note that this mode does not implement a specific RX mode, + instead using a round robin approach. Implementation Details ----------------------