mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/jasonwang/tags/net-pull-request' into staging
# gpg: Signature made Thu 04 Nov 2021 11:42:00 PM EDT # gpg: using RSA key EF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * remotes/jasonwang/tags/net-pull-request: Fix virtio-net-pci* "vectors" compat e1000: fix tx re-entrancy problem Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ GlobalProperty hw_compat_5_2[] = {
|
||||
{ "ICH9-LPC", "smm-compat", "on"},
|
||||
{ "PIIX4_PM", "smm-compat", "on"},
|
||||
{ "virtio-blk-device", "report-discard-granularity", "off" },
|
||||
{ "virtio-net-pci", "vectors", "3"},
|
||||
{ "virtio-net-pci-base", "vectors", "3"},
|
||||
};
|
||||
const size_t hw_compat_5_2_len = G_N_ELEMENTS(hw_compat_5_2);
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ struct E1000State_st {
|
||||
e1000x_txd_props props;
|
||||
e1000x_txd_props tso_props;
|
||||
uint16_t tso_frames;
|
||||
bool busy;
|
||||
} tx;
|
||||
|
||||
struct {
|
||||
@@ -763,6 +764,11 @@ start_xmit(E1000State *s)
|
||||
return;
|
||||
}
|
||||
|
||||
if (s->tx.busy) {
|
||||
return;
|
||||
}
|
||||
s->tx.busy = true;
|
||||
|
||||
while (s->mac_reg[TDH] != s->mac_reg[TDT]) {
|
||||
base = tx_desc_base(s) +
|
||||
sizeof(struct e1000_tx_desc) * s->mac_reg[TDH];
|
||||
@@ -789,6 +795,7 @@ start_xmit(E1000State *s)
|
||||
break;
|
||||
}
|
||||
}
|
||||
s->tx.busy = false;
|
||||
set_ics(s, 0, cause);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user