diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2021-02-10 12:03:53 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-03-19 14:30:50 +0000 |
commit | 5b3f523918932793254b6313f78659fe0ed6320e (patch) | |
tree | 26241978a6669b4a466e09d598cc0e83cb00825c /src/vnet/gso/node.c | |
parent | 34c54dff5c66f9a4aef77daf08219301e15cc1fa (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/gso/node.c')
-rw-r--r-- | src/vnet/gso/node.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/vnet/gso/node.c b/src/vnet/gso/node.c index ecbdc188ec8..5814aad4b0d 100644 --- a/src/vnet/gso/node.c +++ b/src/vnet/gso/node.c @@ -523,28 +523,30 @@ vnet_gso_node_inline (vlib_main_t * vm, if (PREDICT_FALSE (hi->sw_if_index != swif0)) { hi0 = vnet_get_sup_hw_interface (vnm, swif0); - if ((hi0->flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO) == 0 && + if ((hi0->caps & VNET_HW_INTERFACE_CAP_SUPPORTS_TCP_GSO) == + 0 && (b[0]->flags & VNET_BUFFER_F_GSO)) break; } if (PREDICT_FALSE (hi->sw_if_index != swif1)) { hi1 = vnet_get_sup_hw_interface (vnm, swif1); - if (!(hi1->flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO) && + if (!(hi1->caps & VNET_HW_INTERFACE_CAP_SUPPORTS_TCP_GSO) && (b[1]->flags & VNET_BUFFER_F_GSO)) break; } if (PREDICT_FALSE (hi->sw_if_index != swif2)) { hi2 = vnet_get_sup_hw_interface (vnm, swif2); - if ((hi2->flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO) == 0 && + if ((hi2->caps & VNET_HW_INTERFACE_CAP_SUPPORTS_TCP_GSO) == + 0 && (b[2]->flags & VNET_BUFFER_F_GSO)) break; } if (PREDICT_FALSE (hi->sw_if_index != swif3)) { hi3 = vnet_get_sup_hw_interface (vnm, swif3); - if (!(hi3->flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO) && + if (!(hi3->caps & VNET_HW_INTERFACE_CAP_SUPPORTS_TCP_GSO) && (b[3]->flags & VNET_BUFFER_F_GSO)) break; } @@ -615,7 +617,7 @@ vnet_gso_node_inline (vlib_main_t * vm, if (PREDICT_FALSE (hi->sw_if_index != swif0)) { hi0 = vnet_get_sup_hw_interface (vnm, swif0); - if ((hi0->flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO) == 0 && + if ((hi0->caps & VNET_HW_INTERFACE_CAP_SUPPORTS_TCP_GSO) == 0 && (b[0]->flags & VNET_BUFFER_F_GSO)) do_segmentation0 = 1; } @@ -774,7 +776,7 @@ vnet_gso_inline (vlib_main_t * vm, hi = vnet_get_sup_hw_interface (vnm, vnet_buffer (b)->sw_if_index[VLIB_TX]); - if (hi->flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO) + if (hi->caps & VNET_HW_INTERFACE_CAP_SUPPORTS_TCP_GSO) return vnet_gso_node_inline (vm, node, frame, vnm, hi, is_l2, is_ip4, is_ip6, /* do_segmentation */ 0); |