_ (GSO) \
_ (RATE_SAMPLING)
+typedef enum transport_endpt_attr_flag_bit_
+{
+#define _(name) TRANSPORT_ENDPT_ATTR_F_BIT_##name,
+ foreach_transport_endpt_cfg_flags
+#undef _
+} __clib_packed transport_endpt_attr_flag_bit_t;
+
typedef enum transport_endpt_attr_flag_
{
-#define _(name) TRANSPORT_ENDPT_ATTR_F_##name,
+#define _(name) \
+ TRANSPORT_ENDPT_ATTR_F_##name = 1 << TRANSPORT_ENDPT_ATTR_F_BIT_##name,
foreach_transport_endpt_cfg_flags
#undef _
} __clib_packed transport_endpt_attr_flag_t;
tc->cfg_flags |= TCP_CFG_F_NO_TSO;
tc->cfg_flags &= ~TCP_CFG_F_TSO;
}
+ if (attr->flags & TRANSPORT_ENDPT_ATTR_F_RATE_SAMPLING)
+ {
+ if (!(tc->cfg_flags & TCP_CFG_F_RATE_SAMPLE))
+ tcp_bt_init (tc);
+ tc->cfg_flags |= TCP_CFG_F_RATE_SAMPLE;
+ }
+ else
+ {
+ if (tc->cfg_flags & TCP_CFG_F_RATE_SAMPLE)
+ tcp_bt_cleanup (tc);
+ tc->cfg_flags &= ~TCP_CFG_F_RATE_SAMPLE;
+ }
break;
case TRANSPORT_ENDPT_ATTR_CC_ALGO:
if (tc->cc_algo == tcp_cc_algo_get (attr->cc_algo))
attr->flags |= TRANSPORT_ENDPT_ATTR_F_CSUM_OFFLOAD;
if (tc->cfg_flags & TCP_CFG_F_TSO)
attr->flags |= TRANSPORT_ENDPT_ATTR_F_GSO;
+ if (tc->cfg_flags & TCP_CFG_F_RATE_SAMPLE)
+ attr->flags |= TRANSPORT_ENDPT_ATTR_F_RATE_SAMPLING;
break;
case TRANSPORT_ENDPT_ATTR_CC_ALGO:
attr->cc_algo = tc->cc_algo - tcp_main.cc_algos;