| 294 | "Number of interfaces departing from ratelimiting"); |
| 295 | |
| 296 | static void |
| 297 | rl_add_syctl_entries(struct sysctl_oid *rl_sysctl_root, struct tcp_rate_set *rs) |
| 298 | { |
| 299 | /* |
| 300 | * Add sysctl entries for thus interface. |
| 301 | */ |
| 302 | if (rs->rs_flags & RS_INTF_NO_SUP) { |
| 303 | SYSCTL_ADD_S32(&rs->sysctl_ctx, |
| 304 | SYSCTL_CHILDREN(rl_sysctl_root), |
| 305 | OID_AUTO, "disable", CTLFLAG_RD, |
| 306 | &rs->rs_disable, 0, |
| 307 | "Disable this interface from new hdwr limiting?"); |
| 308 | } else { |
| 309 | SYSCTL_ADD_S32(&rs->sysctl_ctx, |
| 310 | SYSCTL_CHILDREN(rl_sysctl_root), |
| 311 | OID_AUTO, "disable", CTLFLAG_RW, |
| 312 | &rs->rs_disable, 0, |
| 313 | "Disable this interface from new hdwr limiting?"); |
| 314 | } |
| 315 | SYSCTL_ADD_S32(&rs->sysctl_ctx, |
| 316 | SYSCTL_CHILDREN(rl_sysctl_root), |
| 317 | OID_AUTO, "minseg", CTLFLAG_RW, |
| 318 | &rs->rs_min_seg, 0, |
| 319 | "What is the minimum we need to send on this interface?"); |
| 320 | SYSCTL_ADD_U64(&rs->sysctl_ctx, |
| 321 | SYSCTL_CHILDREN(rl_sysctl_root), |
| 322 | OID_AUTO, "flow_limit", CTLFLAG_RW, |
| 323 | &rs->rs_flow_limit, 0, |
| 324 | "What is the limit for number of flows (0=unlimited)?"); |
| 325 | SYSCTL_ADD_S32(&rs->sysctl_ctx, |
| 326 | SYSCTL_CHILDREN(rl_sysctl_root), |
| 327 | OID_AUTO, "highest", CTLFLAG_RD, |
| 328 | &rs->rs_highest_valid, 0, |
| 329 | "Highest valid rate"); |
| 330 | SYSCTL_ADD_S32(&rs->sysctl_ctx, |
| 331 | SYSCTL_CHILDREN(rl_sysctl_root), |
| 332 | OID_AUTO, "lowest", CTLFLAG_RD, |
| 333 | &rs->rs_lowest_valid, 0, |
| 334 | "Lowest valid rate"); |
| 335 | SYSCTL_ADD_S32(&rs->sysctl_ctx, |
| 336 | SYSCTL_CHILDREN(rl_sysctl_root), |
| 337 | OID_AUTO, "flags", CTLFLAG_RD, |
| 338 | &rs->rs_flags, 0, |
| 339 | "What lags are on the entry?"); |
| 340 | SYSCTL_ADD_S32(&rs->sysctl_ctx, |
| 341 | SYSCTL_CHILDREN(rl_sysctl_root), |
| 342 | OID_AUTO, "numrates", CTLFLAG_RD, |
| 343 | &rs->rs_rate_cnt, 0, |
| 344 | "How many rates re there?"); |
| 345 | SYSCTL_ADD_U64(&rs->sysctl_ctx, |
| 346 | SYSCTL_CHILDREN(rl_sysctl_root), |
| 347 | OID_AUTO, "flows_using", CTLFLAG_RD, |
| 348 | &rs->rs_flows_using, 0, |
| 349 | "How many flows are using this interface now?"); |
| 350 | #ifdef DETAILED_RATELIMIT_SYSCTL |
| 351 | if (rs->rs_rlt && rs->rs_rate_cnt > 0) { |
| 352 | /* Lets display the rates */ |
| 353 | int i; |
no test coverage detected