From: Michael Grzeschik <mgr@pengutronix.de>
To: B38611@freescale.com
Cc: netdev@vger.kernel.org, Frank.Li@freescale.com,
davem@davemloft.net, kernel@pengutronix.de
Subject: Re: [PATCH] net: fec: fix rxvlan feature
Date: Mon, 9 Mar 2015 19:21:07 +0100 [thread overview]
Message-ID: <20150309182107.GA24703@pengutronix.de> (raw)
In-Reply-To: <1425920153-13319-1-git-send-email-m.grzeschik@pengutronix.de>
On Mon, Mar 09, 2015 at 05:55:53PM +0100, Michael Grzeschik wrote:
> The patch 1b7bde6d659d30f171259cc2dfba8e5dab34e735
> "net: fec: implement rx_copybreak to improve rx performance"
> changed the code path for the vlan check in fec_enet_rx_queue:
>
> @@ -1417,62 +1486,48 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
> /* If this is a VLAN packet remove the VLAN Tag */
> vlan_packet_rcvd = false;
> if ((ndev->features & NETIF_F_HW_VLAN_CTAG_RX) &&
> fep->bufdesc_ex && (ebdp->cbd_esc & BD_ENET_RX_VLAN)) {
> /* Push and remove the vlan tag */
> struct vlan_hdr *vlan_header =
> (struct vlan_hdr *) (data + ETH_HLEN);
> vlan_tag = ntohs(vlan_header->h_vlan_TCI);
> - pkt_len -= VLAN_HLEN;
>
> vlan_packet_rcvd = true;
> +
> + skb_copy_to_linear_data_offset(skb, VLAN_HLEN,
> + data, (2 * ETH_ALEN));
> + skb_pull(skb, VLAN_HLEN);
> }
>
> With the call of skb_copy_to_linear_data_offset the code here is doing more
> than previously and is breaking the rxvlan feature. This patch removes this
> call to fix it.
>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> ---
> drivers/net/ethernet/freescale/fec_main.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 9bb6220..77dd539 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1479,8 +1479,6 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
>
> vlan_packet_rcvd = true;
>
> - skb_copy_to_linear_data_offset(skb, VLAN_HLEN,
> - data, (2 * ETH_ALEN));
I was reviewing the surrounding code of the mentioned code. AFAIK I am
pretty sure that this had ment to be another call: (to vs. from)
+ skb_copy_from_linear_data_offset(skb, VLAN_HLEN,
+ data, (2 * ETH_ALEN));
I will test it tomorrow morning, as I currently have no hardware for
today.
Regards,
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2015-03-09 18:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 16:55 [PATCH] net: fec: fix rxvlan feature Michael Grzeschik
2015-03-09 18:21 ` Michael Grzeschik [this message]
2015-03-10 2:21 ` fugang.duan
2015-03-10 2:42 ` David Miller
2015-03-10 3:29 ` fugang.duan
2015-03-10 9:39 ` Michael Grzeschik
2015-03-10 10:02 ` fugang.duan
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=20150309182107.GA24703@pengutronix.de \
--to=mgr@pengutronix.de \
--cc=B38611@freescale.com \
--cc=Frank.Li@freescale.com \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=netdev@vger.kernel.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).