Netdev List
 help / color / mirror / Atom feed
From: "Frans van de Wiel" <fvdw@fvdw.eu>
To: <netdev@vger.kernel.org>
Subject: mv643xxx_eth driver, failed to linearize skb with tiny unaligned fragment
Date: Wed, 28 Sep 2016 22:37:23 +0200	[thread overview]
Message-ID: <9ABBF443071A48919A5E612F97EE0B09@FransW7> (raw)

We compiled kernel 4.6.6 for our nas devices running on ARM kirkwood cpu’s. 
These nas devices have only 256 MB of RAM so limited memory resources
When we fully load the cpu and are copying files via the interface we get 
frequently this “ error” message in dmesg log

[ 1978.149929] mv643xx_eth_port mv643xx_eth_port.0 eth0: failed to linearize 
skb with tiny unaligned fragment
[ 1978.150138] mv643xx_eth_port mv643xx_eth_port.0 eth0: failed to linearize 
skb with tiny unaligned fragment
[ 1978.150318] mv643xx_eth_port mv643xx_eth_port.0 eth0: failed to linearize 
skb with tiny unaligned fragment
[ 1978.150360] mv643xx_eth_port mv643xx_eth_port.0 eth0: failed to linearize 
skb with tiny unaligned fragment

...

CPU[|||||||||||||||||||||||||||||||||||98.9%]     Tasks: 29, 0 thr; 2 
running
  Mem[||||||||||||||||||||||||||||||||30/244MB]     Load average: 1.36 1.29 
0.92
  Swp[                                 0/511MB]     Uptime: 00:38:11

We analyzed the driver code code and think that it does not seems to be an 
error but a warning, this we want to verify and if this warning can be taken 
out without risk

The message originates from this part of the code of the driver

1023 if (has_tiny_unaligned_frags(skb) && __skb_linearize(skb)) {
1024                 netdev_printk(KERN_DEBUG, dev,
1025                               "failed to linearize skb with tiny 
unaligned fragment\n");
1026                 return NETDEV_TX_BUSY;
1027         }

__skb_linearize is set in skbuff.h and comments are useful

static inline int __skb_linearize(struct sk_buff *skb)
1636 {
1637         return __pskb_pull_tail(skb, skb->data_len) ? 0 : -ENOMEM;
1638 }
1639
1640 /**
1641  *      skb_linearize - convert paged skb to linear one
1642  *      @skb: buffer to linarize
1643  *
1644  *      If there is no free memory -ENOMEM is returned, otherwise zero
1645  *      is returned and the old skb data released.
1646  */
1647 static inline int skb_linearize(struct sk_buff *skb)
1648 {

So return a false state (0) if there is enough free memory and true on the 
other case.

Please to note mv643xx_eth.c returns also a busy state. So I assume on this 
case the driver repeats this step up to success

So in my opinion, this is not an error message but a warning and does not 
mean corrupted data and I think is should be possible to remove it.
Is conclusion is correct ?

             reply	other threads:[~2016-09-28 20:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 20:37 Frans van de Wiel [this message]
2016-09-28 23:04 ` mv643xxx_eth driver, failed to linearize skb with tiny unaligned fragment Eric Dumazet
2016-10-01 12:35   ` Frans van de Wiel

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=9ABBF443071A48919A5E612F97EE0B09@FransW7 \
    --to=fvdw@fvdw.eu \
    --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