| 460 | } |
| 461 | |
| 462 | static int |
| 463 | test_build_ports_range(void) |
| 464 | { |
| 465 | static const struct rte_acl_ipv4vlan_rule test_rules[] = { |
| 466 | { |
| 467 | /* match all packets. */ |
| 468 | .data = { |
| 469 | .userdata = 1, |
| 470 | .category_mask = ACL_ALLOW_MASK, |
| 471 | .priority = 101, |
| 472 | }, |
| 473 | .src_port_low = 0, |
| 474 | .src_port_high = UINT16_MAX, |
| 475 | .dst_port_low = 0, |
| 476 | .dst_port_high = UINT16_MAX, |
| 477 | }, |
| 478 | { |
| 479 | /* match all packets with dst ports [54-65280]. */ |
| 480 | .data = { |
| 481 | .userdata = 2, |
| 482 | .category_mask = ACL_ALLOW_MASK, |
| 483 | .priority = 102, |
| 484 | }, |
| 485 | .src_port_low = 0, |
| 486 | .src_port_high = UINT16_MAX, |
| 487 | .dst_port_low = 54, |
| 488 | .dst_port_high = 65280, |
| 489 | }, |
| 490 | { |
| 491 | /* match all packets with dst ports [0-52]. */ |
| 492 | .data = { |
| 493 | .userdata = 3, |
| 494 | .category_mask = ACL_ALLOW_MASK, |
| 495 | .priority = 103, |
| 496 | }, |
| 497 | .src_port_low = 0, |
| 498 | .src_port_high = UINT16_MAX, |
| 499 | .dst_port_low = 0, |
| 500 | .dst_port_high = 52, |
| 501 | }, |
| 502 | { |
| 503 | /* match all packets with dst ports [53]. */ |
| 504 | .data = { |
| 505 | .userdata = 4, |
| 506 | .category_mask = ACL_ALLOW_MASK, |
| 507 | .priority = 99, |
| 508 | }, |
| 509 | .src_port_low = 0, |
| 510 | .src_port_high = UINT16_MAX, |
| 511 | .dst_port_low = 53, |
| 512 | .dst_port_high = 53, |
| 513 | }, |
| 514 | { |
| 515 | /* match all packets with dst ports [65279-65535]. */ |
| 516 | .data = { |
| 517 | .userdata = 5, |
| 518 | .category_mask = ACL_ALLOW_MASK, |
| 519 | .priority = 98, |
no test coverage detected