aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-07-06 10:41:34 +0530
committerRichard Henderson <richard.henderson@linaro.org>2022-07-06 10:41:34 +0530
commit180c2f24d5e8eada41e012a3899d29bb695aae06 (patch)
treeb4eb8985f6c74e87d8fab963e36b085690e29fdf
parent39e19f5f67d925c60278a6156fd1776d04495a93 (diff)
parenta495eba03c31c96d6a0817b13598ce2219326691 (diff)
downloadqemu-180c2f24d5e8eada41e012a3899d29bb695aae06.zip
qemu-180c2f24d5e8eada41e012a3899d29bb695aae06.tar.gz
qemu-180c2f24d5e8eada41e012a3899d29bb695aae06.tar.bz2
Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging
# -----BEGIN PGP SIGNATURE----- # Version: GnuPG v1 # # iQEcBAABAgAGBQJixQP1AAoJEO8Ells5jWIRAsEH/jDlZa1m8jM7vGn6VVUhC6gR # wnwMZVVrg/N+P6614dQ6jFEhTL52AhNONCwl+nzKZDksWMtkX/Owy3DEx0HqXk3m # DyQyI5ngBiRPOOOlgyVHMyc304TFmf9qh4Cz80o5UNsI50lpLMA/vpwgK3zz/KXZ # V6d5C3+kL2y7l5dmHuASiUD8xRTQvDn3/mY94VNzwU36uqODwAizm6Ft6ohTkvdO # WtPQ9AXiVUyHigCxX4r7l9vZjBw0sobVYS1TEoagB2wiEpwTnOYbPhGntBP1eMzv # E1Wf2tJbz67SP+DHuUCrrUyFaDCVLmG7IAh44wIoK4XCGqfrjTxwUftvo1XZ6Gk= # =yqUz # -----END PGP SIGNATURE----- # gpg: Signature made Wed 06 Jul 2022 09:09:33 AM +0530 # gpg: using RSA key EF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * tag 'net-pull-request' of https://github.com/jasowang/qemu: ebpf: replace deprecated bpf_program__set_socket_filter e1000: set RX descriptor status in a separate operation Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--ebpf/ebpf_rss.c2
-rw-r--r--hw/net/e1000.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/ebpf/ebpf_rss.c b/ebpf/ebpf_rss.c
index 118c68d..cee658c 100644
--- a/ebpf/ebpf_rss.c
+++ b/ebpf/ebpf_rss.c
@@ -49,7 +49,7 @@ bool ebpf_rss_load(struct EBPFRSSContext *ctx)
goto error;
}
- bpf_program__set_socket_filter(rss_bpf_ctx->progs.tun_rss_steering_prog);
+ bpf_program__set_type(rss_bpf_ctx->progs.tun_rss_steering_prog, BPF_PROG_TYPE_SOCKET_FILTER);
if (rss_bpf__load(rss_bpf_ctx)) {
trace_ebpf_error("eBPF RSS", "can not load RSS program");
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index f5bc812..e26e0a6 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -979,7 +979,7 @@ e1000_receive_iov(NetClientState *nc, const struct iovec *iov, int iovcnt)
base = rx_desc_base(s) + sizeof(desc) * s->mac_reg[RDH];
pci_dma_read(d, base, &desc, sizeof(desc));
desc.special = vlan_special;
- desc.status |= (vlan_status | E1000_RXD_STAT_DD);
+ desc.status &= ~E1000_RXD_STAT_DD;
if (desc.buffer_addr) {
if (desc_offset < size) {
size_t iov_copy;
@@ -1013,6 +1013,9 @@ e1000_receive_iov(NetClientState *nc, const struct iovec *iov, int iovcnt)
DBGOUT(RX, "Null RX descriptor!!\n");
}
pci_dma_write(d, base, &desc, sizeof(desc));
+ desc.status |= (vlan_status | E1000_RXD_STAT_DD);
+ pci_dma_write(d, base + offsetof(struct e1000_rx_desc, status),
+ &desc.status, sizeof(desc.status));
if (++s->mac_reg[RDH] * sizeof(desc) >= s->mac_reg[RDLEN])
s->mac_reg[RDH] = 0;