netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* igb driver triggers BUILD_BUG_ON on s390
@ 2013-03-09 10:00 Heiko Carstens
  2013-03-11 15:47 ` Alexander Duyck
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Carstens @ 2013-03-09 10:00 UTC (permalink / raw)
  To: Alexander Duyck, Jeff Kirsher; +Cc: netdev, David S. Miller

git commit 74e238ead "igb: Support using build_skb in the case that
jumbo frames are disabled" added a BUILD_BUG_ON() to the igb drivers
which triggers on s390:

drivers/net/ethernet/intel/igb/igb_main.c:6231:2:
error: call to ‘__compiletime_assert_6235’ declared with attribute error:
  BUILD_BUG_ON failed: SKB_WITH_OVERHEAD(IGB_RX_BUFSZ) <
    (NET_SKB_PAD + NET_IP_ALIGN + IGB_TS_HDR_LEN + ETH_FRAME_LEN + ETH_FCS_LEN)

This happens mainly because s390 has an unusual large L1_CACHE_BYTES aka
SMP_CACHE_BYTES define with 256 Bytes.

The BUILD_BUG_ON(..) translates to (taken from .i file):

__cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + (256 - 1)) & ~(256 - 1))) < (32 + 2 + 16 + 1514 + 4)));

With sizeof(struct skb_shared_info) == 320 we end up with

BUILD_BUG_ON((2048 - 512 = 1536) < 1568)

One possible solution would be to simply disable the driver on s390.
Any opinions?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-12  6:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-09 10:00 igb driver triggers BUILD_BUG_ON on s390 Heiko Carstens
2013-03-11 15:47 ` Alexander Duyck
2013-03-12  6:59   ` Heiko Carstens

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).