* Re: pull request: batman-adv 2012-11-30
From: David Miller @ 2012-11-30 17:22 UTC (permalink / raw)
To: ordex; +Cc: netdev, b.a.t.m.a.n
In-Reply-To: <1354270450-25935-1-git-send-email-ordex@autistici.org>
From: Antonio Quartulli <ordex@autistici.org>
Date: Fri, 30 Nov 2012 11:14:09 +0100
> Here is a lonely patch intended for net-next/linux-3.8.
> It it simply adapting the batman-adv code to use the new ETH_P_BATMAN define
> recently introduced in if_ether.h.
Pulled, thanks.
^ permalink raw reply
* Re: linux-next: Tree for Nov 29 (netlabel)
From: Casey Schaufler @ 2012-11-30 17:22 UTC (permalink / raw)
To: Randy Dunlap
Cc: Paul Moore, Stephen Rothwell, linux-next, linux-kernel,
netdev@vger.kernel.org, linux-security-module, Casey Schaufler
In-Reply-To: <50B8E4E6.2040901@xenotime.net>
On 11/30/2012 8:55 AM, Randy Dunlap wrote:
> On 11/30/2012 07:31 AM, Paul Moore wrote:
>
>> On Friday, November 30, 2012 10:19:16 AM Paul Moore wrote:
>>> On Thursday, November 29, 2012 04:05:26 PM Randy Dunlap wrote:
>>>> On 11/28/2012 10:40 PM, Stephen Rothwell wrote:
>>>>> Hi all,
>>>>> Changes since 20121128:
>>>> (on i386:)
>>> If I had to guess it looks like CONFIG_NETLABEL needs to be dependent on
>>> CONFIG_INET. While the net/ Kconfig only pulls in the net/netlabel Kconfig
>>> if CONFIG_INET is defined, I'm guessing that without the explicit
>>> dependency there is nothing preventing someone from arriving at a bad
>>> configuration as we see here.
>>>
>>> Let me test this out to make sure my reasoning is right and if it is I'll
>>> post a patch to netdev later today.
>>>
>>> Thanks for catching this.
>> Hmmm. The existing logic in net/Kconfig seems to disable CONFIG_NETLABEL at
>> build time whenever CONFIG_INET is disabled in my .config file. The only way
>> I can recreate what you are seeing here is if I move the NetLabel include
>> outside of the INET conditional in net/Kconfig.
>>
>> Regardless, adding an explicit dependency on INET to NETLABEL shouldn't hurt
>> anything so I'll go ahead and post the patch to netdev. Hopefully someone who
>> understands Kconfig better than I do can help shed some light on this.
> Sorry, this patch doesn't help.
>
> I just checked the kernel .config again. SECURITY_SMACK
> selects NETLABEL even when INET is not enabled. Bad SMACK.
I'll send the patch properly, but it'll look like this.
security/smack/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/security/smack/Kconfig b/security/smack/Kconfig
index 9fb14ef..1be1088 100644
--- a/security/smack/Kconfig
+++ b/security/smack/Kconfig
@@ -1,5 +1,6 @@
config SECURITY_SMACK
bool "Simplified Mandatory Access Control Kernel Support"
+ depends on INET
depends on NET
depends on SECURITY
select NETLABEL
>
> I added Casey and mailing list to the cc:
>
>>>> net/built-in.o: In function `netlbl_cfg_cipsov4_add':
>>>> (.text+0x61757): undefined reference to `cipso_v4_doi_add'
>>>> net/built-in.o: In function `netlbl_cfg_cipsov4_del':
>>>> (.text+0x6177d): undefined reference to `cipso_v4_doi_remove'
>>>> net/built-in.o: In function `netlbl_cfg_cipsov4_map_add':
>>>> (.text+0x617ae): undefined reference to `cipso_v4_doi_getdef'
>>>> net/built-in.o: In function `netlbl_cfg_cipsov4_map_add':
>>>> (.text+0x61a49): undefined reference to `cipso_v4_doi_putdef'
>>>> net/built-in.o: In function `netlbl_sock_setattr':
>>>> (.text+0x6218c): undefined reference to `cipso_v4_sock_setattr'
>>>> net/built-in.o: In function `netlbl_sock_delattr':
>>>> (.text+0x6220b): undefined reference to `cipso_v4_sock_delattr'
>>>> net/built-in.o: In function `netlbl_sock_getattr':
>>>> (.text+0x62238): undefined reference to `cipso_v4_sock_getattr'
>>>> net/built-in.o: In function `netlbl_conn_setattr':
>>>> (.text+0x622de): undefined reference to `cipso_v4_sock_setattr'
>>>> net/built-in.o: In function `netlbl_conn_setattr':
>>>> (.text+0x62303): undefined reference to `cipso_v4_sock_delattr'
>>>> net/built-in.o: In function `netlbl_req_setattr':
>>>> (.text+0x62429): undefined reference to `cipso_v4_req_setattr'
>>>> net/built-in.o: In function `netlbl_req_setattr':
>>>> (.text+0x6244e): undefined reference to `cipso_v4_req_delattr'
>>>> net/built-in.o: In function `netlbl_req_delattr':
>>>> (.text+0x624ba): undefined reference to `cipso_v4_req_delattr'
>>>> net/built-in.o: In function `netlbl_skbuff_setattr':
>>>> (.text+0x62551): undefined reference to `cipso_v4_skbuff_setattr'
>>>> net/built-in.o: In function `netlbl_skbuff_setattr':
>>>> (.text+0x62576): undefined reference to `cipso_v4_skbuff_delattr'
>>>> net/built-in.o: In function `netlbl_skbuff_getattr':
>>>> (.text+0x62619): undefined reference to `cipso_v4_skbuff_getattr'
>>>> net/built-in.o: In function `netlbl_skbuff_err':
>>>> (.text+0x62685): undefined reference to `cipso_v4_error'
>>>> net/built-in.o: In function `netlbl_cache_invalidate':
>>>> (.text+0x626ab): undefined reference to `cipso_v4_cache_invalidate'
>>>> net/built-in.o: In function `netlbl_cache_add':
>>>> (.text+0x626ec): undefined reference to `cipso_v4_cache_add'
>>>> net/built-in.o: In function `netlbl_domhsh_remove_entry':
>>>> (.text+0x63294): undefined reference to `cipso_v4_doi_putdef'
>>>> net/built-in.o: In function `netlbl_domhsh_remove_entry':
>>>> (.text+0x632eb): undefined reference to `cipso_v4_doi_putdef'
>>>> net/built-in.o: In function `netlbl_domhsh_remove_af4':
>>>> (.text+0x6349b): undefined reference to `cipso_v4_doi_putdef'
>>>> net/built-in.o: In function `netlbl_mgmt_add_common.clone.1':
>>>> netlabel_mgmt.c:(.text+0x64a87): undefined reference to
>>>> `cipso_v4_doi_getdef' netlabel_mgmt.c:(.text+0x64c83): undefined reference
>>>> to `cipso_v4_doi_putdef' net/built-in.o: In function
>>>> `netlbl_cipsov4_listall':
>>>> netlabel_cipso_v4.c:(.text+0x66e52): undefined reference to
>>>> `cipso_v4_doi_walk' net/built-in.o: In function `netlbl_cipsov4_list':
>>>> netlabel_cipso_v4.c:(.text+0x67199): undefined reference to
>>>> `cipso_v4_doi_getdef' net/built-in.o: In function `netlbl_cipsov4_remove':
>>>> netlabel_cipso_v4.c:(.text+0x6771b): undefined reference to
>>>> `cipso_v4_doi_remove' net/built-in.o: In function
>>>> `netlbl_cipsov4_add_pass':
>>>> netlabel_cipso_v4.c:(.text+0x67a4b): undefined reference to
>>>> `cipso_v4_doi_add' netlabel_cipso_v4.c:(.text+0x67a76): undefined
>>>> reference
>>>> to `cipso_v4_doi_free' net/built-in.o: In function
>>>> `netlbl_cipsov4_add_local':
>>>> netlabel_cipso_v4.c:(.text+0x67b9a): undefined reference to
>>>> `cipso_v4_doi_add' netlabel_cipso_v4.c:(.text+0x67bc5): undefined
>>>> reference
>>>> to `cipso_v4_doi_free' net/built-in.o: In function
>>>> `netlbl_cipsov4_add_std':
>>>> netlabel_cipso_v4.c:(.text+0x68535): undefined reference to
>>>> `cipso_v4_doi_add' netlabel_cipso_v4.c:(.text+0x68575): undefined
>>>> reference
>>>> to `cipso_v4_doi_free'
>>>>
>>>>
>>>> Full randconfig file is attached.
>
>
^ permalink raw reply related
* Re: [PATCH] net: ICMPv6 packets transmitted on wrong interface if nfmark is mangled
From: David Miller @ 2012-11-30 17:22 UTC (permalink / raw)
To: dries.dewinter; +Cc: pablo, kaber, netdev, netfilter-devel
In-Reply-To: <CA+e04fhY1KjYFwbQ6P=V==kyU3fqMrvrzRJSyz6sy=RwHki07Q@mail.gmail.com>
From: Dries De Winter <dries.dewinter@gmail.com>
Date: Fri, 30 Nov 2012 13:29:20 +0100
> 2012/11/29 David Miller <davem@davemloft.net>:
>> Regardless of the answer to that question, it should be explained
>> in the commit message.
> Should I post a new patch email including this comment?
Yes, please do.
^ permalink raw reply
* Re: [PATCH] smsc: RFC: Workaround for problems with lan8710 phy auto MDI-X
From: David Miller @ 2012-11-30 17:23 UTC (permalink / raw)
To: jkosina; +Cc: pt, otavio, javier, chohnstaedt, netdev, linux-kernel
In-Reply-To: <alpine.LNX.2.00.1211301622110.25639@pobox.suse.cz>
From: Jiri Kosina <jkosina@suse.cz>
Date: Fri, 30 Nov 2012 16:23:30 +0100 (CET)
> Of course it'd be far better if faulty hardware can be autodetected in
> runtime.
That is how this must be handled.
^ permalink raw reply
* Re: [PATCH net-next] rtnelink: remove unused parameter from rtnl_create_link().
From: David Miller @ 2012-11-30 17:25 UTC (permalink / raw)
To: ramirose; +Cc: netdev, ebiederm, jiri
In-Reply-To: <1354273727-6336-1-git-send-email-ramirose@gmail.com>
From: Rami Rosen <ramirose@gmail.com>
Date: Fri, 30 Nov 2012 13:08:47 +0200
> This patch removes an unused parameter (src_net) from rtnl_create_link()
> method and from the method single invocation, in veth.
> This parameter was used in the past when calling
> ops->get_tx_queues(src_net, tb) in rtnl_create_link().
> The get_tx_queues() member of rtnl_link_ops was replaced by two methods,
> get_num_tx_queues() and get_num_rx_queues(), which do not get any
> parameter. This was done in commit d40156aa5ecbd51fed932ed4813df82b56e5ff4d by
> Jiri Pirko ("rtnl: allow to specify different num for rx and tx queue count").
>
> Signed-off-by: Rami Rosen <ramirose@gmail.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] sctp: verify length provided in heartbeat information parameter
From: David Miller @ 2012-11-30 17:26 UTC (permalink / raw)
To: nhorman; +Cc: tgraf, netdev, linux-sctp
In-Reply-To: <20121130160156.GC6039@hmsreliant.think-freely.org>
From: Neil Horman <nhorman@tuxdriver.com>
Date: Fri, 30 Nov 2012 11:01:57 -0500
> On Fri, Nov 30, 2012 at 12:16:27PM +0000, Thomas Graf wrote:
>> If the variable parameter length provided in the mandatory
>> heartbeat information parameter exceeds the calculated payload
>> length the packet has been corrupted. Reply with a parameter
>> length protocol violation message.
>>
>> Signed-off-by: Thomas Graf <tgraf@suug.ch>
...
>>
> Looks good, thanks Thomas.
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 0/2] smsc75xx enhancements
From: David Miller @ 2012-11-30 17:27 UTC (permalink / raw)
To: steve.glendinning; +Cc: netdev
In-Reply-To: <1354287164-9884-1-git-send-email-steve.glendinning@shawell.net>
From: Steve Glendinning <steve.glendinning@shawell.net>
Date: Fri, 30 Nov 2012 14:52:42 +0000
> This patchset, as requestes, expands the macros used in
> smsc75xx to make the flow control clearer.
>
> I've left the fix in a separate patch, so the macro-
> expanding patch should have zero functional change.
Applied, thanks for fixing this up.
^ permalink raw reply
* Re: [PATCH 0/5] smsc95xx enhancements
From: David Miller @ 2012-11-30 17:28 UTC (permalink / raw)
To: steve.glendinning; +Cc: netdev
In-Reply-To: <1354290952-27109-1-git-send-email-steve.glendinning@shawell.net>
From: Steve Glendinning <steve.glendinning@shawell.net>
Date: Fri, 30 Nov 2012 15:55:47 +0000
> This patchset is a resubmission of several patches plus two new
> patches, including the expansion of cpp macros at the request of
> davem.
>
> Steve Glendinning (5):
> smsc95xx: fix suspend buffer overflow
> smsc95xx: fix error handling in suspend failure case
> smsc95xx: don't enable remote wakeup directly
> smsc95xx: fix smsc_crc return type
> smsc95xx: expand check_ macros
All applied, thanks again Steve.
^ permalink raw reply
* Re: [PATCH] MAINTAINERS: fix bouncing tun/tap entries
From: David Miller @ 2012-11-30 17:28 UTC (permalink / raw)
To: jslaby; +Cc: maxk, netdev, jirislaby, linux-kernel
In-Reply-To: <1354295140-6355-1-git-send-email-jslaby@suse.cz>
From: Jiri Slaby <jslaby@suse.cz>
Date: Fri, 30 Nov 2012 18:05:40 +0100
> Delivery to the following recipient failed permanently:
>
> vtun@office.satix.net
>
> Technical details of permanent failure:
> DNS Error: Domain name not found
>
> Of course:
> $ host office.satix.net
> Host office.satix.net not found: 3(NXDOMAIN)
>
> ===========
>
> And "Change of Email Address Notification":
> Old Address New Address Email Subject
> ------------------------------------------------------
> maxk@qualcomm.com maxk@qti.qualcomm.com "tuntap: multiqueue...
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Applied.
^ permalink raw reply
* [PATCH] Smack: Add missing depends on INET in Kconfig
From: Casey Schaufler @ 2012-11-30 17:28 UTC (permalink / raw)
To: Randy Dunlap
Cc: Paul Moore, Stephen Rothwell, linux-next, linux-kernel,
netdev@vger.kernel.org, linux-security-module
In-Reply-To: <50B8E4E6.2040901@xenotime.net>
Because NETLABEL depends on INET SECURITY_SMACK
has to explicitly call out the dependency.
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
---
security/smack/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/security/smack/Kconfig b/security/smack/Kconfig
index 9fb14ef..1be1088 100644
--- a/security/smack/Kconfig
+++ b/security/smack/Kconfig
@@ -1,5 +1,6 @@
config SECURITY_SMACK
bool "Simplified Mandatory Access Control Kernel Support"
+ depends on INET
depends on NET
depends on SECURITY
select NETLABEL
^ permalink raw reply related
* Re: [PATCH] sctp: verify length provided in heartbeat information parameter
From: Vlad Yasevich @ 2012-11-30 17:34 UTC (permalink / raw)
To: Thomas Graf; +Cc: davem, netdev, linux-sctp
In-Reply-To: <20121130121627.GG30697@casper.infradead.org>
On 11/30/2012 07:16 AM, Thomas Graf wrote:
> If the variable parameter length provided in the mandatory
> heartbeat information parameter exceeds the calculated payload
> length the packet has been corrupted. Reply with a parameter
> length protocol violation message.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
-vlad
> ---
> net/sctp/sm_statefuns.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
> index b6adef8..e92079d 100644
> --- a/net/sctp/sm_statefuns.c
> +++ b/net/sctp/sm_statefuns.c
> @@ -1055,6 +1055,7 @@ sctp_disposition_t sctp_sf_beat_8_3(struct net *net,
> void *arg,
> sctp_cmd_seq_t *commands)
> {
> + sctp_paramhdr_t *param_hdr;
> struct sctp_chunk *chunk = arg;
> struct sctp_chunk *reply;
> size_t paylen = 0;
> @@ -1072,12 +1073,17 @@ sctp_disposition_t sctp_sf_beat_8_3(struct net *net,
> * Information field copied from the received HEARTBEAT chunk.
> */
> chunk->subh.hb_hdr = (sctp_heartbeathdr_t *) chunk->skb->data;
> + param_hdr = (sctp_paramhdr_t *) chunk->subh.hb_hdr;
> paylen = ntohs(chunk->chunk_hdr->length) - sizeof(sctp_chunkhdr_t);
> +
> + if (ntohs(param_hdr->length) > paylen)
> + return sctp_sf_violation_paramlen(net, ep, asoc, type, arg,
> + param_hdr, commands);
> +
> if (!pskb_pull(chunk->skb, paylen))
> goto nomem;
>
> - reply = sctp_make_heartbeat_ack(asoc, chunk,
> - chunk->subh.hb_hdr, paylen);
> + reply = sctp_make_heartbeat_ack(asoc, chunk, param_hdr, paylen);
> if (!reply)
> goto nomem;
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc
From: Krzysztof Mazur @ 2012-11-30 17:39 UTC (permalink / raw)
To: chas williams - CONTRACTOR
Cc: David Woodhouse, David Laight, davem, netdev, linux-kernel,
nathan
In-Reply-To: <20121130121256.77685fef@thirdoffive.cmf.nrl.navy.mil>
On Fri, Nov 30, 2012 at 12:12:56PM -0500, chas williams - CONTRACTOR wrote:
> >Really, what we're saying is that *one* of the driver or protocol close
> >functions needs to be split, and we need to do DPD or PDP. Since the
> >device driver *can* abort/flush the TX queue and also any pending RX
> >being handled by a tasklet, I think it makes most sense to keep it in
> >the middle, with the protocol being handled first and last... which is
> >the current order, as long as we consider setting ATM_VF_CLOSE to be the
> >first part.
>
> i believe this is essentially already done with the release_cb()
> implementation right? that is splitting the protocol detach/shutdown
> into two parts.
partially, release_cb() is about ATM socket locking. To avoid some races
we need to take the ATM socket lock in protocol send function
(br2684_start_xmit, pppoatm_send, ...). That functions are executed
in bh context and we cannot sleep and wait for releasing the ATM socket
lock, so we just block sending and when the ATM socket is unlocked
release_cb() is called and we re-enabling sending.
Currently the first part of detach is just:
lock_sock(sk)
(without latest "br2684: don't send frames on not-ready vcc"
the first part was
set_bit(ATM_VF_CLOSE, &vcc->flags);
clear_bit(ATM_VF_READY, &vcc->flags);
for br2684)
After that the protocol stops sending new packets so the vcc may be
fully closed by ATM driver. The protocol is still ready to process
received packets. After vcc is closed the protocol can safely detach
knowing that no new packets will be received.
Krzysiek
^ permalink raw reply
* Re: [PATCH] Smack: Add missing depends on INET in Kconfig
From: Randy Dunlap @ 2012-11-30 17:40 UTC (permalink / raw)
To: Casey Schaufler
Cc: Randy Dunlap, Paul Moore, Stephen Rothwell, linux-next,
linux-kernel, netdev@vger.kernel.org, linux-security-module
In-Reply-To: <50B8ECB3.2090801@schaufler-ca.com>
On 11/30/2012 09:28 AM, Casey Schaufler wrote:
> Because NETLABEL depends on INET SECURITY_SMACK
> has to explicitly call out the dependency.
>
> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Thanks for the quick fix.
> ---
> security/smack/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/security/smack/Kconfig b/security/smack/Kconfig
> index 9fb14ef..1be1088 100644
> --- a/security/smack/Kconfig
> +++ b/security/smack/Kconfig
> @@ -1,5 +1,6 @@
> config SECURITY_SMACK
> bool "Simplified Mandatory Access Control Kernel Support"
> + depends on INET
> depends on NET
> depends on SECURITY
> select NETLABEL
>
> --
--
~Randy
^ permalink raw reply
* pull request: wireless 2012-11-30
From: John W. Linville @ 2012-11-30 18:25 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel
commit 9f8933e960f98d27742727445061b0ece934e5cf
Dave,
I have a couple of stragglers intended for 3.7...
The iwlwifi patch fixes a bug in CCK basic rate calculations.
The mac80211 patch removes an unnecessary function call that was
generating a lot of log SPAM.
Please let me know if there are problems!
John
---
The following changes since commit e196c0e579902f42cf72414461fb034e5a1ffbf7:
bonding: fix race condition in bonding_store_slaves_active (2012-11-29 13:13:15 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git for-davem
for you to fetch changes up to 9f8933e960f98d27742727445061b0ece934e5cf:
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem (2012-11-30 11:27:32 -0500)
----------------------------------------------------------------
Emmanuel Grumbach (1):
iwlwifi: fix the basic CCK rates calculation
Johannes Berg (1):
mac80211: fix remain-on-channel (non-)cancelling
John W. Linville (2):
Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes
Merge branch 'master' of git://git.kernel.org/.../linville/wireless into for-davem
drivers/net/wireless/iwlwifi/dvm/rxon.c | 12 ++++++------
net/mac80211/offchannel.c | 2 --
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/dvm/rxon.c b/drivers/net/wireless/iwlwifi/dvm/rxon.c
index 1089639..2830ea2 100644
--- a/drivers/net/wireless/iwlwifi/dvm/rxon.c
+++ b/drivers/net/wireless/iwlwifi/dvm/rxon.c
@@ -1012,12 +1012,12 @@ static void iwl_calc_basic_rates(struct iwl_priv *priv,
* As a consequence, it's not as complicated as it sounds, just add
* any lower rates to the ACK rate bitmap.
*/
- if (IWL_RATE_11M_INDEX < lowest_present_ofdm)
- ofdm |= IWL_RATE_11M_MASK >> IWL_FIRST_CCK_RATE;
- if (IWL_RATE_5M_INDEX < lowest_present_ofdm)
- ofdm |= IWL_RATE_5M_MASK >> IWL_FIRST_CCK_RATE;
- if (IWL_RATE_2M_INDEX < lowest_present_ofdm)
- ofdm |= IWL_RATE_2M_MASK >> IWL_FIRST_CCK_RATE;
+ if (IWL_RATE_11M_INDEX < lowest_present_cck)
+ cck |= IWL_RATE_11M_MASK >> IWL_FIRST_CCK_RATE;
+ if (IWL_RATE_5M_INDEX < lowest_present_cck)
+ cck |= IWL_RATE_5M_MASK >> IWL_FIRST_CCK_RATE;
+ if (IWL_RATE_2M_INDEX < lowest_present_cck)
+ cck |= IWL_RATE_2M_MASK >> IWL_FIRST_CCK_RATE;
/* 1M already there or needed so always add */
cck |= IWL_RATE_1M_MASK >> IWL_FIRST_CCK_RATE;
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 83608ac..2c84185 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -458,8 +458,6 @@ void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata)
list_move_tail(&roc->list, &tmp_list);
roc->abort = true;
}
-
- ieee80211_start_next_roc(local);
mutex_unlock(&local->mtx);
list_for_each_entry_safe(roc, tmp, &tmp_list, list) {
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply related
* Re: [PATCH v2 3/3] pppoatm: protect against freeing of vcc
From: David Woodhouse @ 2012-11-30 18:33 UTC (permalink / raw)
To: Krzysztof Mazur
Cc: Chas Williams (CONTRACTOR), David Laight, davem, netdev,
linux-kernel, nathan
In-Reply-To: <20121130170007.GA25818@shrek.podlesie.net>
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
On Fri, 2012-11-30 at 18:00 +0100, Krzysztof Mazur wrote:
> On Fri, Nov 30, 2012 at 04:23:46PM +0000, David Woodhouse wrote:
> >
> > +static void br2684_release_cb(struct atm_vcc *atmvcc)
> > +{
> > + struct br2684_vcc *brvcc = BR2684_VCC(atmvcc);
> > +
> > + /*
> > + * A race with br2684_xmit_vcc() might cause a spurious wakeup just
> > + * after that function *stops* the queue, and qspace might actually
> > + * go negative before the queue stops again. We cope with that.
> > + */
>
> We cannot race with br2684_xmit_vcc() because both br2684_xmit_vcc()
> and br2684_release_cb() are called with locked sk->sk_lock.slock.
Ah, right. For some reason I thought the lock was already dropped when
->release_cb() was called. In that case I'll remove the comment. Thanks.
--
dwmw2
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6171 bytes --]
^ permalink raw reply
* [PATCH v3 resend net-next 1/2] myri10ge: Convert from LRO to GRO
From: Andrew Gallatin @ 2012-11-30 18:31 UTC (permalink / raw)
To: davem; +Cc: netdev, Andrew Gallatin
In-Reply-To: <1354300319-30771-1-git-send-email-gallatin@myri.com>
Convert myri10ge from LRO to GRO, and simplify the driver by removing
various LRO-related code which is no longer needed including
ndo_fix_features op, custom skb building from frags, and LRO
header parsing.
Signed-off-by: Andrew Gallatin <gallatin@myri.com>
---
drivers/net/ethernet/myricom/Kconfig | 1 -
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 236 ++++------------------
2 files changed, 34 insertions(+), 203 deletions(-)
diff --git a/drivers/net/ethernet/myricom/Kconfig b/drivers/net/ethernet/myricom/Kconfig
index 540f0c6..3932d08 100644
--- a/drivers/net/ethernet/myricom/Kconfig
+++ b/drivers/net/ethernet/myricom/Kconfig
@@ -23,7 +23,6 @@ config MYRI10GE
depends on PCI && INET
select FW_LOADER
select CRC32
- select INET_LRO
---help---
This driver supports Myricom Myri-10G Dual Protocol interface in
Ethernet mode. If the eeprom on your board is not recent enough,
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 83516e3..84207c0 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -50,7 +50,6 @@
#include <linux/etherdevice.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
-#include <linux/inet_lro.h>
#include <linux/dca.h>
#include <linux/ip.h>
#include <linux/inet.h>
@@ -96,8 +95,6 @@ MODULE_LICENSE("Dual BSD/GPL");
#define MYRI10GE_EEPROM_STRINGS_SIZE 256
#define MYRI10GE_MAX_SEND_DESC_TSO ((65536 / 2048) * 2)
-#define MYRI10GE_MAX_LRO_DESCRIPTORS 8
-#define MYRI10GE_LRO_MAX_PKTS 64
#define MYRI10GE_NO_CONFIRM_DATA htonl(0xffffffff)
#define MYRI10GE_NO_RESPONSE_RESULT 0xffffffff
@@ -165,8 +162,6 @@ struct myri10ge_rx_done {
dma_addr_t bus;
int cnt;
int idx;
- struct net_lro_mgr lro_mgr;
- struct net_lro_desc lro_desc[MYRI10GE_MAX_LRO_DESCRIPTORS];
};
struct myri10ge_slice_netstats {
@@ -338,11 +333,6 @@ static int myri10ge_debug = -1; /* defaults above */
module_param(myri10ge_debug, int, 0);
MODULE_PARM_DESC(myri10ge_debug, "Debug level (0=none,...,16=all)");
-static int myri10ge_lro_max_pkts = MYRI10GE_LRO_MAX_PKTS;
-module_param(myri10ge_lro_max_pkts, int, S_IRUGO);
-MODULE_PARM_DESC(myri10ge_lro_max_pkts,
- "Number of LRO packets to be aggregated");
-
static int myri10ge_fill_thresh = 256;
module_param(myri10ge_fill_thresh, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed");
@@ -1197,36 +1187,6 @@ static inline void myri10ge_vlan_ip_csum(struct sk_buff *skb, __wsum hw_csum)
}
}
-static inline void
-myri10ge_rx_skb_build(struct sk_buff *skb, u8 * va,
- struct skb_frag_struct *rx_frags, int len, int hlen)
-{
- struct skb_frag_struct *skb_frags;
-
- skb->len = skb->data_len = len;
- /* attach the page(s) */
-
- skb_frags = skb_shinfo(skb)->frags;
- while (len > 0) {
- memcpy(skb_frags, rx_frags, sizeof(*skb_frags));
- len -= skb_frag_size(rx_frags);
- skb_frags++;
- rx_frags++;
- skb_shinfo(skb)->nr_frags++;
- }
-
- /* pskb_may_pull is not available in irq context, but
- * skb_pull() (for ether_pad and eth_type_trans()) requires
- * the beginning of the packet in skb_headlen(), move it
- * manually */
- skb_copy_to_linear_data(skb, va, hlen);
- skb_shinfo(skb)->frags[0].page_offset += hlen;
- skb_frag_size_sub(&skb_shinfo(skb)->frags[0], hlen);
- skb->data_len -= hlen;
- skb->tail += hlen;
- skb_pull(skb, MXGEFW_PAD);
-}
-
static void
myri10ge_alloc_rx_pages(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx,
int bytes, int watchdog)
@@ -1304,18 +1264,14 @@ myri10ge_unmap_rx_page(struct pci_dev *pdev,
}
}
-#define MYRI10GE_HLEN 64 /* The number of bytes to copy from a
- * page into an skb */
-
static inline int
-myri10ge_rx_done(struct myri10ge_slice_state *ss, int len, __wsum csum,
- bool lro_enabled)
+myri10ge_rx_done(struct myri10ge_slice_state *ss, int len, __wsum csum)
{
struct myri10ge_priv *mgp = ss->mgp;
struct sk_buff *skb;
- struct skb_frag_struct rx_frags[MYRI10GE_MAX_FRAGS_PER_FRAME];
+ struct skb_frag_struct *rx_frags;
struct myri10ge_rx_buf *rx;
- int i, idx, hlen, remainder, bytes;
+ int i, idx, remainder, bytes;
struct pci_dev *pdev = mgp->pdev;
struct net_device *dev = mgp->dev;
u8 *va;
@@ -1332,67 +1288,47 @@ myri10ge_rx_done(struct myri10ge_slice_state *ss, int len, __wsum csum,
idx = rx->cnt & rx->mask;
va = page_address(rx->info[idx].page) + rx->info[idx].page_offset;
prefetch(va);
+
+ skb = napi_get_frags(&ss->napi);
+ if (unlikely(skb == NULL)) {
+ ss->stats.rx_dropped++;
+ for (i = 0, remainder = len; remainder > 0; i++) {
+ myri10ge_unmap_rx_page(pdev, &rx->info[idx], bytes);
+ put_page(rx->info[idx].page);
+ rx->cnt++;
+ idx = rx->cnt & rx->mask;
+ remainder -= MYRI10GE_ALLOC_SIZE;
+ }
+ return 0;
+ }
+ rx_frags = skb_shinfo(skb)->frags;
/* Fill skb_frag_struct(s) with data from our receive */
for (i = 0, remainder = len; remainder > 0; i++) {
myri10ge_unmap_rx_page(pdev, &rx->info[idx], bytes);
- __skb_frag_set_page(&rx_frags[i], rx->info[idx].page);
- rx_frags[i].page_offset = rx->info[idx].page_offset;
- if (remainder < MYRI10GE_ALLOC_SIZE)
- skb_frag_size_set(&rx_frags[i], remainder);
- else
- skb_frag_size_set(&rx_frags[i], MYRI10GE_ALLOC_SIZE);
+ skb_fill_page_desc(skb, i, rx->info[idx].page,
+ rx->info[idx].page_offset,
+ remainder < MYRI10GE_ALLOC_SIZE ?
+ remainder : MYRI10GE_ALLOC_SIZE);
rx->cnt++;
idx = rx->cnt & rx->mask;
remainder -= MYRI10GE_ALLOC_SIZE;
}
- if (lro_enabled) {
- rx_frags[0].page_offset += MXGEFW_PAD;
- skb_frag_size_sub(&rx_frags[0], MXGEFW_PAD);
- len -= MXGEFW_PAD;
- lro_receive_frags(&ss->rx_done.lro_mgr, rx_frags,
- /* opaque, will come back in get_frag_header */
- len, len,
- (void *)(__force unsigned long)csum, csum);
+ /* remove padding */
+ rx_frags[0].page_offset += MXGEFW_PAD;
+ rx_frags[0].size -= MXGEFW_PAD;
+ len -= MXGEFW_PAD;
- return 1;
- }
-
- hlen = MYRI10GE_HLEN > len ? len : MYRI10GE_HLEN;
-
- /* allocate an skb to attach the page(s) to. This is done
- * after trying LRO, so as to avoid skb allocation overheads */
-
- skb = netdev_alloc_skb(dev, MYRI10GE_HLEN + 16);
- if (unlikely(skb == NULL)) {
- ss->stats.rx_dropped++;
- do {
- i--;
- __skb_frag_unref(&rx_frags[i]);
- } while (i != 0);
- return 0;
- }
-
- /* Attach the pages to the skb, and trim off any padding */
- myri10ge_rx_skb_build(skb, va, rx_frags, len, hlen);
- if (skb_frag_size(&skb_shinfo(skb)->frags[0]) <= 0) {
- skb_frag_unref(skb, 0);
- skb_shinfo(skb)->nr_frags = 0;
- } else {
- skb->truesize += bytes * skb_shinfo(skb)->nr_frags;
+ skb->len = len;
+ skb->data_len = len;
+ skb->truesize += len;
+ if (dev->features & NETIF_F_RXCSUM) {
+ skb->ip_summed = CHECKSUM_COMPLETE;
+ skb->csum = csum;
}
- skb->protocol = eth_type_trans(skb, dev);
skb_record_rx_queue(skb, ss - &mgp->ss[0]);
- if (dev->features & NETIF_F_RXCSUM) {
- if ((skb->protocol == htons(ETH_P_IP)) ||
- (skb->protocol == htons(ETH_P_IPV6))) {
- skb->csum = csum;
- skb->ip_summed = CHECKSUM_COMPLETE;
- } else
- myri10ge_vlan_ip_csum(skb, csum);
- }
- netif_receive_skb(skb);
+ napi_gro_frags(&ss->napi);
return 1;
}
@@ -1480,18 +1416,11 @@ myri10ge_clean_rx_done(struct myri10ge_slice_state *ss, int budget)
u16 length;
__wsum checksum;
- /*
- * Prevent compiler from generating more than one ->features memory
- * access to avoid theoretical race condition with functions that
- * change NETIF_F_LRO flag at runtime.
- */
- bool lro_enabled = !!(ACCESS_ONCE(mgp->dev->features) & NETIF_F_LRO);
-
while (rx_done->entry[idx].length != 0 && work_done < budget) {
length = ntohs(rx_done->entry[idx].length);
rx_done->entry[idx].length = 0;
checksum = csum_unfold(rx_done->entry[idx].checksum);
- rx_ok = myri10ge_rx_done(ss, length, checksum, lro_enabled);
+ rx_ok = myri10ge_rx_done(ss, length, checksum);
rx_packets += rx_ok;
rx_bytes += rx_ok * (unsigned long)length;
cnt++;
@@ -1503,9 +1432,6 @@ myri10ge_clean_rx_done(struct myri10ge_slice_state *ss, int budget)
ss->stats.rx_packets += rx_packets;
ss->stats.rx_bytes += rx_bytes;
- if (lro_enabled)
- lro_flush_all(&rx_done->lro_mgr);
-
/* restock receive rings if needed */
if (ss->rx_small.fill_cnt - ss->rx_small.cnt < myri10ge_fill_thresh)
myri10ge_alloc_rx_pages(mgp, &ss->rx_small,
@@ -1779,7 +1705,6 @@ static const char myri10ge_gstrings_slice_stats[][ETH_GSTRING_LEN] = {
"tx_pkt_start", "tx_pkt_done", "tx_req", "tx_done",
"rx_small_cnt", "rx_big_cnt",
"wake_queue", "stop_queue", "tx_linearized",
- "LRO aggregated", "LRO flushed", "LRO avg aggr", "LRO no_desc",
};
#define MYRI10GE_NET_STATS_LEN 21
@@ -1880,14 +1805,6 @@ myri10ge_get_ethtool_stats(struct net_device *netdev,
data[i++] = (unsigned int)ss->tx.wake_queue;
data[i++] = (unsigned int)ss->tx.stop_queue;
data[i++] = (unsigned int)ss->tx.linearized;
- data[i++] = ss->rx_done.lro_mgr.stats.aggregated;
- data[i++] = ss->rx_done.lro_mgr.stats.flushed;
- if (ss->rx_done.lro_mgr.stats.flushed)
- data[i++] = ss->rx_done.lro_mgr.stats.aggregated /
- ss->rx_done.lro_mgr.stats.flushed;
- else
- data[i++] = 0;
- data[i++] = ss->rx_done.lro_mgr.stats.no_desc;
}
}
@@ -2271,67 +2188,6 @@ static void myri10ge_free_irq(struct myri10ge_priv *mgp)
pci_disable_msix(pdev);
}
-static int
-myri10ge_get_frag_header(struct skb_frag_struct *frag, void **mac_hdr,
- void **ip_hdr, void **tcpudp_hdr,
- u64 * hdr_flags, void *priv)
-{
- struct ethhdr *eh;
- struct vlan_ethhdr *veh;
- struct iphdr *iph;
- u8 *va = skb_frag_address(frag);
- unsigned long ll_hlen;
- /* passed opaque through lro_receive_frags() */
- __wsum csum = (__force __wsum) (unsigned long)priv;
-
- /* find the mac header, aborting if not IPv4 */
-
- eh = (struct ethhdr *)va;
- *mac_hdr = eh;
- ll_hlen = ETH_HLEN;
- if (eh->h_proto != htons(ETH_P_IP)) {
- if (eh->h_proto == htons(ETH_P_8021Q)) {
- veh = (struct vlan_ethhdr *)va;
- if (veh->h_vlan_encapsulated_proto != htons(ETH_P_IP))
- return -1;
-
- ll_hlen += VLAN_HLEN;
-
- /*
- * HW checksum starts ETH_HLEN bytes into
- * frame, so we must subtract off the VLAN
- * header's checksum before csum can be used
- */
- csum = csum_sub(csum, csum_partial(va + ETH_HLEN,
- VLAN_HLEN, 0));
- } else {
- return -1;
- }
- }
- *hdr_flags = LRO_IPV4;
-
- iph = (struct iphdr *)(va + ll_hlen);
- *ip_hdr = iph;
- if (iph->protocol != IPPROTO_TCP)
- return -1;
- if (ip_is_fragment(iph))
- return -1;
- *hdr_flags |= LRO_TCP;
- *tcpudp_hdr = (u8 *) (*ip_hdr) + (iph->ihl << 2);
-
- /* verify the IP checksum */
- if (unlikely(ip_fast_csum((u8 *) iph, iph->ihl)))
- return -1;
-
- /* verify the checksum */
- if (unlikely(csum_tcpudp_magic(iph->saddr, iph->daddr,
- ntohs(iph->tot_len) - (iph->ihl << 2),
- IPPROTO_TCP, csum)))
- return -1;
-
- return 0;
-}
-
static int myri10ge_get_txrx(struct myri10ge_priv *mgp, int slice)
{
struct myri10ge_cmd cmd;
@@ -2402,7 +2258,6 @@ static int myri10ge_open(struct net_device *dev)
struct myri10ge_cmd cmd;
int i, status, big_pow2, slice;
u8 *itable;
- struct net_lro_mgr *lro_mgr;
if (mgp->running != MYRI10GE_ETH_STOPPED)
return -EBUSY;
@@ -2513,19 +2368,6 @@ static int myri10ge_open(struct net_device *dev)
goto abort_with_rings;
}
- lro_mgr = &ss->rx_done.lro_mgr;
- lro_mgr->dev = dev;
- lro_mgr->features = LRO_F_NAPI;
- lro_mgr->ip_summed = CHECKSUM_COMPLETE;
- lro_mgr->ip_summed_aggr = CHECKSUM_UNNECESSARY;
- lro_mgr->max_desc = MYRI10GE_MAX_LRO_DESCRIPTORS;
- lro_mgr->lro_arr = ss->rx_done.lro_desc;
- lro_mgr->get_frag_header = myri10ge_get_frag_header;
- lro_mgr->max_aggr = myri10ge_lro_max_pkts;
- lro_mgr->frag_align_pad = 2;
- if (lro_mgr->max_aggr > MAX_SKB_FRAGS)
- lro_mgr->max_aggr = MAX_SKB_FRAGS;
-
/* must happen prior to any irq */
napi_enable(&(ss)->napi);
}
@@ -3143,15 +2985,6 @@ static int myri10ge_set_mac_address(struct net_device *dev, void *addr)
return 0;
}
-static netdev_features_t myri10ge_fix_features(struct net_device *dev,
- netdev_features_t features)
-{
- if (!(features & NETIF_F_RXCSUM))
- features &= ~NETIF_F_LRO;
-
- return features;
-}
-
static int myri10ge_change_mtu(struct net_device *dev, int new_mtu)
{
struct myri10ge_priv *mgp = netdev_priv(dev);
@@ -3878,7 +3711,6 @@ static const struct net_device_ops myri10ge_netdev_ops = {
.ndo_get_stats64 = myri10ge_get_stats,
.ndo_validate_addr = eth_validate_addr,
.ndo_change_mtu = myri10ge_change_mtu,
- .ndo_fix_features = myri10ge_fix_features,
.ndo_set_rx_mode = myri10ge_set_multicast_list,
.ndo_set_mac_address = myri10ge_set_mac_address,
};
@@ -4018,7 +3850,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
netdev->netdev_ops = &myri10ge_netdev_ops;
netdev->mtu = myri10ge_initial_mtu;
- netdev->hw_features = mgp->features | NETIF_F_LRO | NETIF_F_RXCSUM;
+ netdev->hw_features = mgp->features | NETIF_F_RXCSUM;
netdev->features = netdev->hw_features;
if (dac_enabled)
--
1.7.9.5
^ permalink raw reply related
* [PATCH v3 resend net-next 0/2] myri10ge: LRO to GRO conversion
From: Andrew Gallatin @ 2012-11-30 18:31 UTC (permalink / raw)
To: davem; +Cc: netdev, Andrew Gallatin
In-Reply-To: <20121130.121705.1923519039781698493.davem@davemloft.net>
Hi,
I'm resending this after fixing email client issues.
The following patchset is a resubmission of '[PATCH resend net-next 0/3]
myri10ge: LRO to GRO conversion', and converts myri10ge from using
the old inet_lro interface to GRO, and to do vlan tag decap in
the driver so as to not suffer a performance penalty for vlan
tagged traffic due to the conversion.
Changes this time are:
- Clean up some messy indenting & parens in
"2/3 myri10ge-Add-vlan-rx-for-better-GRO-perf"
and store the vlan hdr csum in a variable, so now we are not calling
csum_partial() nested so deeply it spreads across 3 lines
- Folded 3/3 myri10ge-Use-skb_fill_page_desc into 1/3
myri10ge-Convert-from-LRO-to-GRO.patch since it is really just small
part of the LRO removal cleanup. It was originally a separate patch
because I noticed the cleanup at the last second, and was too lazy
to fold it into the first patch where it belonged.
Note that a naive LRO->GRO conversion of myri10ge will result in a
performance regression for vlan tagged frames. This is because
myri10ge does not offer hardware vlan tag offload, and because GRO
requires hardware vlan tag offload to aggregate vlan tagged frames.
To address this performance regression, I have implemented vlan tag
popping in the myri10ge driver, as it seems to be the lesser of two
evils. As eric.dumazet@gmail.com commented when I asked about this on
netdev: "Given GRO assumes NIC does hardware vlan
offloading, I guess I would chose to do that. It seems unfortunate to
add vlan decap in GRO path, already very complex."
Andrew Gallatin (2):
myri10ge: Convert from LRO to GRO
myri10ge: Add vlan rx for better GRO perf.
drivers/net/ethernet/myricom/Kconfig | 1 -
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 275 ++++++----------------
2 files changed, 74 insertions(+), 202 deletions(-)
--
1.7.9.5
^ permalink raw reply
* [PATCH v3 resend net-next 2/2] myri10ge: Add vlan rx for better GRO perf.
From: Andrew Gallatin @ 2012-11-30 18:31 UTC (permalink / raw)
To: davem; +Cc: netdev, Andrew Gallatin
In-Reply-To: <1354300319-30771-1-git-send-email-gallatin@myri.com>
Unlike LRO, GRO requires that vlan tags be removed before
aggregation can occur. Since the myri10ge NIC does not support
hardware vlan tag offload, we must remove the tag in the driver
to achieve performance comparable to LRO for vlan tagged frames.
Thanks to Eric Duzamet for his help simplifying the original patch.
Signed-off-by: Andrew Gallatin <gallatin@myri.com>
---
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 41 ++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 84207c0..2fc984a 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -1264,6 +1264,42 @@ myri10ge_unmap_rx_page(struct pci_dev *pdev,
}
}
+/*
+ * GRO does not support acceleration of tagged vlan frames, and
+ * this NIC does not support vlan tag offload, so we must pop
+ * the tag ourselves to be able to achieve GRO performance that
+ * is comparable to LRO.
+ */
+
+static inline void
+myri10ge_vlan_rx(struct net_device *dev, void *addr, struct sk_buff *skb)
+{
+ u8 *va;
+ struct vlan_ethhdr *veh;
+ struct skb_frag_struct *frag;
+ __wsum vsum;
+
+ va = addr;
+ va += MXGEFW_PAD;
+ veh = (struct vlan_ethhdr *)va;
+ if ((dev->features & NETIF_F_HW_VLAN_RX) == NETIF_F_HW_VLAN_RX &&
+ veh->h_vlan_proto == ntohs(ETH_P_8021Q)) {
+ /* fixup csum if needed */
+ if (skb->ip_summed == CHECKSUM_COMPLETE) {
+ vsum = csum_partial(va + ETH_HLEN, VLAN_HLEN, 0);
+ skb->csum = csum_sub(skb->csum, vsum);
+ }
+ /* pop tag */
+ __vlan_hwaccel_put_tag(skb, ntohs(veh->h_vlan_TCI));
+ memmove(va + VLAN_HLEN, va, 2 * ETH_ALEN);
+ skb->len -= VLAN_HLEN;
+ skb->data_len -= VLAN_HLEN;
+ frag = skb_shinfo(skb)->frags;
+ frag->page_offset += VLAN_HLEN;
+ skb_frag_size_set(frag, skb_frag_size(frag) - VLAN_HLEN);
+ }
+}
+
static inline int
myri10ge_rx_done(struct myri10ge_slice_state *ss, int len, __wsum csum)
{
@@ -1326,6 +1362,7 @@ myri10ge_rx_done(struct myri10ge_slice_state *ss, int len, __wsum csum)
skb->ip_summed = CHECKSUM_COMPLETE;
skb->csum = csum;
}
+ myri10ge_vlan_rx(mgp->dev, va, skb);
skb_record_rx_queue(skb, ss - &mgp->ss[0]);
napi_gro_frags(&ss->napi);
@@ -3851,6 +3888,10 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
netdev->netdev_ops = &myri10ge_netdev_ops;
netdev->mtu = myri10ge_initial_mtu;
netdev->hw_features = mgp->features | NETIF_F_RXCSUM;
+
+ /* fake NETIF_F_HW_VLAN_RX for good GRO performance */
+ netdev->hw_features |= NETIF_F_HW_VLAN_RX;
+
netdev->features = netdev->hw_features;
if (dac_enabled)
--
1.7.9.5
^ permalink raw reply related
* Re: pull request: wireless 2012-11-30
From: David Miller @ 2012-11-30 18:40 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20121130182459.GB2355@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Fri, 30 Nov 2012 13:25:00 -0500
> I have a couple of stragglers intended for 3.7...
>
> The iwlwifi patch fixes a bug in CCK basic rate calculations.
>
> The mac80211 patch removes an unnecessary function call that was
> generating a lot of log SPAM.
Pulled, thanks John.
I want to warn you ahead of time that these might not make it.
^ permalink raw reply
* Re: [PATCH] Smack: Add missing depends on INET in Kconfig
From: David Miller @ 2012-11-30 18:43 UTC (permalink / raw)
To: rdunlap
Cc: casey, paul, sfr, linux-next, linux-kernel, netdev,
linux-security-module
In-Reply-To: <50B8EF79.4080907@xenotime.net>
From: Randy Dunlap <rdunlap@xenotime.net>
Date: Fri, 30 Nov 2012 09:40:09 -0800
> On 11/30/2012 09:28 AM, Casey Schaufler wrote:
>
>> Because NETLABEL depends on INET SECURITY_SMACK
>> has to explicitly call out the dependency.
>>
>> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
>
>
> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
>
> Thanks for the quick fix.
In what tree does this Kconfig file look like this?
In my net-next tree the current dependencies are expressed as:
depends on NETLABEL && SECURITY_NETWORK
^ permalink raw reply
* ip6_rt_gc_elasticity and ip6_rt_gc_min_interval race in rt6_alloc_cow() ?
From: Jiri Bohac @ 2012-11-30 18:43 UTC (permalink / raw)
To: netdev; +Cc: mkubecek
Hi,
I came across this code in rt6_alloc_cow():
if (rt6_bind_neighbour(rt, rt->dst.dev)) {
struct net *net = dev_net(rt->dst.dev);
int saved_rt_min_interval =
net->ipv6.sysctl.ip6_rt_gc_min_interval;
int saved_rt_elasticity =
net->ipv6.sysctl.ip6_rt_gc_elasticity;
if (attempts-- > 0) {
net->ipv6.sysctl.ip6_rt_gc_elasticity = 1;
net->ipv6.sysctl.ip6_rt_gc_min_interval = 0;
ip6_dst_gc(&net->ipv6.ip6_dst_ops);
net->ipv6.sysctl.ip6_rt_gc_elasticity =
saved_rt_elasticity;
net->ipv6.sysctl.ip6_rt_gc_min_interval =
saved_rt_min_interval;
goto retry;
}
net_warn_ratelimited("Neighbour table overflow\n");
dst_free(&rt->dst);
return NULL;
}
I believe there is a race condition in the setting of
ip6_rt_gc_elasticity and ip6_rt_gc_min_interval. I have not seen
happen, though:
1) a setting made by the user via sysctl while ip6_dst_gc() is
running will get lost
2) another instance of rt6_alloc_cow() may save the temporary
values in the saved_* variables, making those permanent.
Am I overlooking some synchronization or should I send a
patch to fix this?
Thanks,
--
Jiri Bohac <jbohac@suse.cz>
SUSE Labs, SUSE CZ
^ permalink raw reply
* Re: [PATCH] Smack: Add missing depends on INET in Kconfig
From: Paul Moore @ 2012-11-30 18:43 UTC (permalink / raw)
To: Randy Dunlap, Casey Schaufler
Cc: Stephen Rothwell, linux-next, linux-kernel,
netdev@vger.kernel.org, linux-security-module
In-Reply-To: <50B8EF79.4080907@xenotime.net>
On Friday, November 30, 2012 09:40:09 AM Randy Dunlap wrote:
> On 11/30/2012 09:28 AM, Casey Schaufler wrote:
> > Because NETLABEL depends on INET SECURITY_SMACK
> > has to explicitly call out the dependency.
> >
> > Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
>
> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
>
> Thanks for the quick fix.
+1
Thanks Casey.
> > ---
> >
> > security/smack/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/security/smack/Kconfig b/security/smack/Kconfig
> > index 9fb14ef..1be1088 100644
> > --- a/security/smack/Kconfig
> > +++ b/security/smack/Kconfig
> > @@ -1,5 +1,6 @@
> >
> > config SECURITY_SMACK
> >
> > bool "Simplified Mandatory Access Control Kernel Support"
> >
> > + depends on INET
> >
> > depends on NET
> > depends on SECURITY
> > select NETLABEL
> >
> > --
--
paul moore
www.paul-moore.com
^ permalink raw reply
* Re: [PATCH v3 resend net-next 0/2] myri10ge: LRO to GRO conversion
From: David Miller @ 2012-11-30 18:44 UTC (permalink / raw)
To: gallatin; +Cc: netdev
In-Reply-To: <1354300319-30771-1-git-send-email-gallatin@myri.com>
From: Andrew Gallatin <gallatin@myri.com>
Date: Fri, 30 Nov 2012 13:31:57 -0500
> I'm resending this after fixing email client issues.
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] Smack: Add missing depends on INET in Kconfig
From: Casey Schaufler @ 2012-11-30 18:47 UTC (permalink / raw)
To: David Miller
Cc: rdunlap, paul, sfr, linux-next, linux-kernel, netdev,
linux-security-module
In-Reply-To: <20121130.134326.730429492162984746.davem@davemloft.net>
On 11/30/2012 10:43 AM, David Miller wrote:
> From: Randy Dunlap <rdunlap@xenotime.net>
> Date: Fri, 30 Nov 2012 09:40:09 -0800
>
>> On 11/30/2012 09:28 AM, Casey Schaufler wrote:
>>
>>> Because NETLABEL depends on INET SECURITY_SMACK
>>> has to explicitly call out the dependency.
>>>
>>> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
>>
>> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
>>
>> Thanks for the quick fix.
> In what tree does this Kconfig file look like this?
James Morris' security-next
>
> In my net-next tree the current dependencies are expressed as:
>
> depends on NETLABEL && SECURITY_NETWORK
>
^ permalink raw reply
* Re: ip6_rt_gc_elasticity and ip6_rt_gc_min_interval race in rt6_alloc_cow() ?
From: David Miller @ 2012-11-30 18:50 UTC (permalink / raw)
To: jbohac; +Cc: netdev, mkubecek
In-Reply-To: <20121130184336.GB7113@midget.suse.cz>
From: Jiri Bohac <jbohac@suse.cz>
Date: Fri, 30 Nov 2012 19:43:36 +0100
> I believe there is a race condition in the setting of
> ip6_rt_gc_elasticity and ip6_rt_gc_min_interval. I have not seen
> happen, though:
>
> 1) a setting made by the user via sysctl while ip6_dst_gc() is
> running will get lost
>
> 2) another instance of rt6_alloc_cow() may save the temporary
> values in the saved_* variables, making those permanent.
>
> Am I overlooking some synchronization or should I send a
> patch to fix this?
The ipv4 routing cache had the same issue, I really and sincerely
doubt this race matters in practice.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox