On 2022/7/4 15:10, Jason Wang wrote:

在 2022/6/29 17:40, Ding Hui 写道:
@@ -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));


Good catch, but to be more safe, I wonder if we can simply use stx_le_pci_dma() here?


Do you mean stb_le_pci_dma(d, base + offsetof(struct e1000_rx_desc, status), desc.status, MEMTXATTRS_UNSPECIFIED)?

I checked both pci_dma_write() and stb_le_pci_dma(), there is no difference between them, but I'm not sure whether it is proper to mixed use address based api and value based api, besides that it's OK to me.

Thanks for reply.

--
Thanks,
- Ding Hui



Reply via email to