Lines Matching full:id
331 run_cmd "$IP nexthop add id $nhidstr via $ipstr$iter dev veth1"
332 check_nexthop "id $nhidstr" "id $nhidstr via $ipstr$iter dev veth1 scope link"
347 run_cmd "$IP nexthop add id $grpidstr group $grpstr"
348 check_nexthop "id $grpidstr" "id $grpidstr group $grpstr"
370 run_cmd "$IP nexthop add id 100 via $ipstr dev veth1"
371 run_cmd "$IP nexthop add id 1000 group 100 type resilient buckets $buckets"
456 run_cmd "$IP nexthop add id 61 via 2001:db8:91::2 fdb"
457 run_cmd "$IP nexthop add id 62 via 2001:db8:91::3 fdb"
458 run_cmd "$IP nexthop add id 102 group 61/62 fdb"
459 check_nexthop "id 102" "id 102 group 61/62 fdb"
463 run_cmd "$IP nexthop get id 102"
464 check_nexthop "id 102" "id 102 group 61/62 fdb"
465 log_test $? 0 "Get Fdb nexthop group by id"
468 run_cmd "$IP nexthop add id 63 via 2001:db8:91::4"
469 run_cmd "$IP nexthop add id 64 via 2001:db8:91::5"
470 run_cmd "$IP nexthop add id 103 group 63/64 fdb"
474 run_cmd "$IP nexthop add id 65 via 2001:db8:91::5 fdb"
475 run_cmd "$IP nexthop add id 66 via 2001:db8:91::6 fdb"
476 run_cmd "$IP nexthop add id 104 group 65/66"
480 run_cmd "$IP nexthop add id 67 blackhole fdb"
484 run_cmd "$IP nexthop add id 68 via 2001:db8:91::7 dev veth1 fdb"
488 run_cmd "$IP nexthop add id 68 via 2001:db8:91::7 onlink fdb"
492 run_cmd "$IP nexthop add id 69 encap mpls 101 via 2001:db8:91::8 dev veth1 fdb"
495 …run_cmd "$IP link add name vx10 type vxlan id 1010 local 2001:db8:91::9 remote 2001:db8:91::10 dst…
509 run_cmd "$IP nexthop del id 61"
513 run_cmd "$IP nexthop del id 102"
536 run_cmd "$IP nexthop add id 12 via 172.16.1.2 fdb"
537 run_cmd "$IP nexthop add id 13 via 172.16.1.3 fdb"
538 run_cmd "$IP nexthop add id 102 group 12/13 fdb"
539 check_nexthop "id 102" "id 102 group 12/13 fdb"
543 run_cmd "$IP nexthop get id 102"
544 check_nexthop "id 102" "id 102 group 12/13 fdb"
545 log_test $? 0 "Get Fdb nexthop group by id"
548 run_cmd "$IP nexthop add id 14 via 172.16.1.2"
549 run_cmd "$IP nexthop add id 15 via 172.16.1.3"
550 run_cmd "$IP nexthop add id 103 group 14/15 fdb"
554 run_cmd "$IP nexthop add id 16 via 172.16.1.2 fdb"
555 run_cmd "$IP nexthop add id 17 via 172.16.1.3 fdb"
556 run_cmd "$IP nexthop add id 104 group 14/15"
560 run_cmd "$IP nexthop add id 18 blackhole fdb"
564 run_cmd "$IP nexthop add id 16 via 172.16.1.2 dev veth1 fdb"
568 run_cmd "$IP nexthop add id 16 via 172.16.1.2 onlink fdb"
572 run_cmd "$IP nexthop add id 17 encap mpls 101 via 172.16.1.2 dev veth1 fdb"
575 …run_cmd "$IP link add name vx10 type vxlan id 1010 local 10.0.0.1 remote 10.0.0.2 dstport 4789 nol…
589 run_cmd "$IP nexthop del id 12"
593 run_cmd "$IP nexthop del id 102"
621 run_cmd "$IP nexthop add id 1 via ${gws["veth1"]} dev veth1"
622 run_cmd "$IP nexthop add id 2 via ${gws["veth3"]} dev veth3"
623 run_cmd "$IP nexthop add id 1001 group 1/2"
674 run_cmd "$IP nexthop add id 1 via ${gws["veth1"]} dev veth1"
675 run_cmd "$IP nexthop add id 2 via ${gws["veth3"]} dev veth3"
676 run_cmd "$IP nexthop add id 1001 group 1/2"
721 run_cmd "$IP nexthop add id 52 via 2001:db8:91::2 dev veth1"
723 log_test $rc 0 "Create nexthop with id, gw, dev"
729 run_cmd "$IP nexthop get id 52"
730 log_test $? 0 "Get nexthop by id"
731 check_nexthop "id 52" "id 52 via 2001:db8:91::2 dev veth1 scope link"
733 run_cmd "$IP nexthop del id 52"
734 log_test $? 0 "Delete nexthop by id"
735 check_nexthop "id 52" ""
741 run_cmd "$IP nexthop add id 52 via 2001:db8:92::3"
745 run_cmd "$IP nexthop add id 53 via 2001:db8:3::3 dev veth1"
749 run_cmd "$IP nexthop add id 53 via 2001:db8:3::3 dev veth1 onlink"
754 run_cmd "$IP -6 nexthop add id 55 via 2001:db8:91::3 dev veth1"
755 run_cmd "$IP nexthop add id 56 via 2001:db8:91::4 dev veth1"
756 run_cmd "$IP nexthop add id 57 via 2001:db8:91::5 dev veth1"
771 run_cmd "$IP link add veth1.10 link veth1 up type vlan id 10"
772 run_cmd "$IP link add veth1.20 link veth1 up type vlan id 20"
777 run_cmd "$IP nexthop add id 100 via 2001:db8:91::2 dev veth1.10"
778 run_cmd "$IP nexthop add id 101 via 2001:db8:92::2 dev veth1.20"
779 run_cmd "$IP nexthop add id 102 group 100"
788 run_cmd "$IP nexthop replace id 102 group 101"
792 run_cmd "$IP nexthop replace id 102 group 100/101"
799 run_cmd "$IP nexthop del id 102"
805 run_cmd "$IP nexthop del id 100"
832 run_cmd "$IP nexthop add id 61 via 2001:db8:91::2 dev veth1"
833 run_cmd "$IP nexthop add id 101 group 61"
837 run_cmd "$IP nexthop get id 101"
838 log_test $? 0 "Get nexthop group by id"
839 check_nexthop "id 101" "id 101 group 61"
842 run_cmd "$IP nexthop del id 101"
843 log_test $? 0 "Delete nexthop group by id"
844 check_nexthop "id 101" ""
847 check_nexthop "id 101" ""
852 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
853 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
854 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
855 run_cmd "$IP nexthop add id 65 dev veth1"
856 run_cmd "$IP nexthop add id 102 group 62/63/64/65"
858 check_nexthop "id 102" "id 102 group 62/63/64/65"
861 run_cmd "$IP nexthop del id 63"
862 check_nexthop "id 102" "id 102 group 62/64/65"
866 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
867 run_cmd "$IP nexthop add id 103 group 62/63,2/64,3/65,4"
869 check_nexthop "id 103" "id 103 group 62/63,2/64,3/65,4"
872 run_cmd "$IP nexthop del id 63"
873 check_nexthop "id 103" "id 103 group 62/64,3/65,4"
890 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
891 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
892 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
893 run_cmd "$IP nexthop add id 65 via 2001:db8:91::5 dev veth1"
895 run_cmd "$IP nexthop add id 72 via 2001:db8:92::2 dev veth3"
896 run_cmd "$IP nexthop add id 73 via 2001:db8:92::3 dev veth3"
897 run_cmd "$IP nexthop add id 74 via 2001:db8:92::4 dev veth3"
898 run_cmd "$IP nexthop add id 75 via 2001:db8:92::5 dev veth3"
902 run_cmd "$IP nexthop add id 104 group 62"
903 run_cmd "$IP nexthop add id 105 group 62"
904 check_nexthop "group" "id 104 group 62 id 105 group 62"
911 run_cmd "$IP nexthop add id 105 group 62/63/72/73/64"
913 check_nexthop "id 105" "id 105 group 72/73"
916 run_cmd "$IP nexthop add id 106 group 105/74"
922 run_cmd "$IP -6 nexthop add id 31 blackhole"
923 run_cmd "$IP nexthop add id 107 group 31"
926 run_cmd "$IP nexthop add id 108 group 31/24"
935 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
936 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
937 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
938 run_cmd "$IP nexthop add id 65 via 2001:db8:91::5 dev veth1"
939 run_cmd "$IP nexthop add id 66 dev veth1"
941 run_cmd "$IP nexthop add id 103 group 62,1000"
943 local GRP="id 103 group 62,254/63,255/64,256/65,257/66,65535"
945 check_nexthop "id 103" "$GRP"
972 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
973 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
974 run_cmd "$IP nexthop add id 102 group 62/63 type resilient buckets 2 idle_timer 0"
976 run_cmd "$IP nexthop del id 63"
977 check_nexthop "id 102" \
978 "id 102 group 62 type resilient buckets 2 idle_timer 0 unbalanced_timer 0 unbalanced_time 0"
980 check_nexthop_bucket "list id 102" \
981 "id 102 index 0 nhid 62 id 102 index 1 nhid 62"
984 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
985 run_cmd "$IP nexthop replace id 102 group 62/63 type resilient buckets 2 idle_timer 0"
986 check_nexthop "id 102" \
987 "id 102 group 62/63 type resilient buckets 2 idle_timer 0 unbalanced_timer 0 unbalanced_time 0"
989 check_nexthop_bucket "list id 102" \
990 "id 102 index 0 nhid 63 id 102 index 1 nhid 62"
998 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
999 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
1000 run_cmd "$IP nexthop add id 102 group 62,3/63,1 type resilient buckets 4 idle_timer 0"
1002 run_cmd "$IP nexthop del id 63"
1003 check_nexthop "id 102" \
1004 "id 102 group 62,3 type resilient buckets 4 idle_timer 0 unbalanced_timer 0 unbalanced_time 0"
1006 check_nexthop_bucket "list id 102" \
1007 "id 102 index 0 nhid 62 id 102 index 1 nhid 62 id 102 index 2 nhid 62 id 102 index 3 nhid 62"
1010 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
1011 run_cmd "$IP nexthop replace id 102 group 62,3/63,1 type resilient buckets 4 idle_timer 0"
1012 check_nexthop "id 102" \
1013 "id 102 group 62,3/63 type resilient buckets 4 idle_timer 0 unbalanced_timer 0 unbalanced_time 0"
1015 check_nexthop_bucket "list id 102" \
1016 "id 102 index 0 nhid 63 id 102 index 1 nhid 62 id 102 index 2 nhid 62 id 102 index 3 nhid 62"
1022 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
1023 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
1024 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
1025 run_cmd "$IP nexthop add id 65 via 2001:db8:91::5 dev veth1"
1026 run_cmd "$IP nexthop add id 66 dev veth1"
1028 run_cmd "$IP nexthop add id 103 group 62,1000 type resilient buckets 32"
1030 local GRP="id 103 group 62,254/63,255/64,256/65,257/66,65535 $(:
1034 check_nexthop "id 103" "$GRP unbalanced_time 0"
1056 run_cmd "$IP nexthop add id 81 via 2001:db8:91::2 dev veth1"
1067 run_cmd "$IP nexthop add id 82 via 2001:db8:92::2 dev veth3"
1068 run_cmd "$IP nexthop add id 122 group 81/82"
1076 run_cmd "$IP -6 nexthop add id 83 blackhole"
1081 run_cmd "$IP nexthop replace id 83 via 2001:db8:91::2 dev veth1"
1085 run_cmd "$IP -6 nexthop replace id 83 blackhole"
1092 run_cmd "$IP nexthop replace id 122 group 83"
1096 run_cmd "$IP nexthop replace id 122 group 81/82"
1106 run_cmd "$IP -6 nexthop add id 85 dev veth1"
1111 run_cmd "$IP nexthop add id 123 group 81/85"
1120 run_cmd "$IP nexthop add id 84 via 172.16.1.1 dev veth1"
1125 run_cmd "$IP nexthop replace id 81 via 172.16.1.1 dev veth1"
1129 run_cmd "$IP nexthop replace id 81 via 172.16.1.1 dev veth1"
1132 run_cmd "$IP nexthop add id 86 via 2001:db8:92::2 dev veth3"
1133 run_cmd "$IP nexthop add id 87 via 172.16.1.1 dev veth1"
1134 run_cmd "$IP nexthop add id 88 via 172.16.1.1 dev veth1"
1135 run_cmd "$IP nexthop add id 124 group 86/87/88"
1139 run_cmd "$IP nexthop del id 88"
1143 run_cmd "$IP nexthop del id 87"
1148 run_cmd "$IP nexthop add id 87 via 172.16.1.1 dev veth1"
1149 run_cmd "$IP nexthop add id 88 via 172.16.1.1 dev veth1"
1150 run_cmd "$IP nexthop replace id 124 group 86/87/88"
1154 run_cmd "$IP nexthop replace id 88 via 2001:db8:92::2 dev veth3"
1158 run_cmd "$IP nexthop replace id 87 via 2001:db8:92::2 dev veth3"
1167 run_cmd "$IP nexthop add id 86 via 2001:db8:91::2 dev veth1"
1181 run_cmd "$IP nexthop add id 91 via 2001:db8:91::2 dev veth1"
1182 run_cmd "$IP nexthop add id 92 via 2001:db8:92::2 dev veth3"
1183 run_cmd "$IP nexthop add id 93 group 91/92"
1230 $IP nexthop del id 100
1231 $IP nexthop add id 100 via 2001:db8:91::2 dev veth1
1238 $IP nexthop replace id 102 group 100/101
1258 run_cmd "$IP nexthop add id 100 via 2001:db8:91::2 dev veth1"
1259 run_cmd "$IP nexthop add id 101 via 2001:db8:92::2 dev veth3"
1260 run_cmd "$IP nexthop add id 102 group 100/101"
1286 $IP nexthop replace id 102 group 100/101 type resilient
1312 run_cmd "$IP nexthop add id 100 via 2001:db8:91::2 dev veth1"
1313 run_cmd "$IP nexthop add id 101 via 2001:db8:92::2 dev veth3"
1314 run_cmd "$IP nexthop add id 102 group 100/101 type resilient buckets 512 idle_timer 0"
1350 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1352 log_test $rc 0 "Create nexthop with id, gw, dev"
1358 run_cmd "$IP nexthop get id 12"
1359 log_test $? 0 "Get nexthop by id"
1360 check_nexthop "id 12" "id 12 via 172.16.1.2 dev veth1 scope link"
1362 run_cmd "$IP nexthop del id 12"
1363 log_test $? 0 "Delete nexthop by id"
1364 check_nexthop "id 52" ""
1370 run_cmd "$IP nexthop add id 12 via 172.16.2.3"
1374 run_cmd "$IP nexthop add id 13 via 172.16.3.2 dev veth1"
1378 run_cmd "$IP nexthop add id 13 via 172.16.3.2 dev veth1 onlink"
1383 run_cmd "$IP nexthop add id 15 via 172.16.1.3 dev veth1"
1384 run_cmd "$IP nexthop add id 16 via 172.16.1.4 dev veth1"
1385 run_cmd "$IP nexthop add id 17 via 172.16.1.5 dev veth1"
1394 run_cmd "$IP nexthop add id 12 via 172.16.1.3 dev veth1"
1403 run_cmd "$IP nexthop del id 12"
1405 run_cmd "$IP nexthop add id 21 via 172.16.1.6 dev veth1"
1408 log_test $? 2 "Delete multipath route with only nh id based entry"
1410 run_cmd "$IP nexthop add id 22 via 172.16.1.6 dev veth1"
1431 run_cmd "$IP nexthop add id 11 via 172.16.1.2 dev veth1"
1432 run_cmd "$IP nexthop add id 101 group 11"
1436 run_cmd "$IP nexthop get id 101"
1437 log_test $? 0 "Get nexthop group by id"
1438 check_nexthop "id 101" "id 101 group 11"
1441 run_cmd "$IP nexthop del id 101"
1442 log_test $? 0 "Delete nexthop group by id"
1443 check_nexthop "id 101" ""
1449 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1450 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1451 run_cmd "$IP nexthop add id 14 via 172.16.1.4 dev veth1"
1452 run_cmd "$IP nexthop add id 15 via 172.16.1.5 dev veth1"
1453 run_cmd "$IP nexthop add id 102 group 12/13/14/15"
1455 check_nexthop "id 102" "id 102 group 12/13/14/15"
1458 run_cmd "$IP nexthop del id 13"
1459 check_nexthop "id 102" "id 102 group 12/14/15"
1463 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1464 run_cmd "$IP nexthop add id 103 group 12/13,2/14,3/15,4"
1466 check_nexthop "id 103" "id 103 group 12/13,2/14,3/15,4"
1469 run_cmd "$IP nexthop del id 13"
1470 check_nexthop "id 103" "id 103 group 12/14,3/15,4"
1487 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1488 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1489 run_cmd "$IP nexthop add id 14 via 172.16.1.4 dev veth1"
1490 run_cmd "$IP nexthop add id 15 via 172.16.1.5 dev veth1"
1492 run_cmd "$IP nexthop add id 22 via 172.16.2.2 dev veth3"
1493 run_cmd "$IP nexthop add id 23 via 172.16.2.3 dev veth3"
1494 run_cmd "$IP nexthop add id 24 via 172.16.2.4 dev veth3"
1495 run_cmd "$IP nexthop add id 25 via 172.16.2.5 dev veth3"
1499 run_cmd "$IP nexthop add id 104 group 12"
1500 run_cmd "$IP nexthop add id 105 group 12"
1501 check_nexthop "group" "id 104 group 12 id 105 group 12"
1508 run_cmd "$IP nexthop add id 105 group 12/13/22/23/14"
1510 check_nexthop "id 105" "id 105 group 22/23"
1513 run_cmd "$IP nexthop add id 106 group 105/24"
1519 run_cmd "$IP nexthop add id 31 blackhole"
1520 run_cmd "$IP nexthop add id 107 group 31"
1523 run_cmd "$IP nexthop add id 108 group 31/24"
1543 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1544 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1545 run_cmd "$IP nexthop add id 102 group 12/13 type resilient buckets 2 idle_timer 0"
1547 run_cmd "$IP nexthop del id 13"
1548 check_nexthop "id 102" \
1549 "id 102 group 12 type resilient buckets 2 idle_timer 0 unbalanced_timer 0 unbalanced_time 0"
1551 check_nexthop_bucket "list id 102" \
1552 "id 102 index 0 nhid 12 id 102 index 1 nhid 12"
1555 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1556 run_cmd "$IP nexthop replace id 102 group 12/13 type resilient buckets 2 idle_timer 0"
1557 check_nexthop "id 102" \
1558 "id 102 group 12/13 type resilient buckets 2 idle_timer 0 unbalanced_timer 0 unbalanced_time 0"
1560 check_nexthop_bucket "list id 102" \
1561 "id 102 index 0 nhid 13 id 102 index 1 nhid 12"
1569 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1570 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1571 run_cmd "$IP nexthop add id 102 group 12,3/13,1 type resilient buckets 4 idle_timer 0"
1573 run_cmd "$IP nexthop del id 13"
1574 check_nexthop "id 102" \
1575 "id 102 group 12,3 type resilient buckets 4 idle_timer 0 unbalanced_timer 0 unbalanced_time 0"
1577 check_nexthop_bucket "list id 102" \
1578 "id 102 index 0 nhid 12 id 102 index 1 nhid 12 id 102 index 2 nhid 12 id 102 index 3 nhid 12"
1581 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1582 run_cmd "$IP nexthop replace id 102 group 12,3/13,1 type resilient buckets 4 idle_timer 0"
1583 check_nexthop "id 102" \
1584 "id 102 group 12,3/13 type resilient buckets 4 idle_timer 0 unbalanced_timer 0 unbalanced_time 0"
1586 check_nexthop_bucket "list id 102" \
1587 "id 102 index 0 nhid 13 id 102 index 1 nhid 12 id 102 index 2 nhid 12 id 102 index 3 nhid 12"
1597 run_cmd "$IP nexthop add id 11 via ${lladdr} dev veth1"
1604 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1605 run_cmd "$IP nexthop add id 101 group 11/12"
1629 run_cmd "$IP nexthop add id 21 via 172.16.1.2 dev veth1"
1640 run_cmd "$IP nexthop add id 22 via 172.16.1.2 dev veth1"
1644 run_cmd "$IP nexthop replace id 22 dev veth3"
1646 run_cmd "$IP nexthop replace id 22 via 172.16.2.2 dev veth3"
1656 run_cmd "$IP nexthop replace id 21 via 172.16.1.2 dev veth1"
1661 run_cmd "$IP nexthop replace id 22 via 172.16.2.2 dev veth3"
1662 run_cmd "$IP nexthop add id 122 group 21/22"
1672 run_cmd "$IP nexthop add id 501 via 172.16.1.2 dev veth1"
1682 run_cmd "$IP nexthop replace id 501 via 172.16.1.3 dev veth1"
1693 run_cmd "$IP nexthop add id 23 blackhole"
1698 run_cmd "$IP nexthop replace id 23 via 172.16.1.2 dev veth1"
1702 run_cmd "$IP nexthop replace id 23 blackhole"
1709 run_cmd "$IP nexthop replace id 122 group 23"
1713 run_cmd "$IP nexthop replace id 122 group 21/22"
1723 run_cmd "$IP nexthop add id 85 dev veth1"
1728 run_cmd "$IP nexthop add id 123 group 21/85"
1738 run_cmd "$IP nexthop add id 24 via ${lladdr} dev veth1"
1757 run_cmd "$IP nexthop add id 25 via 172.16.1.2 dev veth1"
1758 run_cmd "$IP nexthop add id 101 group 24/25"
1792 run_cmd "$IP nexthop add id 51 encap mpls 101 via 172.16.1.2 dev veth1"
1794 check_nexthop "id 51" "id 51 encap mpls 101 via 172.16.1.2 dev veth1 scope link"
1797 run_cmd "$IP nexthop add id 52 encap mpls 102 via inet6 2001:db8:91::2 dev veth1"
1799 check_nexthop "id 52" "id 52 encap mpls 102 via 2001:db8:91::2 dev veth1 scope link"
1876 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
1877 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
1878 run_cmd "$IP nexthop add id 122 group 62/63"
1891 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
1893 run_cmd "$IP nexthop replace id 122 group 62/64"
1903 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
1904 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
1905 run_cmd "$IP nexthop add id 122 group 62/63"
1918 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
1920 run_cmd "$IP nexthop replace id 122 group 62/64"
1926 run_cmd "$IP nexthop del id 122"
1947 run_cmd "$IP nexthop add id 21 via 172.16.1.2 dev veth1"
1948 run_cmd "$IP nexthop add id 22 via 172.16.1.2 dev veth1"
1949 run_cmd "$IP nexthop add id 122 group 21/22"
1963 run_cmd "$IP nexthop add id 23 via 172.16.1.3 dev veth1"
1965 run_cmd "$IP nexthop replace id 122 group 21/23"
1986 run_cmd "$IP nexthop replace id 122 group 21/22"
1992 run_cmd "$IP nexthop del id 122"
2002 $IP nexthop del id 100
2003 $IP nexthop add id 100 via 172.16.1.2 dev veth1
2010 $IP nexthop replace id 102 group 100/101
2030 run_cmd "$IP nexthop add id 100 via 172.16.1.2 dev veth1"
2031 run_cmd "$IP nexthop add id 101 via 172.16.2.2 dev veth3"
2032 run_cmd "$IP nexthop add id 102 group 100/101"
2058 $IP nexthop replace id 102 group 100/101 type resilient
2084 run_cmd "$IP nexthop add id 100 via 172.16.1.2 dev veth1"
2085 run_cmd "$IP nexthop add id 101 via 172.16.2.2 dev veth3"
2086 run_cmd "$IP nexthop add id 102 group 100/101 type resilient buckets 512 idle_timer 0"
2119 run_cmd "$IP nexthop get id 1"
2120 log_test $? 2 "Nexthop get on non-existent id"
2122 run_cmd "$IP nexthop del id 1"
2123 log_test $? 2 "Nexthop del with non-existent id"
2125 run_cmd "$IP nexthop del id 1 group 1/2/3/4/5/6/7/8"
2126 log_test $? 2 "Nexthop del with non-existent id and extra attributes"
2129 run_cmd "$IP nexthop add id 1"
2134 run_cmd "$IP nexthop add id 1 dev veth1"
2140 run_cmd "$IP nexthop add id 1 dev veth1"
2145 run_cmd "$IP nexthop add id 1 dev veth1"
2148 # create nh with duplicate id
2149 run_cmd "$IP nexthop add id 1 dev veth3"
2150 log_test $? 2 "Nexthop with duplicate id"
2153 run_cmd "$IP nexthop add id 2 blackhole"
2157 run_cmd "$IP nexthop replace id 2 blackhole dev veth1"
2163 check_nexthop "id 2" "id 2 blackhole"
2168 # Dump should not loop endlessly when maximum nexthop ID is configured.
2169 run_cmd "$IP nexthop add id $((2**32-1)) blackhole"
2171 log_test $? 0 "Maximum nexthop ID dump"
2177 run_cmd "$IP nexthop add id 101 group 1"
2180 run_cmd "$IP nexthop add id 102 group 2"
2184 run_cmd "$IP nexthop add id 103 group 1/2"
2188 run_cmd "$IP nexthop replace id 2 dev veth3"
2189 run_cmd "$IP nexthop replace id 102 group 1/2"
2190 run_cmd "$IP nexthop replace id 2 blackhole"
2194 run_cmd "$IP nexthop add id 103 group 12"
2198 run_cmd "$IP nexthop add id 103 group 1/1"
2202 run_cmd "$IP nexthop replace id 2 group 1"
2206 run_cmd "$IP nexthop replace id 101 dev veth1"
2210 run_cmd "$IP nexthop add id 104 group 1 dev veth1"
2214 run_cmd "$IP nexthop add id 105 blackhole proto 99"
2215 run_cmd "$IP nexthop add id 106 blackhole proto 100"
2216 run_cmd "$IP nexthop add id 107 blackhole proto 99"
2218 check_nexthop "id 105" ""
2219 check_nexthop "id 106" "id 106 blackhole proto 100"
2220 check_nexthop "id 107" ""
2222 check_nexthop "id 106" ""
2227 run_cmd "$IP nexthop add id 104 group 1 blackhole"
2237 echo "nexthop add id $i blackhole" >> $batch_file
2280 run_cmd "$IP nexthop add id 1 dev veth1"
2286 run_cmd "$IP nexthop add id 101 group 1 type resilient buckets 8"
2289 run_cmd "$IP nexthop get id 101"
2290 check_nexthop "id 101" \
2291 "id 101 group 1 type resilient buckets 8 idle_timer 120 unbalanced_timer 0 unbalanced_time 0"
2294 run_cmd "$IP nexthop add id 102 group 1 type resilient
2296 run_cmd "$IP nexthop get id 102"
2297 check_nexthop "id 102" \
2298 "id 102 group 1 type resilient buckets 4 idle_timer 100 unbalanced_timer 5 unbalanced_time 0"
2301 run_cmd "$IP nexthop add id 103 group 1 type resilient buckets 0"
2308 run_cmd "$IP nexthop replace id 101 group 1 type resilient
2311 check_nexthop "id 101" \
2312 "id 101 group 1 type resilient buckets 8 idle_timer 240 unbalanced_timer 80 unbalanced_time 0"
2315 run_cmd "$IP nexthop replace id 101 group 1 type resilient idle_timer 512"
2317 check_nexthop "id 101" \
2318 "id 101 group 1 type resilient buckets 8 idle_timer 512 unbalanced_timer 80 unbalanced_time 0"
2321 run_cmd "$IP nexthop replace id 101 group 1 type resilient unbalanced_timer 256"
2323 check_nexthop "id 101" \
2324 "id 101 group 1 type resilient buckets 8 idle_timer 512 unbalanced_timer 256 unbalanced_time 0"
2327 run_cmd "$IP nexthop replace id 101 group 1 type resilient"
2329 check_nexthop "id 101" \
2330 "id 101 group 1 type resilient buckets 8 idle_timer 512 unbalanced_timer 256 unbalanced_time 0"
2333 run_cmd "$IP nexthop replace id 101 group 1"
2336 run_cmd "$IP nexthop replace id 101 group 1 type mpath"
2339 run_cmd "$IP nexthop replace id 101 group 1 type resilient buckets 1024"
2342 check_nexthop "id 101" \
2343 "id 101 group 1 type resilient buckets 8 idle_timer 512 unbalanced_timer 256 unbalanced_time 0"
2351 run_cmd "$IP nexthop add id 1 dev veth1"
2352 run_cmd "$IP nexthop add id 2 dev veth3"
2353 run_cmd "$IP nexthop add id 101 group 1/2 type resilient buckets 4"
2354 run_cmd "$IP nexthop add id 201 group 1/2"
2357 "id 101 index 0 nhid 2 id 101 index 1 nhid 2 id 101 index 2 nhid 1 id 101 index 3 nhid 1"
2360 check_nexthop_bucket "list id 101" \
2361 "id 101 index 0 nhid 2 id 101 index 1 nhid 2 id 101 index 2 nhid 1 id 101 index 3 nhid 1"
2365 (( $($IP -j nexthop bucket list id 101 |
2371 "id 101 index 2 nhid 1 id 101 index 3 nhid 1"
2375 "id 101 index 0 nhid 2 id 101 index 1 nhid 2"
2378 run_cmd "$IP nexthop bucket list id 111"
2381 run_cmd "$IP nexthop bucket list id 201"
2393 # Dump should not loop endlessly when maximum nexthop ID is configured.
2394 run_cmd "$IP nexthop add id $((2**32-1)) group 1/2 type resilient buckets 4"
2396 log_test $? 0 "Maximum nexthop ID dump"
2402 check_nexthop_bucket "get id 101 index 0" "id 101 index 0 nhid 2"
2405 run_cmd "$IP nexthop bucket get id 101 index 999"
2408 run_cmd "$IP nexthop bucket get id 201 index 0"
2411 run_cmd "$IP nexthop bucket get id 999 index 0"
2420 run_cmd "$IP nexthop add id 1 dev veth1"
2421 run_cmd "$IP nexthop add id 2 dev veth3"
2422 run_cmd "$IP nexthop add id 101
2426 check_nexthop_buckets_balance "list id 101" \
2431 run_cmd "$IP nexthop replace id 101
2433 check_nexthop_buckets_balance "list id 101" \
2439 run_cmd "$IP nexthop replace id 101
2442 run_cmd "$IP nexthop replace id 101
2444 check_nexthop_buckets_balance "list id 101" \
2498 if [ "$(id -u)" -ne 0 ];then