linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nl80211: increase the max number of rules in regdomain
@ 2014-12-17 16:00 Arik Nemtsov
  2014-12-18 13:56 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Arik Nemtsov @ 2014-12-17 16:00 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Luis R. Rodriguez, Arik Nemtsov

Some network cards (Intel) produce per-channel regdomains and rely on
cfg80211 to merge rules as needed. This hits the max rules limit and
fails.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
---
 include/uapi/linux/nl80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index c0383e9..18cb0aa 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -2112,7 +2112,7 @@ enum nl80211_attrs {
 
 #define NL80211_MAX_SUPP_RATES			32
 #define NL80211_MAX_SUPP_HT_RATES		77
-#define NL80211_MAX_SUPP_REG_RULES		32
+#define NL80211_MAX_SUPP_REG_RULES		64
 #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY	0
 #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY	16
 #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY	24
-- 
1.9.1


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

* Re: [PATCH] nl80211: increase the max number of rules in regdomain
  2014-12-17 16:00 [PATCH] nl80211: increase the max number of rules in regdomain Arik Nemtsov
@ 2014-12-18 13:56 ` Johannes Berg
  2014-12-18 13:56   ` Johannes Berg
  2014-12-18 13:59   ` Arik Nemtsov
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Berg @ 2014-12-18 13:56 UTC (permalink / raw)
  To: Arik Nemtsov; +Cc: linux-wireless, Luis R. Rodriguez

On Wed, 2014-12-17 at 18:00 +0200, Arik Nemtsov wrote:
> Some network cards (Intel) produce per-channel regdomains and rely on
> cfg80211 to merge rules as needed. This hits the max rules limit and
> fails.

Maybe we should consider just getting rid of this or bumping it to
something ridiculously large like 1000? Looking at how this is (not)
used, there's no real sense in limiting it. The only possible problem is
the O(n^2) complexity when doing an intersection, but processing a
million combinations is probably not a big deal? In fact, even if that
becomes a problem, we can easily optimise that complexity away by
sorting the rules or so. Then it becomes O(n log n)...

johannes


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

* Re: [PATCH] nl80211: increase the max number of rules in regdomain
  2014-12-18 13:56 ` Johannes Berg
@ 2014-12-18 13:56   ` Johannes Berg
  2014-12-18 13:59   ` Arik Nemtsov
  1 sibling, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2014-12-18 13:56 UTC (permalink / raw)
  To: Arik Nemtsov; +Cc: linux-wireless, Luis R. Rodriguez

On Thu, 2014-12-18 at 14:56 +0100, Johannes Berg wrote:
> On Wed, 2014-12-17 at 18:00 +0200, Arik Nemtsov wrote:
> > Some network cards (Intel) produce per-channel regdomains and rely on
> > cfg80211 to merge rules as needed. This hits the max rules limit and
> > fails.
> 
> Maybe we should consider just getting rid of this or bumping it to
> something ridiculously large like 1000? Looking at how this is (not)
> used, there's no real sense in limiting it. The only possible problem is
> the O(n^2) complexity when doing an intersection, but processing a
> million combinations is probably not a big deal? In fact, even if that
> becomes a problem, we can easily optimise that complexity away by
> sorting the rules or so. Then it becomes O(n log n)...

For now I'll apply this anyway though.

johannes


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

* Re: [PATCH] nl80211: increase the max number of rules in regdomain
  2014-12-18 13:56 ` Johannes Berg
  2014-12-18 13:56   ` Johannes Berg
@ 2014-12-18 13:59   ` Arik Nemtsov
  2014-12-18 14:01     ` Johannes Berg
  1 sibling, 1 reply; 5+ messages in thread
From: Arik Nemtsov @ 2014-12-18 13:59 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org, Luis R. Rodriguez

On Thu, Dec 18, 2014 at 3:56 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Wed, 2014-12-17 at 18:00 +0200, Arik Nemtsov wrote:
>> Some network cards (Intel) produce per-channel regdomains and rely on
>> cfg80211 to merge rules as needed. This hits the max rules limit and
>> fails.
>
> Maybe we should consider just getting rid of this or bumping it to
> something ridiculously large like 1000? Looking at how this is (not)
> used, there's no real sense in limiting it. The only possible problem is
> the O(n^2) complexity when doing an intersection, but processing a
> million combinations is probably not a big deal? In fact, even if that
> becomes a problem, we can easily optimise that complexity away by
> sorting the rules or so. Then it becomes O(n log n)...

Well when someone does NL80211_CMD_GET_REG from usermode, we send the
entire regdom in a single message, so 1000 rules may become
problematic..

Arik

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

* Re: [PATCH] nl80211: increase the max number of rules in regdomain
  2014-12-18 13:59   ` Arik Nemtsov
@ 2014-12-18 14:01     ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2014-12-18 14:01 UTC (permalink / raw)
  To: Arik Nemtsov; +Cc: linux-wireless@vger.kernel.org, Luis R. Rodriguez

On Thu, 2014-12-18 at 15:59 +0200, Arik Nemtsov wrote:
> On Thu, Dec 18, 2014 at 3:56 PM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> > On Wed, 2014-12-17 at 18:00 +0200, Arik Nemtsov wrote:
> >> Some network cards (Intel) produce per-channel regdomains and rely on
> >> cfg80211 to merge rules as needed. This hits the max rules limit and
> >> fails.
> >
> > Maybe we should consider just getting rid of this or bumping it to
> > something ridiculously large like 1000? Looking at how this is (not)
> > used, there's no real sense in limiting it. The only possible problem is
> > the O(n^2) complexity when doing an intersection, but processing a
> > million combinations is probably not a big deal? In fact, even if that
> > becomes a problem, we can easily optimise that complexity away by
> > sorting the rules or so. Then it becomes O(n log n)...
> 
> Well when someone does NL80211_CMD_GET_REG from usermode, we send the
> entire regdom in a single message, so 1000 rules may become
> problematic..

Good point. But arguably that's a different problem :)

johannes


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

end of thread, other threads:[~2014-12-18 14:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17 16:00 [PATCH] nl80211: increase the max number of rules in regdomain Arik Nemtsov
2014-12-18 13:56 ` Johannes Berg
2014-12-18 13:56   ` Johannes Berg
2014-12-18 13:59   ` Arik Nemtsov
2014-12-18 14:01     ` Johannes Berg

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