All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Mateus Krepsky Ludwich <mkludwich@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] eepro100: Frame Reception
Date: Thu, 22 Sep 2016 10:02:28 +0800	[thread overview]
Message-ID: <6a791c96-d60f-9ba5-867b-4c5c3c5fbaa9@redhat.com> (raw)
In-Reply-To: <CA+dP78E4Sv32xZCT=nCcK+Vn=38fqvCuRA76wgXX+-BQUcJ+Lw@mail.gmail.com>



On 2016年08月24日 00:46, Mateus Krepsky Ludwich wrote:
> Changed E100 device so it updates EOF, F, and Actual Count fields of Receive
> Frame Descriptor (RFD).

Actual Count fields were updated before this patch I think?

> Assuming RFD.actual_count equals to size.
>
> Signed-off-by: Mateus Krepsky Ludwich <mkludwich@gmail.com>
> ---
>   hw/net/eepro100.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
> index bab4dbf..c0f3816 100644
> --- a/hw/net/eepro100.c
> +++ b/hw/net/eepro100.c
> @@ -1739,6 +1739,7 @@ static ssize_t nic_receive(NetClientState *nc,
> const uint8_t * buf, size_t size)
>                    &rx, sizeof(eepro100_rx_t));
>       uint16_t rfd_command = le16_to_cpu(rx.command);
>       uint16_t rfd_size = le16_to_cpu(rx.size);
> +    uint16_t rfd_count = size | 0xc000 ; /* Setting EOF and F bits */
>
>       if (size > rfd_size) {
>           logout("Receive buffer (%" PRId16 " bytes) too small for data "
> @@ -1756,6 +1757,8 @@ static ssize_t nic_receive(NetClientState *nc,
> const uint8_t * buf, size_t size)
>                   offsetof(eepro100_rx_t, status), rfd_status);
>       stw_le_pci_dma(&s->dev, s->ru_base + s->ru_offset +
>                   offsetof(eepro100_rx_t, count), size);

Then this line can be removed, or what's maybe even better, you can just 
reuse rfd_size.

> +    stw_le_pci_dma(&s->dev, s->ru_base + s->ru_offset +
> +                offsetof(eepro100_rx_t, count), rfd_count);
>       /* Early receive interrupt not supported. */
>   #if 0
>       eepro100_er_interrupt(s);

We need a better title, e.g "Fixing EOF and F filed when updating RFD"

Thanks

      parent reply	other threads:[~2016-09-22  2:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23 16:46 [Qemu-devel] [PATCH] eepro100: Frame Reception Mateus Krepsky Ludwich
2016-09-07  0:39 ` Mateus Krepsky Ludwich
2016-09-22  2:02 ` Jason Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a791c96-d60f-9ba5-867b-4c5c3c5fbaa9@redhat.com \
    --to=jasowang@redhat.com \
    --cc=mkludwich@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.