diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2020-05-12 14:28:13 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-05-13 11:23:49 +0000 |
commit | 689666ca5d4149ec5d48b7fbd195f6c2b2c016f3 (patch) | |
tree | 838df76154ffa95b7ecdc51239ff116fa0c91521 /src/vnet/bonding | |
parent | b1fd80f0999e4dbbebdbc2471aeab2cad418ca4d (diff) |
bonding: fix the GSO flags
Type: fix
Only add GSO and Checksum offload flags when gso is
enabled.
Change-Id: I58945a4ffbb9a0e6a8640fc01424c63feef16306
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/bonding')
-rw-r--r-- | src/vnet/bonding/cli.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c index 09ef10f1b05..d9a6408206e 100644 --- a/src/vnet/bonding/cli.c +++ b/src/vnet/bonding/cli.c @@ -458,8 +458,14 @@ bond_create_if (vlib_main_t * vm, bond_create_if_args_t * args) bif->numa_only = args->numa_only; hw = vnet_get_hw_interface (vnm, bif->hw_if_index); - hw->flags |= (VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO | - VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD); + /* + * Add GSO and Checksum offload flags if GSO is enabled on Bond + */ + if (args->gso) + { + hw->flags |= (VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO | + VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD); + } if (vlib_get_thread_main ()->n_vlib_mains > 1) clib_spinlock_init (&bif->lockp); |