qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] hw/net/net_tx_pkt: add function to check pkt->max_raw_fr


From: Jason Wang
Subject: Re: [PATCH 1/2] hw/net/net_tx_pkt: add function to check pkt->max_raw_frags
Date: Fri, 31 Jul 2020 11:33:42 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0


On 2020/7/31 上午1:05, Mauro Matteo Cascella wrote:
On Thu, Jul 30, 2020 at 7:28 AM Jason Wang<jasowang@redhat.com>  wrote:
On 2020/7/29 上午12:26, Mauro Matteo Cascella wrote:
On Tue, Jul 28, 2020 at 6:06 AM Jason Wang<jasowang@redhat.com>  wrote:
On 2020/7/28 上午1:08, Mauro Matteo Cascella wrote:
This patch introduces a new function in hw/net/net_tx_pkt.{c,h} to check the
current data fragment against the maximum number of data fragments.
I wonder whether it's better to do the check in
net_tx_pkt_add_raw_fragment() and fail there.
Given the assertion, I assumed the caller is responsible for the
check, but moving the check in net_tx_pkt_add_raw_fragment() totally
makes sense to me.
Want to send a new version for this?
Sure, I'll send a new version. Thank you.

Btw, I find net_tx_pkt_add_raw_fragment() does not unmap dma when
returning to true, is this a bug?
Isn't it unmapped in net_tx_pkt_reset()?
Probably but see how it was used in e1000e, the net_tx_pkt_reset() is
only called when eop is set. Is this a bug?
Yeah it all depends on E1000_TXD_CMD_EOP. Besides, if not set,
e1000e_tx_pkt_send() would never be called. Honestly, I don't know if
this is a reasonable scenario or not.


It's probably fine since anyway e1000e_core_reset() will call net_tx_pkt_reset().

Thanks



Thanks





reply via email to

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