* Re: [next:akpm 16/587] 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) [not found] <5122101a.nBjTqFyZXZ+WuzPr%fengguang.wu@intel.com> @ 2013-02-19 22:27 ` Andrew Morton 2013-02-19 22:30 ` [next:akpm 16/587] 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 Allan, Bruce W 2013-02-19 23:02 ` [next:akpm 16/587] 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 Wyborny, Carolyn 0 siblings, 2 replies; 11+ messages in thread From: Andrew Morton @ 2013-02-19 22:27 UTC (permalink / raw) To: kbuild test robot Cc: Daniel Santos, Jeff Kirsher, Jesse Brandeburg, Bruce Allan, netdev On Mon, 18 Feb 2013 19:27:22 +0800 kbuild test robot <fengguang.wu@intel.com> wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm > head: ae9da2a24a80423b8dbda9c5a72674ce6e7861be > commit: f7d7e38e6df399b2af7f04c177054abdd744a077 [16/587] bug.h, compiler.h: Introduce compiletime_assert & BUILD_BUG_ON_MSG > config: make ARCH=s390 allmodconfig > > All error/warnings: > > In function 'igb_build_rx_buffer', > inlined from 'igb_clean_rx_irq' at drivers/net/ethernet/intel/igb/igb_main.c:6705:8: > >> 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) > > vim +/__compiletime_assert_6235 +6231 drivers/net/ethernet/intel/igb/igb_main.c > > 6225 #endif > 6226 > 6227 /* If we spanned a buffer we have a huge mess so test for it */ > 6228 BUG_ON(unlikely(!igb_test_staterr(rx_desc, E1000_RXD_STAT_EOP))); > 6229 > 6230 /* Guarantee this function can be used by verifying buffer sizes */ > > 6231 BUILD_BUG_ON(SKB_WITH_OVERHEAD(IGB_RX_BUFSZ) < (NET_SKB_PAD + > 6232 NET_IP_ALIGN + > 6233 IGB_TS_HDR_LEN + > 6234 ETH_FRAME_LEN + > That BUILD_BUG_ON() triggers without Daniel's patches applied as well: CC [M] drivers/net/ethernet/intel/igb/igb_main.o drivers/net/ethernet/intel/igb/igb_main.c: In function 'igb_build_rx_buffer': drivers/net/ethernet/intel/igb/igb_main.c:6231: error: size of array 'type name' is negative I suspect that driver is busted on s390. Dunno why. Here's what cpp emits: s390 allmodconfig: bool __cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + (256 - 1)) & ~(256 - 1))) < (32 + 2 + 16 + 1514 + 4))); x86_64 allmodconfig: bool __cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + ((1 << (6)) - 1)) & ~((1 << (6)) - 1))) < (({ typeof(32) _max1 = (32); typeof((1 << (6))) _max2 = ((1 << (6))); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; }) + 0 + 16 + 1514 + 4))); I doubt if anyone will be running this driver on s390, but I guess we should work out why it broke. ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [next:akpm 16/587] 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... 2013-02-19 22:27 ` [next:akpm 16/587] 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) Andrew Morton @ 2013-02-19 22:30 ` Allan, Bruce W 2013-02-20 1:09 ` Eric Dumazet 2013-02-19 23:02 ` [next:akpm 16/587] 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 Wyborny, Carolyn 1 sibling, 1 reply; 11+ messages in thread From: Allan, Bruce W @ 2013-02-19 22:30 UTC (permalink / raw) To: Andrew Morton, Wu, Fengguang Cc: Daniel Santos, Kirsher, Jeffrey T, Brandeburg, Jesse, netdev@vger.kernel.org, e1000-devel@lists.sourceforge.net > -----Original Message----- > From: Andrew Morton [mailto:akpm@linux-foundation.org] > Sent: Tuesday, February 19, 2013 2:27 PM > To: Wu, Fengguang > Cc: Daniel Santos; Kirsher, Jeffrey T; Brandeburg, Jesse; Allan, Bruce W; > netdev@vger.kernel.org > Subject: Re: [next:akpm 16/587] > 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... > > On Mon, 18 Feb 2013 19:27:22 +0800 > kbuild test robot <fengguang.wu@intel.com> wrote: > > > tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > akpm > > head: ae9da2a24a80423b8dbda9c5a72674ce6e7861be > > commit: f7d7e38e6df399b2af7f04c177054abdd744a077 [16/587] bug.h, > compiler.h: Introduce compiletime_assert & BUILD_BUG_ON_MSG > > config: make ARCH=s390 allmodconfig > > > > All error/warnings: > > > > In function 'igb_build_rx_buffer', > > inlined from 'igb_clean_rx_irq' at > drivers/net/ethernet/intel/igb/igb_main.c:6705:8: > > >> 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) > > > > vim +/__compiletime_assert_6235 +6231 > drivers/net/ethernet/intel/igb/igb_main.c > > > > 6225 #endif > > 6226 > > 6227 /* If we spanned a buffer we have a huge mess so test for it > */ > > 6228 BUG_ON(unlikely(!igb_test_staterr(rx_desc, > E1000_RXD_STAT_EOP))); > > 6229 > > 6230 /* Guarantee this function can be used by verifying buffer > sizes */ > > > 6231 > BUILD_BUG_ON(SKB_WITH_OVERHEAD(IGB_RX_BUFSZ) < > (NET_SKB_PAD + > > 6232 > NET_IP_ALIGN + > > 6233 > IGB_TS_HDR_LEN + > > 6234 > ETH_FRAME_LEN + > > > > That BUILD_BUG_ON() triggers without Daniel's patches applied as well: > > CC [M] drivers/net/ethernet/intel/igb/igb_main.o > drivers/net/ethernet/intel/igb/igb_main.c: In function > 'igb_build_rx_buffer': > drivers/net/ethernet/intel/igb/igb_main.c:6231: error: size of array 'type > name' is negative > > I suspect that driver is busted on s390. Dunno why. Here's what cpp emits: > > > s390 allmodconfig: > > bool __cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + (256 - 1)) & > ~(256 - 1))) < (32 + 2 + 16 + 1514 + 4))); > > > x86_64 allmodconfig: > > bool __cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + ((1 << > (6)) - 1)) & ~((1 << (6)) - 1))) < (({ typeof(32) _max1 = (32); typeof((1 > << (6))) _max2 = ((1 << (6))); (void) (&_max1 == &_max2); _max1 > _max2 ? > _max1 : _max2; }) + 0 + 16 + 1514 + 4))); > > > I doubt if anyone will be running this driver on s390, but I guess we > should work out why it broke. Adding Intel wired ethernet developers mailing list. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [next:akpm 16/587] 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... 2013-02-19 22:30 ` [next:akpm 16/587] 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 Allan, Bruce W @ 2013-02-20 1:09 ` Eric Dumazet 2013-02-20 18:16 ` [E1000-devel] " Alexander Duyck 0 siblings, 1 reply; 11+ messages in thread From: Eric Dumazet @ 2013-02-20 1:09 UTC (permalink / raw) To: Allan, Bruce W Cc: Andrew Morton, Wu, Fengguang, Daniel Santos, Kirsher, Jeffrey T, Brandeburg, Jesse, netdev@vger.kernel.org, e1000-devel@lists.sourceforge.net On Tue, Feb 19, 2013 at 2:30 PM, Allan, Bruce W <bruce.w.allan@intel.com> wrote: >> -----Original Message----- >> From: Andrew Morton [mailto:akpm@linux-foundation.org] >> Sent: Tuesday, February 19, 2013 2:27 PM >> To: Wu, Fengguang >> Cc: Daniel Santos; Kirsher, Jeffrey T; Brandeburg, Jesse; Allan, Bruce W; >> netdev@vger.kernel.org >> Subject: Re: [next:akpm 16/587] >> 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... >> >> On Mon, 18 Feb 2013 19:27:22 +0800 >> kbuild test robot <fengguang.wu@intel.com> wrote: >> >> > tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git >> akpm >> > head: ae9da2a24a80423b8dbda9c5a72674ce6e7861be >> > commit: f7d7e38e6df399b2af7f04c177054abdd744a077 [16/587] bug.h, >> compiler.h: Introduce compiletime_assert & BUILD_BUG_ON_MSG >> > config: make ARCH=s390 allmodconfig >> > >> > All error/warnings: >> > >> > In function 'igb_build_rx_buffer', >> > inlined from 'igb_clean_rx_irq' at >> drivers/net/ethernet/intel/igb/igb_main.c:6705:8: >> > >> 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) >> > >> > vim +/__compiletime_assert_6235 +6231 >> drivers/net/ethernet/intel/igb/igb_main.c >> > >> > 6225 #endif >> > 6226 >> > 6227 /* If we spanned a buffer we have a huge mess so test for it >> */ >> > 6228 BUG_ON(unlikely(!igb_test_staterr(rx_desc, >> E1000_RXD_STAT_EOP))); >> > 6229 >> > 6230 /* Guarantee this function can be used by verifying buffer >> sizes */ >> > > 6231 >> BUILD_BUG_ON(SKB_WITH_OVERHEAD(IGB_RX_BUFSZ) < >> (NET_SKB_PAD + >> > 6232 >> NET_IP_ALIGN + >> > 6233 >> IGB_TS_HDR_LEN + >> > 6234 >> ETH_FRAME_LEN + >> > >> >> That BUILD_BUG_ON() triggers without Daniel's patches applied as well: >> >> CC [M] drivers/net/ethernet/intel/igb/igb_main.o >> drivers/net/ethernet/intel/igb/igb_main.c: In function >> 'igb_build_rx_buffer': >> drivers/net/ethernet/intel/igb/igb_main.c:6231: error: size of array 'type >> name' is negative >> >> I suspect that driver is busted on s390. Dunno why. Here's what cpp emits: >> >> >> s390 allmodconfig: >> >> bool __cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + (256 - 1)) & >> ~(256 - 1))) < (32 + 2 + 16 + 1514 + 4))); >> >> >> x86_64 allmodconfig: >> >> bool __cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + ((1 << >> (6)) - 1)) & ~((1 << (6)) - 1))) < (({ typeof(32) _max1 = (32); typeof((1 >> << (6))) _max2 = ((1 << (6))); (void) (&_max1 == &_max2); _max1 > _max2 ? >> _max1 : _max2; }) + 0 + 16 + 1514 + 4))); >> >> >> I doubt if anyone will be running this driver on s390, but I guess we >> should work out why it broke. > > Adding Intel wired ethernet developers mailing list. > Oh well, NET_SKB_PAD is too large on s390 I guess we should use 64 bytes max. #define NET_SKB_PAD min(64, max(32, L1_CACHE_BYTES)) ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [E1000-devel] [next:akpm 16/587] 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... 2013-02-20 1:09 ` Eric Dumazet @ 2013-02-20 18:16 ` Alexander Duyck 2013-02-20 19:22 ` Eric Dumazet 0 siblings, 1 reply; 11+ messages in thread From: Alexander Duyck @ 2013-02-20 18:16 UTC (permalink / raw) To: Eric Dumazet Cc: Allan, Bruce W, e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org, Brandeburg, Jesse, Daniel Santos, Andrew Morton, Wu, Fengguang On 02/19/2013 05:09 PM, Eric Dumazet wrote: > On Tue, Feb 19, 2013 at 2:30 PM, Allan, Bruce W <bruce.w.allan@intel.com> wrote: >>> -----Original Message----- >>> From: Andrew Morton [mailto:akpm@linux-foundation.org] >>> Sent: Tuesday, February 19, 2013 2:27 PM >>> To: Wu, Fengguang >>> Cc: Daniel Santos; Kirsher, Jeffrey T; Brandeburg, Jesse; Allan, Bruce W; >>> netdev@vger.kernel.org >>> Subject: Re: [next:akpm 16/587] >>> 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... >>> >>> On Mon, 18 Feb 2013 19:27:22 +0800 >>> kbuild test robot <fengguang.wu@intel.com> wrote: >>> >>>> tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git >>> akpm >>>> head: ae9da2a24a80423b8dbda9c5a72674ce6e7861be >>>> commit: f7d7e38e6df399b2af7f04c177054abdd744a077 [16/587] bug.h, >>> compiler.h: Introduce compiletime_assert & BUILD_BUG_ON_MSG >>>> config: make ARCH=s390 allmodconfig >>>> >>>> All error/warnings: >>>> >>>> In function 'igb_build_rx_buffer', >>>> inlined from 'igb_clean_rx_irq' at >>> drivers/net/ethernet/intel/igb/igb_main.c:6705:8: >>>>>> 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) >>>> vim +/__compiletime_assert_6235 +6231 >>> drivers/net/ethernet/intel/igb/igb_main.c >>>> 6225 #endif >>>> 6226 >>>> 6227 /* If we spanned a buffer we have a huge mess so test for it >>> */ >>>> 6228 BUG_ON(unlikely(!igb_test_staterr(rx_desc, >>> E1000_RXD_STAT_EOP))); >>>> 6229 >>>> 6230 /* Guarantee this function can be used by verifying buffer >>> sizes */ >>>>> 6231 >>> BUILD_BUG_ON(SKB_WITH_OVERHEAD(IGB_RX_BUFSZ) < >>> (NET_SKB_PAD + >>>> 6232 >>> NET_IP_ALIGN + >>>> 6233 >>> IGB_TS_HDR_LEN + >>>> 6234 >>> ETH_FRAME_LEN + >>> That BUILD_BUG_ON() triggers without Daniel's patches applied as well: >>> >>> CC [M] drivers/net/ethernet/intel/igb/igb_main.o >>> drivers/net/ethernet/intel/igb/igb_main.c: In function >>> 'igb_build_rx_buffer': >>> drivers/net/ethernet/intel/igb/igb_main.c:6231: error: size of array 'type >>> name' is negative >>> >>> I suspect that driver is busted on s390. Dunno why. Here's what cpp emits: >>> >>> >>> s390 allmodconfig: >>> >>> bool __cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + (256 - 1)) & >>> ~(256 - 1))) < (32 + 2 + 16 + 1514 + 4))); >>> >>> >>> x86_64 allmodconfig: >>> >>> bool __cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + ((1 << >>> (6)) - 1)) & ~((1 << (6)) - 1))) < (({ typeof(32) _max1 = (32); typeof((1 >>> << (6))) _max2 = ((1 << (6))); (void) (&_max1 == &_max2); _max1 > _max2 ? >>> _max1 : _max2; }) + 0 + 16 + 1514 + 4))); >>> >>> >>> I doubt if anyone will be running this driver on s390, but I guess we >>> should work out why it broke. >> Adding Intel wired ethernet developers mailing list. >> > Oh well, NET_SKB_PAD is too large on s390 > > I guess we should use 64 bytes max. > > #define NET_SKB_PAD min(64, max(32, L1_CACHE_BYTES)) The problem is the 256 byte alignment for L1_CACHE_BYTES is increasing the size of the data and shared info significantly pushing us past the 2K limit. I'll look into this since it likely affects ixgbe as well. Thanks, Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [E1000-devel] [next:akpm 16/587] 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... 2013-02-20 18:16 ` [E1000-devel] " Alexander Duyck @ 2013-02-20 19:22 ` Eric Dumazet 2013-02-20 21:23 ` Alexander Duyck 2013-02-21 9:42 ` [E1000-devel] [next:akpm 16/587] 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_HD David Laight 0 siblings, 2 replies; 11+ messages in thread From: Eric Dumazet @ 2013-02-20 19:22 UTC (permalink / raw) To: Alexander Duyck Cc: Allan, Bruce W, e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org, Brandeburg, Jesse, Daniel Santos, Andrew Morton, Wu, Fengguang On Wed, 2013-02-20 at 10:16 -0800, Alexander Duyck wrote: > > The problem is the 256 byte alignment for L1_CACHE_BYTES is increasing > the size of the data and shared info significantly pushing us past the > 2K limit. > > I'll look into this since it likely affects ixgbe as well. Thats what I said. Using 256 bytes of headroom is silly. We should limit NET_SKB_PAD to the 32-64 range ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [E1000-devel] [next:akpm 16/587] 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... 2013-02-20 19:22 ` Eric Dumazet @ 2013-02-20 21:23 ` Alexander Duyck 2013-02-20 21:42 ` Eric Dumazet 2013-02-21 9:42 ` [E1000-devel] [next:akpm 16/587] 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_HD David Laight 1 sibling, 1 reply; 11+ messages in thread From: Alexander Duyck @ 2013-02-20 21:23 UTC (permalink / raw) To: Eric Dumazet Cc: Allan, Bruce W, e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org, Brandeburg, Jesse, Daniel Santos, Andrew Morton, Wu, Fengguang On 02/20/2013 11:22 AM, Eric Dumazet wrote: > On Wed, 2013-02-20 at 10:16 -0800, Alexander Duyck wrote: > >> The problem is the 256 byte alignment for L1_CACHE_BYTES is increasing >> the size of the data and shared info significantly pushing us past the >> 2K limit. >> >> I'll look into this since it likely affects ixgbe as well. > Thats what I said. > > Using 256 bytes of headroom is silly. > > We should limit NET_SKB_PAD to the 32-64 range > > NET_SKB_PAD is defined for the s390. It is already 32. If you look it up we only have 2 definitions for NET_SKB_PAD, one specific to the s390 architecture and the other one in skbuff.h. >From what I can tell we would have to drop the NET_SKB_PAD to 0 in order to not trigger this error with igb since we still have to add 22 bytes for igb's per packet timestamp header, IP alignment, and CRC. The simple fix is for us just to drop the BUILD_BUG_ON check for igb since we already had a check for size check in igb_set_rx_buffer_len. It just means that build_skb won't be available for standard MTU sizes on s390. For ixgbe we can do something similar as well to avoid the BUILD_BUG_ON message. Thanks, Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [E1000-devel] [next:akpm 16/587] 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... 2013-02-20 21:23 ` Alexander Duyck @ 2013-02-20 21:42 ` Eric Dumazet 2013-02-20 22:47 ` Alexander Duyck 0 siblings, 1 reply; 11+ messages in thread From: Eric Dumazet @ 2013-02-20 21:42 UTC (permalink / raw) To: Alexander Duyck Cc: Allan, Bruce W, e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org, Brandeburg, Jesse, Daniel Santos, Andrew Morton, Wu, Fengguang On Wed, 2013-02-20 at 13:23 -0800, Alexander Duyck wrote: > NET_SKB_PAD is defined for the s390. It is already 32. If you look it > up we only have 2 definitions for NET_SKB_PAD, one specific to the s390 > architecture and the other one in skbuff.h. > Andrew traces disagree, as they were : >>> s390 allmodconfig: >>> >>> bool __cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + (256 - 1)) & >>> ~(256 - 1))) < (32 + 2 + 16 + 1514 + 4))); >>> So it might be only a cross-compile environment issue, I dont know. > From what I can tell we would have to drop the NET_SKB_PAD to 0 in order > to not trigger this error with igb since we still have to add 22 bytes > for igb's per packet timestamp header, IP alignment, and CRC. > > The simple fix is for us just to drop the BUILD_BUG_ON check for igb > since we already had a check for size check in igb_set_rx_buffer_len. > It just means that build_skb won't be available for standard MTU sizes > on s390. Yeah, probably nobody will notice ;) ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [E1000-devel] [next:akpm 16/587] 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... 2013-02-20 21:42 ` Eric Dumazet @ 2013-02-20 22:47 ` Alexander Duyck 2013-02-20 23:02 ` Eric Dumazet 0 siblings, 1 reply; 11+ messages in thread From: Alexander Duyck @ 2013-02-20 22:47 UTC (permalink / raw) To: Eric Dumazet Cc: Allan, Bruce W, e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org, Brandeburg, Jesse, Daniel Santos, Andrew Morton, Wu, Fengguang On 02/20/2013 01:42 PM, Eric Dumazet wrote: > On Wed, 2013-02-20 at 13:23 -0800, Alexander Duyck wrote: > >> NET_SKB_PAD is defined for the s390. It is already 32. If you look it >> up we only have 2 definitions for NET_SKB_PAD, one specific to the s390 >> architecture and the other one in skbuff.h. >> > Andrew traces disagree, as they were : > >>>> s390 allmodconfig: >>>> >>>> bool __cond = !(!(((2048) - (((sizeof(struct skb_shared_info)) + (256 - 1)) & >>>> ~(256 - 1))) < (32 + 2 + 16 + 1514 + 4))); >>>> > So it might be only a cross-compile environment issue, I dont know. Huh? I'm not seeing what you are saying. The NET_SKB_PAD is the value that is in the last set of parenthesis since it was: (NET_SKB_PAD + NET_IP_ALIGN + IGB_TS_HDR_LEN + ETH_FRAME_LEN + ETH_FCS_LEN) that is the bit that became: (32 + 2 + 16 + 1514 + 4) The problem is the skb_shared_info bit rounds up to 512 reducing the available space to 1536. If you add up all of the other bits ignoring the NET_SKB_PAD value you end up with exactly 1536 meaning the only value for NET_SKB_PAD that would work is 0. >> From what I can tell we would have to drop the NET_SKB_PAD to 0 in order >> to not trigger this error with igb since we still have to add 22 bytes >> for igb's per packet timestamp header, IP alignment, and CRC. >> >> The simple fix is for us just to drop the BUILD_BUG_ON check for igb >> since we already had a check for size check in igb_set_rx_buffer_len. >> It just means that build_skb won't be available for standard MTU sizes >> on s390. > Yeah, probably nobody will notice ;) Yeah, it is only a few percentage points difference and only really impacts small packets anyway. :-) Thanks, Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [E1000-devel] [next:akpm 16/587] 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... 2013-02-20 22:47 ` Alexander Duyck @ 2013-02-20 23:02 ` Eric Dumazet 0 siblings, 0 replies; 11+ messages in thread From: Eric Dumazet @ 2013-02-20 23:02 UTC (permalink / raw) To: Alexander Duyck Cc: Allan, Bruce W, e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org, Brandeburg, Jesse, Daniel Santos, Andrew Morton, Wu, Fengguang On Wed, 2013-02-20 at 14:47 -0800, Alexander Duyck wrote: > Huh? I'm not seeing what you are saying. The NET_SKB_PAD is the value > that is in the last set of parenthesis since it was: > (NET_SKB_PAD + NET_IP_ALIGN + IGB_TS_HDR_LEN + ETH_FRAME_LEN + ETH_FCS_LEN) > that is the bit that became: > (32 + 2 + 16 + 1514 + 4) > > The problem is the skb_shared_info bit rounds up to 512 reducing the > available space to 1536. If you add up all of the other bits ignoring > the NET_SKB_PAD value you end up with exactly 1536 meaning the only > value for NET_SKB_PAD that would work is 0. Oh well, for one moment I thought the SKB_DATA_ALIGN() was also using NET_SKB_PAD, but its using SMP_CACHE_BYTES. ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [E1000-devel] [next:akpm 16/587] 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_HD 2013-02-20 19:22 ` Eric Dumazet 2013-02-20 21:23 ` Alexander Duyck @ 2013-02-21 9:42 ` David Laight 1 sibling, 0 replies; 11+ messages in thread From: David Laight @ 2013-02-21 9:42 UTC (permalink / raw) To: Eric Dumazet, Alexander Duyck Cc: Allan, Bruce W, e1000-devel, netdev, Brandeburg, Jesse, Daniel Santos, Andrew Morton, Wu, Fengguang > > The problem is the 256 byte alignment for L1_CACHE_BYTES is increasing > > the size of the data and shared info significantly pushing us past the > > 2K limit. > > > > I'll look into this since it likely affects ixgbe as well. Doesn't a 256 byte cache line cause issues almost everywhere anything is marked as 'cache_aligned' ? Some other structures have members part way down marked that way so that the 2nd cache line (with smaller lines) contains a known set of fields (either to get them together, or out of the cache line containing the first part of the data). With 256 byte cache lines the entire structure would probably be a single cache line - except that it gets extended to two lines. I know that some people have a habit of allocating mutex in their own cache line (with nothing else), that also doesn't make sense to me - especially with large cache lines (I don't know if there any of those in Linux). David ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [next:akpm 16/587] 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... 2013-02-19 22:27 ` [next:akpm 16/587] 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) Andrew Morton 2013-02-19 22:30 ` [next:akpm 16/587] 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 Allan, Bruce W @ 2013-02-19 23:02 ` Wyborny, Carolyn 1 sibling, 0 replies; 11+ messages in thread From: Wyborny, Carolyn @ 2013-02-19 23:02 UTC (permalink / raw) To: Andrew Morton, Wu, Fengguang Cc: Daniel Santos, Kirsher, Jeffrey T, Brandeburg, Jesse, Allan, Bruce W, netdev@vger.kernel.org > -----Original Message----- > From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] > On Behalf Of Andrew Morton > Sent: Tuesday, February 19, 2013 2:27 PM > To: Wu, Fengguang > Cc: Daniel Santos; Kirsher, Jeffrey T; Brandeburg, Jesse; Allan, Bruce W; > netdev@vger.kernel.org > Subject: Re: [next:akpm 16/587] > 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... > [..] > That BUILD_BUG_ON() triggers without Daniel's patches applied as well: > [..] > I doubt if anyone will be running this driver on s390, but I guess we should work > out why it broke. > Yes, we'll work on it. Thanks, Carolyn Carolyn Wyborny Linux Development Networking Division Intel Corporation ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-02-21 9:46 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <5122101a.nBjTqFyZXZ+WuzPr%fengguang.wu@intel.com> 2013-02-19 22:27 ` [next:akpm 16/587] 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) Andrew Morton 2013-02-19 22:30 ` [next:akpm 16/587] 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 Allan, Bruce W 2013-02-20 1:09 ` Eric Dumazet 2013-02-20 18:16 ` [E1000-devel] " Alexander Duyck 2013-02-20 19:22 ` Eric Dumazet 2013-02-20 21:23 ` Alexander Duyck 2013-02-20 21:42 ` Eric Dumazet 2013-02-20 22:47 ` Alexander Duyck 2013-02-20 23:02 ` Eric Dumazet 2013-02-21 9:42 ` [E1000-devel] [next:akpm 16/587] 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_HD David Laight 2013-02-19 23:02 ` [next:akpm 16/587] 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 Wyborny, Carolyn
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).