qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] e1000: set RX descriptor status in a separate operation


From: Ding Hui
Subject: Re: [PATCH] e1000: set RX descriptor status in a separate operation
Date: Mon, 4 Jul 2022 17:04:54 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0

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

[Prev in Thread] Current Thread [Next in Thread]