From: Eric Dumazet <eric.dumazet@gmail.com>
To: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: add support for STMicroelectronics Ethernet controllers.
Date: Wed, 14 Oct 2009 06:07:13 +0200 [thread overview]
Message-ID: <4AD54E71.7070400@gmail.com> (raw)
In-Reply-To: <4AD47425.7050003@st.com>
Giuseppe CAVALLARO a écrit :
> Hi Eric,
>
> Giuseppe CAVALLARO wrote:
>> I'm going to post a new patch for the stmmac as soon as I fix all these
>> points.
>
> Hoping to have well followed all your advice, I'm attaching the
> patch again.
>
> As you will see, I've reviewed the tx clean process by removing the
> wrong check that improperly impacted the poll logic.
> I've noticed an improvement in terms of performances as well (*).
> Taking as example the tg3 driver, I've reviewed and modified the
> locking mechanism (fixing the issue on tso you had raised).
>
> Please, let me know if you have other suggestions and/or advice.
>
> Regards,
> Peppe
>
>
> P.S. (*)
> I've just done some stress tests on our STB (mb618 - STi7111 SH4-300
> @450MHz) and I cannot see any failures or strange issues at this time.
>
Hi Giuseppe
I reviewed your code and found no obvious issues
Could you please avoid defining this
#define STMMAC_IP_ALIGN NET_IP_ALIGN
(I see tg3.c uses a similar TG3_RAW_IP_ALIGN, this is probably why you felt it was necessary :
In case of tg3, TG3_RAW_IP_ALIGN is used in cases where we always want to align the
IP/network header on dword boundaries, even on platforms where NET_IP_ALIGN)
I am not sure this is what you want for STM.
In that case, please check new netdev_alloc_skb_ip_align() helper
+ skb = netdev_alloc_skb(dev, bfsize);
+ if (unlikely(skb == NULL)) {
+ pr_err("%s: Rx init fails; skb is NULL\n",
+ __func__);
+ break;
+ }
+ skb_reserve(skb, STMMAC_IP_ALIGN);
+
+ priv->rx_skbuff[i] = skb;
+ priv->rx_skbuff_dma[i] = dma_map_single(priv->device,
+ skb->data,
+ bfsize - STMMAC_IP_ALIGN,
+ DMA_FROM_DEVICE);
becomes (pktsize being real packet size, not packet size + NET_IP_ALIGN)
+ skb = netdev_alloc_skb_ip_align(dev, pktsize);
+ if (unlikely(skb == NULL)) {
+ pr_err("%s: Rx init fails; skb is NULL\n",
+ __func__);
+ break;
+ }
+
+ priv->rx_skbuff[i] = skb;
+ priv->rx_skbuff_dma[i] = dma_map_single(priv->device,
+ skb->data,
+ pktsize,
+ DMA_FROM_DEVICE);
next prev parent reply other threads:[~2009-10-14 4:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 7:51 [PATCH] net: add support for STMicroelectronics Ethernet controllers Giuseppe CAVALLARO
2009-10-06 10:27 ` Eric Dumazet
2009-10-06 12:38 ` Giuseppe CAVALLARO
2009-10-06 13:35 ` Eric Dumazet
2009-10-06 13:42 ` Giuseppe CAVALLARO
2009-10-13 12:35 ` Giuseppe CAVALLARO
2009-10-14 4:07 ` Eric Dumazet [this message]
2009-10-14 6:58 ` Giuseppe CAVALLARO
2009-10-14 22:14 ` David Miller
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=4AD54E71.7070400@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
/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.