[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <515056F502000078000C8184@nat28.tlf.novell.com>
Date: Mon, 25 Mar 2013 12:53:57 +0000
From: "Jan Beulich" <JBeulich@...e.com>
To: "Wei Liu" <wei.liu2@...rix.com>
Cc: <david.vrabel@...rix.com>, <ian.campbell@...rix.com>,
<xen-devel@...ts.xen.org>, <annie.li@...cle.com>,
<konrad.wilk@...cle.com>, <netdev@...r.kernel.org>
Subject: Re: [Xen-devel] [PATCH 6/6] xen-netback: don't disconnect
frontend when seeing oversize frame
>>> On 25.03.13 at 12:08, Wei Liu <wei.liu2@...rix.com> wrote:
> @@ -947,10 +949,21 @@ static int netbk_count_requests(struct xenvif *vif,
>
> memcpy(txp, RING_GET_REQUEST(&vif->tx, cons + slots),
> sizeof(*txp));
> - if (txp->size > first->size) {
> - netdev_err(vif->dev, "Packet is bigger than frame.\n");
> - netbk_fatal_tx_err(vif);
> - return -EIO;
> +
> + /* If the guest submitted a frame >= 64 KiB then
> + * first->size overflowed and following slots will
> + * appear to be larger than the frame.
> + *
> + * This cannot be fatal error as there are buggy
> + * frontends that do this.
> + *
> + * Consume all slots and drop the packet.
> + */
> + if (!drop && txp->size > first->size) {
> + if (net_ratelimit())
> + netdev_dbg(vif->dev,
> + "Packet is bigger than frame.\n");
> + drop = true;
So this deals with one half of the problem, but shouldn't we also
revert the disconnect when slots would exceed MAX_SKB_FRAGS
(or max_skb_slots after patch 5)? Afaict you could trivially extend
this patch to also cover that case...
Jan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists