Commit d59ac2d
viona: support (enough)
* viona: support (enough) `VIRTIO_NET_F_CTRL_RX` to remove promisc
Closes #1122.
* Actually get it all working.
Well, that was an adventure.
Closes 1127.
* Actually move filter tables and associated state during migration.
* Review feedback.
* Clippy..
* Debugging...
* Got it.
* Ensure we unset the control queue if we re-init without CTRL_VQ
* do reset is_control with the rest of the queue
having `is_control` survive across reset is benign but might be
confusing for debugging: after a device reset the previous control
queue(s[^1]) remains "is_control: true" all the way until a VirtIO
driver negotiates features and has prompted us to set new control
queues. In the case of viona, if we tried to manage (say, pause) queues
before feature negotiation was complete, we've left a more complicated
situation to think through!
instead, we can clear `is_control` on reset, but doing so exposes a bug.
reset_queues_locked() would drive the queue state change *after*
clearing queue state, but queue_change() itself uses queue state to
operate correctly. if queue_change() wanted to tear down Propolis-side
bookkeeping (or debugging, logging, ...) we'll have removed necessary
data before giving it a chance to do its job.
so, `VirtQueue::reset` should come *after* a successful queue_change().
this has the mild benefit(?) of if we've failed to reset the queue we'll
leave it as it was. might be helpful for debugging the erroneous case?
* drivers which request their own MAC and others do need promisc
* `needed_promisc` should treat an empty unicast list as non-promisc.
* Missed a multiqueue bug...
* Fixup iopair calculation during import.
* Test that `num_queues` is static, device control queue is correct
---------
Co-authored-by: iximeow <iximeow@oxide.computer>VIRTIO_NET_F_CTRL_RX to leave all-multicast mode (#1125)1 parent fa39721 commit d59ac2d
4 files changed
Lines changed: 694 additions & 146 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
534 | 541 | | |
535 | 542 | | |
536 | 543 | | |
| |||
1161 | 1168 | | |
1162 | 1169 | | |
1163 | 1170 | | |
1164 | | - | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
1165 | 1174 | | |
1166 | 1175 | | |
1167 | 1176 | | |
| 1177 | + | |
1168 | 1178 | | |
1169 | 1179 | | |
1170 | 1180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | | - | |
| 196 | + | |
| 197 | + | |
196 | 198 | | |
197 | 199 | | |
198 | | - | |
| 200 | + | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| |||
326 | 328 | | |
327 | 329 | | |
328 | 330 | | |
| 331 | + | |
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
| |||
348 | 351 | | |
349 | 352 | | |
350 | 353 | | |
351 | | - | |
352 | | - | |
| 354 | + | |
| 355 | + | |
353 | 356 | | |
354 | 357 | | |
355 | 358 | | |
| |||
564 | 567 | | |
565 | 568 | | |
566 | 569 | | |
567 | | - | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
568 | 573 | | |
569 | 574 | | |
570 | 575 | | |
| |||
786 | 791 | | |
787 | 792 | | |
788 | 793 | | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
789 | 854 | | |
790 | 855 | | |
791 | 856 | | |
| |||
808 | 873 | | |
809 | 874 | | |
810 | 875 | | |
| 876 | + | |
811 | 877 | | |
812 | 878 | | |
813 | 879 | | |
| |||
1030 | 1096 | | |
1031 | 1097 | | |
1032 | 1098 | | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
1033 | 1110 | | |
1034 | | - | |
| 1111 | + | |
1035 | 1112 | | |
1036 | 1113 | | |
1037 | 1114 | | |
| |||
1055 | 1132 | | |
1056 | 1133 | | |
1057 | 1134 | | |
1058 | | - | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
1069 | 1135 | | |
1070 | | - | |
1071 | | - | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1072 | 1140 | | |
1073 | 1141 | | |
1074 | 1142 | | |
1075 | | - | |
1076 | | - | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
1077 | 1148 | | |
1078 | 1149 | | |
1079 | 1150 | | |
1080 | 1151 | | |
1081 | 1152 | | |
1082 | 1153 | | |
1083 | 1154 | | |
1084 | | - | |
1085 | | - | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
1086 | 1160 | | |
1087 | 1161 | | |
1088 | 1162 | | |
| |||
0 commit comments