xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Malcolm Crossley <malcolm.crossley@citrix.com>
To: xen-devel@lists.xen.org
Subject: Re: [PATCH 2/6] xen-netfront: reduce gso_max_size to account for ethernet header
Date: Mon, 25 Mar 2013 13:54:29 +0000	[thread overview]
Message-ID: <51505715.9000607@citrix.com> (raw)
In-Reply-To: <1364209702-12437-3-git-send-email-wei.liu2@citrix.com>

On 25/03/13 11:08, Wei Liu wrote:
> The maximum packet including ethernet header that can be handled by netfront /
> netback wire format is 65535. Reduce gso_max_size accordingly.
>
> Drop skb and print warning when skb->len > 65535. This can 1) save the effort
> to send malformed packet to netback, 2) help spotting misconfiguration of
> netfront in the future.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ---
>
> index 5527663..3ae9dc1 100644
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -1362,6 +1374,8 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
>   	SET_ETHTOOL_OPS(netdev, &xennet_ethtool_ops);
>   	SET_NETDEV_DEV(netdev, &dev->dev);
>   
> +	netif_set_gso_max_size(netdev, 65535 - ETH_HLEN);
Is it worth ETH_HLEN actually being VLAN_ETH_HLEN so that we can support 
VLAN's and GSO?
> +
>   	np->netdev = netdev;
>   
>   	netif_carrier_off(netdev);

  parent reply	other threads:[~2013-03-25 13:54 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1364209702-12437-1-git-send-email-wei.liu2@citrix.com>
2013-03-25 11:08 ` [PATCH 1/6] xen-netfront: remove unused variable `extra' Wei Liu
2013-03-25 11:08 ` [PATCH 2/6] xen-netfront: reduce gso_max_size to account for ethernet header Wei Liu
2013-03-25 11:08 ` [PATCH 3/6] xen-netfront: frags -> slots in xennet_get_responses Wei Liu
2013-03-25 11:08 ` [PATCH 4/6] xen-netback: remove skb in xen_netbk_alloc_page Wei Liu
2013-03-25 11:08 ` [PATCH 5/6] xen-netback: coalesce slots before copying Wei Liu
2013-03-25 11:08 ` [PATCH 6/6] xen-netback: don't disconnect frontend when seeing oversize frame Wei Liu
     [not found] ` <1364209702-12437-7-git-send-email-wei.liu2@citrix.com>
2013-03-25 11:47   ` David Vrabel
     [not found]   ` <51503945.6040204@citrix.com>
2013-03-25 12:00     ` Wei Liu
2013-03-25 12:53   ` Jan Beulich
     [not found]   ` <515056F502000078000C8184@nat28.tlf.novell.com>
2013-03-25 13:52     ` Wei Liu
2013-03-25 16:21   ` David Miller
2013-03-25 16:58   ` Konrad Rzeszutek Wilk
     [not found]   ` <20130325165834.GC25740@phenom.dumpdata.com>
2013-03-27 10:03     ` William Dauchy
     [not found] ` <1364209702-12437-3-git-send-email-wei.liu2@citrix.com>
2013-03-25 13:54   ` Malcolm Crossley [this message]
2013-03-25 14:23   ` [PATCH 2/6] xen-netfront: reduce gso_max_size to account for ethernet header David Vrabel
     [not found]   ` <51505DF9.4080406@citrix.com>
2013-03-25 14:39     ` Jan Beulich
2013-03-25 15:50   ` Sergei Shtylyov
2013-03-25 16:18   ` David Miller
2013-03-25 16:56   ` Konrad Rzeszutek Wilk
     [not found]   ` <20130325.121809.2023305728304341952.davem@davemloft.net>
2013-03-25 16:54     ` Eric Dumazet
     [not found]     ` <1364230472.29473.21.camel@edumazet-glaptop>
2013-03-25 16:59       ` David Miller
     [not found]       ` <20130325.125949.1046297562456662826.davem@davemloft.net>
2013-03-25 17:24         ` Eric Dumazet
2013-03-25 20:49         ` Ben Hutchings
2013-03-25 18:32     ` Wei Liu
     [not found]     ` <20130325183206.GA7004@zion.uk.xensource.com>
2013-03-25 18:39       ` David Miller
     [not found]       ` <20130325.143923.762657816602656826.davem@davemloft.net>
2013-03-25 19:09         ` Malcolm Crossley
     [not found] ` <1364209702-12437-4-git-send-email-wei.liu2@citrix.com>
2013-03-25 14:25   ` [PATCH 3/6] xen-netfront: frags -> slots in xennet_get_responses David Vrabel
2013-03-25 16:20   ` David Miller
     [not found] ` <1364209702-12437-2-git-send-email-wei.liu2@citrix.com>
2013-03-25 14:21   ` [PATCH 1/6] xen-netfront: remove unused variable `extra' David Vrabel
2013-03-25 16:20   ` David Miller
     [not found] ` <1364209702-12437-5-git-send-email-wei.liu2@citrix.com>
2013-03-25 16:20   ` [PATCH 4/6] xen-netback: remove skb in xen_netbk_alloc_page David Miller
     [not found] ` <1364209702-12437-6-git-send-email-wei.liu2@citrix.com>
2013-03-25 15:13   ` [PATCH 5/6] xen-netback: coalesce slots before copying David Vrabel
     [not found]   ` <5150699C.6080209@citrix.com>
2013-03-25 15:47     ` Wei Liu
     [not found]     ` <CAOsiSVUNO0FQkfJWjv9bcoMgKNnHu4XYciz61hG3YNFzZNxK3w@mail.gmail.com>
2013-03-25 16:34       ` David Vrabel
     [not found]       ` <51507C9B.3080109@citrix.com>
2013-03-25 16:58         ` Wei Liu
2013-03-25 17:06           ` Wei Liu
2013-03-25 18:29           ` David Vrabel
     [not found]           ` <51509789.8090608@citrix.com>
2013-03-25 19:09             ` Wei Liu
     [not found]             ` <20130325190911.GC7004@zion.uk.xensource.com>
2013-03-26  9:16               ` Paul Durrant
2013-03-26 10:52               ` James Harper
     [not found]               ` <291EDFCB1E9E224A99088639C4762022013F7D8E0DC6@LONPMAILBOX01.citrite.net>
2013-03-26  9:51                 ` Wei Liu
2013-03-26 11:00                 ` James Harper
     [not found]                 ` <6035A0D088A63A46850C3988ED045A4B3880B4F4@BITCOM1.int.sbss.com.au>
2013-03-26 11:24                   ` Paul Durrant
2013-03-26 11:27                   ` David Laight
     [not found]                   ` <291EDFCB1E9E224A99088639C4762022013F7D8E0E06@LONPMAILBOX01.citrite.net>
2013-03-26 11:29                     ` James Harper
     [not found]                     ` <6035A0D088A63A46850C3988ED045A4B3880B6AE@BITCOM1.int.sbss.com.au>
2013-03-26 11:38                       ` Paul Durrant
     [not found]               ` <6035A0D088A63A46850C3988ED045A4B3880B43D@BITCOM1.int.sbss.com.au>
2013-03-26 11:06                 ` David Vrabel
     [not found]                 ` <5151812F.3080905@citrix.com>
2013-03-26 11:15                   ` James Harper
2013-03-26 11:13               ` David Vrabel
     [not found]               ` <515182E2.50103@citrix.com>
2013-03-26 11:29                 ` Wei Liu
2013-03-25 16:20   ` David Miller
2013-03-25 16:57   ` Konrad Rzeszutek Wilk
2013-03-26 18:02   ` David Vrabel
     [not found]   ` <20130325165746.GB25740@phenom.dumpdata.com>
2013-04-09 15:10     ` Ian Campbell

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=51505715.9000607@citrix.com \
    --to=malcolm.crossley@citrix.com \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).