From: Helge Deller <deller@gmx.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <therbert@google.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org,
linux-parisc List <linux-parisc@vger.kernel.org>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
John David Anglin <dave.anglin@bell.net>
Subject: Re: CONFIG_XPS depends on L1_CACHE_BYTES being greater than sizeof(struct xps_map)
Date: Fri, 23 Oct 2015 21:25:04 +0200 [thread overview]
Message-ID: <562A8990.9000808@gmx.de> (raw)
In-Reply-To: <1445550615.22974.128.camel@edumazet-glaptop2.roam.corp.google.com>
On 22.10.2015 23:50, Eric Dumazet wrote:
> On Thu, 2015-10-22 at 22:00 +0200, Helge Deller wrote:
>> Hi Tom & David,
>>
>> I've queued-up a patch for the parisc architecture which reduces L1_CACHE_BYTES from 32 to 16:
>> https://patchwork.kernel.org/patch/7399291/
>>
>> But this change will break the kernel build like this:
>>
>> In file included from net/core/dev.c:92:0:
>> net/core/dev.c: In function ‘expand_xps_map’:
>> include/linux/netdevice.h:721:27: warning: overflow in implicit constant conversion [-Woverflow]
>> #define XPS_MIN_MAP_ALLOC ((L1_CACHE_BYTES - sizeof(struct xps_map)) \
>> net/core/dev.c:1972:18: note: in expansion of macro ‘XPS_MIN_MAP_ALLOC’
>> int alloc_len = XPS_MIN_MAP_ALLOC;
>>
>> Do you see an easy way to fix this ?
>
>
> Using L2_CACHE_BYTES would be better, but it unfortunately does not
> exist.
Then, how about simply changing it to twice of L1_CACHE_BYTES ?
#define XPS_MIN_MAP_ALLOC ((L1_CACHE_BYTES * 2 - sizeof(struct xps_map)) / sizeof(u16))
Helge
next prev parent reply other threads:[~2015-10-23 19:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <42430464-867C-4E0B-8E95-C6CDB6D8A0B2@bell.net>
[not found] ` <32A3BF6F-B243-4AD4-9AE9-A5F9DAE0270A@bell.net>
[not found] ` <B8E85737-5ECD-4CBE-8730-886B098C5FA4@bell.net>
[not found] ` <trinity-eda7d55d-7234-4b29-a15c-955f8ba0c95e-1445513884942@3capp-gmx-bs32>
[not found] ` <trinity-8980ad10-b889-45cf-8f37-a33ba9cf99ef-1445514797080@3capp-gmx-bs32>
[not found] ` <1445524549.2207.1.camel@HansenPartnership.com>
[not found] ` <5628F868.3040105@bell.net>
2015-10-22 20:00 ` CONFIG_XPS depends on L1_CACHE_BYTES being greater than sizeof(struct xps_map) Helge Deller
2015-10-22 21:37 ` Tom Herbert
2015-10-23 19:21 ` Helge Deller
2015-10-23 22:16 ` Tom Herbert
2015-10-22 21:50 ` Eric Dumazet
2015-10-23 19:25 ` Helge Deller [this message]
2015-10-23 20:03 ` Eric Dumazet
2015-10-23 21:08 ` Helge Deller
2015-10-23 21:09 ` Helge Deller
2015-10-23 21:38 ` Eric Dumazet
2015-10-23 22:00 ` Alexander Duyck
2015-10-23 22:17 ` Helge Deller
2015-10-23 22:40 ` Alexander Duyck
2015-10-24 14:43 ` Helge Deller
2015-10-25 5:41 ` Alexander Duyck
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=562A8990.9000808@gmx.de \
--to=deller@gmx.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dave.anglin@bell.net \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-parisc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.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 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).