summaryrefslogtreecommitdiffstats
path: root/src/vnet/bonding/cli.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2021-02-10 12:03:53 +0100
committerDamjan Marion <dmarion@me.com>2021-03-19 14:30:50 +0000
commit5b3f523918932793254b6313f78659fe0ed6320e (patch)
tree26241978a6669b4a466e09d598cc0e83cb00825c /src/vnet/bonding/cli.c
parent34c54dff5c66f9a4aef77daf08219301e15cc1fa (diff)
interface: add capabilities flags
Type: improvement This patch adds flags to represent the modern NICs capabilities. Change-Id: I96d38d9ab7eac55974d72795cd100d8337168e1e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/bonding/cli.c')
-rw-r--r--src/vnet/bonding/cli.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c
index 4ddee4a171b..a24d1104486 100644
--- a/src/vnet/bonding/cli.c
+++ b/src/vnet/bonding/cli.c
@@ -464,8 +464,9 @@ bond_create_if (vlib_main_t * vm, bond_create_if_args_t * args)
*/
if (args->gso)
{
- hw->flags |= (VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO |
- VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD);
+ hw->caps |= (VNET_HW_INTERFACE_CAP_SUPPORTS_TCP_GSO |
+ VNET_HW_INTERFACE_CAP_SUPPORTS_TX_TCP_CKSUM |
+ VNET_HW_INTERFACE_CAP_SUPPORTS_TX_UDP_CKSUM);
}
if (vlib_get_thread_main ()->n_vlib_mains > 1)
clib_spinlock_init (&bif->lockp);
@@ -631,7 +632,7 @@ bond_add_member (vlib_main_t * vm, bond_add_member_args_t * args)
clib_error_return (0, "bond interface cannot be added as member");
return;
}
- if (bif->gso && !(mif_hw->flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO))
+ if (bif->gso && !(mif_hw->caps & VNET_HW_INTERFACE_CAP_SUPPORTS_TCP_GSO))
{
args->rv = VNET_API_ERROR_INVALID_INTERFACE;
args->error =