Commit 0d1ddfe
committed
[gve] Cancel pending transmissions when closing device
We cancel any pending transmissions when (re)starting the device since
any transmissions that were initiated before the admin queue reset
will not complete.
The network device core will also cancel any pending transmissions
after the device is closed. If the device is closed with some
transmissions still pending and is then reopened, this will therefore
result in a stale I/O buffer being passed to netdev_tx_complete_err()
when the device is restarted.
This error has not been observed in practice since transmissions
generally complete almost immediately and it is therefore unlikely
that the device will ever be closed with transmissions still pending.
With out-of-order queues, the device seems to delay transmit
completions (with no upper time limit) until a complete batch is
available to be written out as a block of 128 bytes. It is therefore
very likely that the device will be closed with transmissions still
pending.
Fix by ensuring that we have dropped all references to transmit I/O
buffers before returning from gve_close().
Signed-off-by: Michael Brown <[email protected]>1 parent cf53497 commit 0d1ddfe
1 file changed
+20
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1073 | 1073 | | |
1074 | 1074 | | |
1075 | 1075 | | |
1076 | | - | |
| 1076 | + | |
1077 | 1077 | | |
1078 | 1078 | | |
1079 | | - | |
1080 | 1079 | | |
1081 | | - | |
| 1080 | + | |
1082 | 1081 | | |
1083 | | - | |
1084 | | - | |
1085 | 1082 | | |
1086 | 1083 | | |
1087 | | - | |
1088 | 1084 | | |
1089 | 1085 | | |
1090 | 1086 | | |
| |||
1094 | 1090 | | |
1095 | 1091 | | |
1096 | 1092 | | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
1097 | 1108 | | |
1098 | 1109 | | |
1099 | 1110 | | |
| |||
1307 | 1318 | | |
1308 | 1319 | | |
1309 | 1320 | | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1310 | 1324 | | |
1311 | 1325 | | |
1312 | 1326 | | |
| |||
0 commit comments