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

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@xxxxxxxxxx> 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.