net/bonding: Changes for accomodating jumbo frames in bond

Message ID 70F53DB4-6B41-4D13-A49E-30C8C29C62D3@juniper.net (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/bonding: Changes for accomodating jumbo frames in bond |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot warning Travis build: failed
ci/Intel-compilation fail Compilation issues
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing fail Testing issues

Commit Message

Kiran KN April 21, 2020, 7:48 a.m. UTC
  Propagate max rx packet length and jumbo offload capabilities
to slaves from master

Signed-off-by: Kiran KN <kirankn@juniper.net>

---
 drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
  

Comments

humin (Q) Nov. 26, 2020, 1:33 a.m. UTC | #1
It looks good to me, thanks.
  
Ferruh Yigit Dec. 8, 2020, 12:34 p.m. UTC | #2
On 11/26/2020 1:33 AM, Min Hu (Connor) wrote:
> It looks good to me, thanks.
> 

Converting to an explicit ack:
Acked-by: Min Hu (Connor) <humin29@huawei.com>

Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index e1f105233..cf9247e7e 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1722,6 +1722,17 @@  slave_configure(struct rte_eth_dev *bonded_eth_dev,
 		slave_eth_dev->data->dev_conf.rxmode.offloads &=
 				~DEV_RX_OFFLOAD_VLAN_FILTER;
 
+	slave_eth_dev->data->dev_conf.rxmode.max_rx_pkt_len =
+			bonded_eth_dev->data->dev_conf.rxmode.max_rx_pkt_len;
+
+	if (bonded_eth_dev->data->dev_conf.rxmode.offloads &
+			DEV_RX_OFFLOAD_JUMBO_FRAME)
+		slave_eth_dev->data->dev_conf.rxmode.offloads |=
+				DEV_RX_OFFLOAD_JUMBO_FRAME;
+	else
+		slave_eth_dev->data->dev_conf.rxmode.offloads &=
+				~DEV_RX_OFFLOAD_JUMBO_FRAME;
+
 	nb_rx_queues = bonded_eth_dev->data->nb_rx_queues;
 	nb_tx_queues = bonded_eth_dev->data->nb_tx_queues;