* Re: am335x: cpsw: phy ignores max-speed setting
From: Lennart Sorensen @ 2014-11-06 19:20 UTC (permalink / raw)
To: Yegor Yefremov; +Cc: netdev, N, Mugunthan V, mpa, Daniel Mack
In-Reply-To: <CAGm1_ktWK5ai85PZJTkq8Q1mAFH6JZ5XM1mDOHO3K_N2iGNLWg@mail.gmail.com>
On Thu, Nov 06, 2014 at 05:25:13PM +0100, Yegor Yefremov wrote:
> I' m trying to override max-speed setting for both CPSW connected
> PHYs. This is my DTS section for configuring CPSW:
>
> &mac {
> pinctrl-names = "default", "sleep";
> pinctrl-0 = <&cpsw_default>;
> pinctrl-1 = <&cpsw_sleep>;
> dual_emac = <1>;
>
> status = "okay";
> };
>
> &davinci_mdio {
> pinctrl-names = "default", "sleep";
> pinctrl-0 = <&davinci_mdio_default>;
> pinctrl-1 = <&davinci_mdio_sleep>;
>
> status = "okay";
> };
>
> &cpsw_emac0 {
> phy_id = <&davinci_mdio>, <0>;
> phy-mode = "rgmii-id";
> dual_emac_res_vlan = <1>;
> max-speed = <100>;
> };
>
> &cpsw_emac1 {
> phy_id = <&davinci_mdio>, <1>;
> phy-mode = "rgmii-id";
> dual_emac_res_vlan = <2>;
> max-speed = <100>;
> };
>
> But in drivers/net/phy/phy_device.c->of_set_phy_supported() routine I
> don't get through node check, i.e. node == NULL. Any idea why?
>
> static void of_set_phy_supported(struct phy_device *phydev)
> {
> struct device_node *node = phydev->dev.of_node;
> u32 max_speed;
Did you try adding a printk here to make sure it is actually called?
> if (!IS_ENABLED(CONFIG_OF_MDIO))
> return;
Do you have CONFIG_OF_MDIO on? I would think so.
> if (!node)
> return;
>
> if (!of_property_read_u32(node, "max-speed", &max_speed)) {
> /* The default values for phydev->supported are
> provided by the PHY
> * driver "features" member, we want to reset to sane
> defaults fist
> * before supporting higher speeds.
> */
> phydev->supported &= PHY_DEFAULT_FEATURES;
>
> switch (max_speed) {
> default:
> return;
>
> case SPEED_1000:
> phydev->supported |= PHY_1000BT_FEATURES;
> case SPEED_100:
> phydev->supported |= PHY_100BT_FEATURES;
> case SPEED_10:
> phydev->supported |= PHY_10BT_FEATURES;
> }
> }
> }
--
Len Sorensen
^ permalink raw reply
* Re: [PATCH RFC net] ip_tunnel: Respect the IP_DF bit of the inner packet.
From: David Miller @ 2014-11-06 19:33 UTC (permalink / raw)
To: steffen.klassert; +Cc: netdev
In-Reply-To: <20141105080930.GE6390@secunet.com>
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Wed, 5 Nov 2014 09:09:30 +0100
> The pmtu calculation depends on the IP_DF bit in tnl_update_pmtu().
> If the IP_DF bit is set, the pmtu calculation is based on the outer
> packet size. Otherwise it is based on the inner packet size.
> If xfrm is used after tunneling through an ipip device, the mtu of
> the outer device can be lower than the mtu of the ipip device.
> Reporting the mtu of the ipip device is wrong in this case. So
> respect the IP_DF bit of the inner packet on ipv4 to report the
> calculated mtu of the outer device.
>
> Fixes: fd58156e456d ("IPIP: Use ip-tunneling code.")
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
> ---
>
> I marked this as RFC because it affects the mtu calculation of
> gre tunnels too. I think it should be ok, but I have no testcase
> to confirm the correctness for gre tunnels. So would be good if
> someone with gre knowlegde could look at this.
>
> If it turns out that we can't do that for gre, we need to
> split this code back into a gre and an ipip version.
Looking quickly at this, the don't-frag handling in the
pre-ip-tunneling GRE code conversion used different conditions
wrt. calculating 'df'.
It takes the frag off from skb->data's IPH when skb->protocol
is GRE, for example.
So we may have to do this split.
^ permalink raw reply
* Re: [PATCH v2] stmmac: fix sparse warnings
From: David Miller @ 2014-11-06 19:35 UTC (permalink / raw)
To: andriy.shevchenko; +Cc: peppe.cavallaro, netdev, vbridgers2013
In-Reply-To: <1415180732-8011-1-git-send-email-andriy.shevchenko@linux.intel.com>
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Wed, 5 Nov 2014 11:45:32 +0200
> This patch fixes the following sparse warnings.
>
> drivers/net/ethernet/stmicro/stmmac/enh_desc.c:381:30: warning: symbol 'enh_desc_ops' was not declared. Should it be static?
> drivers/net/ethernet/stmicro/stmmac/norm_desc.c:253:30: warning: symbol 'ndesc_ops' was not declared. Should it be static?
> drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c:141:33: warning: symbol 'stmmac_ptp' was not declared. Should it be static?
>
> There is no functional change.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Acked-by: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
> ---
> Since v1:
> - redone as Giuseppe suggested
Applied, thanks.
^ permalink raw reply
* Re: [PATCH v3 0/4] stmmac: pci: various cleanups and fixes
From: David Miller @ 2014-11-06 19:39 UTC (permalink / raw)
To: andriy.shevchenko; +Cc: peppe.cavallaro, netdev, hock.leong.kweh, vbridgers2013
In-Reply-To: <1415183249-9231-1-git-send-email-andriy.shevchenko@linux.intel.com>
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Wed, 5 Nov 2014 12:27:25 +0200
> There are few cleanups and fixes regarding to stmmac PCI driver.
> This has been tested on Intel Galileo board with recent net-next tree.
>
> Since v2:
> - drop patch 5/5 since it will be part of a big change across entire subsystem
>
> Since v1:
> - remove already applied patch
> - append patch 1/5
> - rework patch 3/5 to be functional compatible with original code
These look fine, series applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCHv2 net-next] xen-netback: remove unconditional __pskb_pull_tail() in guest Tx path
From: David Miller @ 2014-11-06 19:40 UTC (permalink / raw)
To: david.vrabel; +Cc: netdev, xen-devel, ian.campbell, wei.liu2, malcolm.crossley
In-Reply-To: <1415184622-19421-1-git-send-email-david.vrabel@citrix.com>
From: David Vrabel <david.vrabel@citrix.com>
Date: Wed, 5 Nov 2014 10:50:22 +0000
> From: Malcolm Crossley <malcolm.crossley@citrix.com>
>
> Unconditionally pulling 128 bytes into the linear area is not required
> for:
>
> - security: Every protocol demux starts with pskb_may_pull() to pull
> frag data into the linear area, if necessary, before looking at
> headers.
>
> - performance: Netback has already grant copied up-to 128 bytes from
> the first slot of a packet into the linear area. The first slot
> normally contain all the IPv4/IPv6 and TCP/UDP headers.
>
> The unconditional pull would often copy frag data unnecessarily. This
> is a performance problem when running on a version of Xen where grant
> unmap avoids TLB flushes for pages which are not accessed. TLB
> flushes can now be avoided for > 99% of unmaps (it was 0% before).
>
> Grant unmap TLB flush avoidance will be available in a future version
> of Xen (probably 4.6).
>
> Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com>
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next 0/3] sfc: Clean up Siena SR-IOV support in preparation for EF10 SR-IOV support
From: David Miller @ 2014-11-06 19:43 UTC (permalink / raw)
To: sshah; +Cc: netdev, linux-net-drivers
In-Reply-To: <545A14CD.6040809@solarflare.com>
From: Shradha Shah <sshah@solarflare.com>
Date: Wed, 5 Nov 2014 12:15:09 +0000
> This patch series provides a base and clean up for the upcoming
> EF10 SRIOV patches.
Series applied, thanks.
^ permalink raw reply
* [PATCH 0/2 net-next] sunvnet: bug fixes
From: Sowmini Varadhan @ 2014-11-06 19:50 UTC (permalink / raw)
To: davem, sowmini.varadhan, david.stevens, ben; +Cc: netdev
This patch series has a coding-style fix and a bug fix.
The coding style fix (patch 1) is the extra indentation flagged by
Ben Hutchings:
http://marc.info/?l=linux-netdev&m=141529243409594&w=2
The bugfix (patch 2) is the following:
when vnet_event_napi() is called as part of napi_resume
(i.e., continuation of a previous NAPI read that was truncated
due to budget constraints), and then finds no more packets to read,
the code was trying to avoid an additional trip through ldc_rx
as an optimization. However, when this corner case happens, we would
need to reset a number of dring state bits such as rcv_nxt carefully,
which quickly becomes complex and hacky. The cleaner solution
is to just roll back to vnet_poll, re-enable interrupts and set up
dring state as was done in the pre-NAPI version of the driver.
Sowmini Varadhan (2):
Fix indentation in maybe_tx_wakeup()
Return from vnet_napi_event() if no packets to read
drivers/net/ethernet/sun/sunvnet.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--
1.8.4.2
^ permalink raw reply
* [PATCH 2/2 net-next] sunvnet: Return from vnet_napi_event() if no packets to read
From: Sowmini Varadhan @ 2014-11-06 19:51 UTC (permalink / raw)
To: davem, sowmini.varadhan, david.stevens; +Cc: netdev
vnet_event_napi() may be called as part of the NAPI ->poll,
to resume reading descriptor rings. When no data is available,
descriptor ring state (e.g., rcv_nxt) needs to be reset
carefully to stay in lock-step with ldc_read(). In the interest
of simplicity, the best way to do this is to return from
vnet_event_napi() when there are no more packets to read.
The next trip through ldc_rx will correctly set up the dring state.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Tested-by: David Stevens <david.stevens@oracle.com>
---
drivers/net/ethernet/sun/sunvnet.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 2688b19..5c5fb59 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -691,7 +691,6 @@ ldc_ctrl:
pkt->end_idx = -1;
goto napi_resume;
}
-ldc_read:
err = ldc_read(vio->lp, &msgbuf, sizeof(msgbuf));
if (unlikely(err < 0)) {
if (err == -ECONNRESET)
@@ -722,8 +721,8 @@ napi_resume:
err = vnet_rx(port, &msgbuf, &npkts, budget);
if (npkts >= budget)
break;
- if (npkts == 0 && err != -ECONNRESET)
- goto ldc_read;
+ if (npkts == 0)
+ break;
} else if (msgbuf.tag.stype == VIO_SUBTYPE_ACK) {
err = vnet_ack(port, &msgbuf);
if (err > 0)
--
1.8.4.2
^ permalink raw reply related
* [PATCH 1/2 net-next] sunvnet: Fix indentation in maybe_tx_wakeup()
From: Sowmini Varadhan @ 2014-11-06 19:51 UTC (permalink / raw)
To: davem, sowmini.varadhan, ben; +Cc: netdev
remove redundant tab.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Reported-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/net/ethernet/sun/sunvnet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index e7bb63b..2688b19 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -627,7 +627,7 @@ static void maybe_tx_wakeup(struct vnet_port *port)
struct vio_dring_state *dr;
dr = &port->vio.drings[VIO_DRIVER_TX_RING];
- netif_tx_wake_queue(txq);
+ netif_tx_wake_queue(txq);
}
__netif_tx_unlock(txq);
}
--
1.8.4.2
^ permalink raw reply related
* Re: [PATCH] net: mv643xx_eth: reclaim TX skbs only when released by the HW
From: David Miller @ 2014-11-06 19:55 UTC (permalink / raw)
To: karl.beldan
Cc: karl.beldan, netdev, ijc, eric.dumazet, ezequiel.garcia,
sebastian.hesselbarth
In-Reply-To: <1415197979-1702-1-git-send-email-karl.beldan@gmail.com>
From: Karl Beldan <karl.beldan@gmail.com>
Date: Wed, 5 Nov 2014 15:32:59 +0100
> From: Karl Beldan <karl.beldan@rivierawaves.com>
>
> ATM, txq_reclaim will dequeue and free an skb for each tx desc released
> by the hw that has TX_LAST_DESC set. However, in case of TSO, each
> hw desc embedding the last part of a segment has TX_LAST_DESC set,
> losing the one-to-one 'last skb frag'/'TX_LAST_DESC set' correspondance,
> which causes data corruption.
>
> Fix this by checking TX_ENABLE_INTERRUPT instead of TX_LAST_DESC, and
> warn when trying to dequeue from an empty txq (which can be symptomatic
> of releasing skbs prematurely).
>
> Fixes: 3ae8f4e0b98 ('net: mv643xx_eth: Implement software TSO')
> Reported-by: Slawomir Gajzner <slawomir.gajzner@gmail.com>
> Reported-by: Julien D'Ascenzio <jdascenzio@yahoo.fr>
> Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
Applied and queued up for -stable, but it seems there might still be some
bugs to resolve...
^ permalink raw reply
* Re: [net PATCH 1/1] drivers: net: cpsw: remove cpsw_ale_stop from cpsw_ale_destroy
From: David Miller @ 2014-11-06 19:58 UTC (permalink / raw)
To: mugunthanvnm; +Cc: netdev
In-Reply-To: <1415192611-22722-1-git-send-email-mugunthanvnm@ti.com>
From: Mugunthan V N <mugunthanvnm@ti.com>
Date: Wed, 5 Nov 2014 18:33:31 +0530
> when cpsw is build as modulea and simple insert and removal of module
> creates a deadlock, due to delete timer. the timer is created and destroyed
> in cpsw_ale_start and cpsw_ale_stop which are from device open and close.
...
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Applied, thank you.
^ permalink raw reply
* Re: [PATCH] net/9p: remove a comment about pref member which doesn't exist
From: David Miller @ 2014-11-06 19:59 UTC (permalink / raw)
To: ryomnktml; +Cc: ericvh, rminnich, lucho, netdev, linux-kernel
In-Reply-To: <1415198758-18680-1-git-send-email-ryomnktml@gmail.com>
From: Ryo Munakata <ryomnktml@gmail.com>
Date: Wed, 5 Nov 2014 23:45:58 +0900
> Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
Applied, thanks.
^ permalink raw reply
* Re: [patch net-next] sched: fix act file names in header comment
From: David Miller @ 2014-11-06 20:05 UTC (permalink / raw)
To: jiri; +Cc: netdev, jhs
In-Reply-To: <1415217111-9803-1-git-send-email-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Wed, 5 Nov 2014 20:51:51 +0100
> Fixes: 4bba3925 ("[PKT_SCHED]: Prefix tc actions with act_")
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Applied, thanks Jiri.
^ permalink raw reply
* Re: [PATCH] net: dsa: slave: Fix autoneg for phys on switch MDIO bus
From: David Miller @ 2014-11-06 20:06 UTC (permalink / raw)
To: andrew; +Cc: f.fainelli, netdev
In-Reply-To: <1415213248-29037-1-git-send-email-andrew@lunn.ch>
From: Andrew Lunn <andrew@lunn.ch>
Date: Wed, 5 Nov 2014 19:47:28 +0100
> When the ports phys are connected to the switches internal MDIO bus,
> we need to connect the phy to the slave netdev, otherwise
> auto-negotiation etc, does not work.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Applied, thanks Andrew.
^ permalink raw reply
* Re: [PATCH 1/3] dsa: mv88e6171: Add support for mv88e6172
From: David Miller @ 2014-11-06 20:08 UTC (permalink / raw)
To: andrew
Cc: jason, netdev, linux-arm-kernel, thomas.petazzoni, tawfik,
maxime.ripard
In-Reply-To: <1415214121-29286-2-git-send-email-andrew@lunn.ch>
From: Andrew Lunn <andrew@lunn.ch>
Date: Wed, 5 Nov 2014 20:01:59 +0100
> The mv88e6172 is very similar to the mv88e6171. So extend the
> mv88e6171 driver to support it.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Applied to net-next, thanks.
^ permalink raw reply
* RE: [PATCH net] dcbnl : Fix lock initialization
From: Anish Bhatt @ 2014-11-06 19:12 UTC (permalink / raw)
To: John Fastabend
Cc: netdev@vger.kernel.org, davem@davemloft.net,
john.r.fastabend@intel.com, ying.xue@windriver.com,
jeffrey.t.kirsher@intel.com, ebiederm@xmission.com
In-Reply-To: <545BC5F4.9070501@gmail.com>
Yes, without this kernel is complaining about inconsitent lock state when lock debugging is enabled. Unfortunately I do not have the trace lying around right now.
If you wish, you can reject this patch, I'll resend it when I get the trace again, with trace included.
-Anish
________________________________________
From: John Fastabend [john.fastabend@gmail.com]
Sent: Thursday, November 06, 2014 11:03 AM
To: Anish Bhatt
Cc: netdev@vger.kernel.org; davem@davemloft.net; john.r.fastabend@intel.com; ying.xue@windriver.com; jeffrey.t.kirsher@intel.com; ebiederm@xmission.com
Subject: Re: [PATCH net] dcbnl : Fix lock initialization
On 11/06/2014 10:09 AM, Anish Bhatt wrote:
> dcb_lock was being used uninitialized in dcbnl and is infact missing
> initialization code. Fixed
>
Are you trying to resolve a bug? It is initialized with
static DEFINE_SPINLOCK(dcb_lock);
and if you follow the code far enough you get to this in
spinlock_types.h:
#ifdef CONFIG_DEBUG_SPINLOCK
# define SPIN_DEBUG_INIT(lockname) \
.magic = SPINLOCK_MAGIC, \
.owner_cpu = -1, \
.owner = SPINLOCK_OWNER_INIT,
#else
# define SPIN_DEBUG_INIT(lockname)
#endif
#define __RAW_SPIN_LOCK_INITIALIZER(lockname) \
{ \
.raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
SPIN_DEBUG_INIT(lockname) \
SPIN_DEP_MAP_INIT(lockname) }
[...]
--
John Fastabend Intel Corporation
^ permalink raw reply
* Re: [PATCH net-next] net; ipv[46] - Remove 2 unnecessary NETDEBUG OOM messages
From: David Miller @ 2014-11-06 20:11 UTC (permalink / raw)
To: joe; +Cc: netdev
In-Reply-To: <1415227161.6634.24.camel@perches.com>
From: Joe Perches <joe@perches.com>
Date: Wed, 05 Nov 2014 14:39:21 -0800
> These messages aren't useful as there's a generic dump_stack()
> on OOM.
>
> Neaten the comment and if test above the OOM by separating the
> assign in if into an allocation then if test.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] net: esp: Convert NETDEBUG to pr_info
From: David Miller @ 2014-11-06 20:11 UTC (permalink / raw)
To: joe; +Cc: steffen.klassert, herbert, kaber, shemminger, netdev,
linux-kernel
In-Reply-To: <1415230568.6634.36.camel@perches.com>
From: Joe Perches <joe@perches.com>
Date: Wed, 05 Nov 2014 15:36:08 -0800
> Commit 64ce207306de ("[NET]: Make NETDEBUG pure printk wrappers")
> originally had these NETDEBUG printks as always emitting.
>
> Commit a2a316fd068c ("[NET]: Replace CONFIG_NET_DEBUG with sysctl")
> added a net_msg_warn sysctl to these NETDEBUG uses.
>
> Convert these NETDEBUG uses to normal pr_info calls.
>
> This changes the output prefix from "ESP: " to include
> "IPSec: " for the ipv4 case and "IPv6: " for the ipv6 case.
>
> These output lines are now like the other messages in the files.
>
> Other miscellanea:
>
> Neaten the arithmetic spacing to be consistent with other
> arithmetic spacing in the files.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] sock.h: Remove unused NETDEBUG macro
From: David Miller @ 2014-11-06 20:11 UTC (permalink / raw)
To: joe; +Cc: netdev, linux-kernel
In-Reply-To: <1415230929.6634.38.camel@perches.com>
From: Joe Perches <joe@perches.com>
Date: Wed, 05 Nov 2014 15:42:09 -0800
> It's unused now, just delete it.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied, thanks for doing this work Joe.
^ permalink raw reply
* Re: [PATCH net-next 0/3] r8152: rtl_ops_init modify
From: David Miller @ 2014-11-06 20:15 UTC (permalink / raw)
To: hayeswang; +Cc: netdev, nic_swsd, linux-kernel, linux-usb
In-Reply-To: <1394712342-15778-84-Taiwan-albertk@realtek.com>
From: Hayes Wang <hayeswang@realtek.com>
Date: Thu, 6 Nov 2014 12:47:37 +0800
> Initialize the ops through tp->version. This could skip checking
> each VID/PID.
Series applied, thank you.
^ permalink raw reply
* Re: [PATCH net] dcbnl : Fix lock initialization
From: John Fastabend @ 2014-11-06 20:16 UTC (permalink / raw)
To: Anish Bhatt
Cc: netdev@vger.kernel.org, davem@davemloft.net,
john.r.fastabend@intel.com, ying.xue@windriver.com,
jeffrey.t.kirsher@intel.com, ebiederm@xmission.com
In-Reply-To: <525DB349B3FB5444AE057A887CB2A8D8935DCF@nice.asicdesigners.com>
On 11/06/2014 11:12 AM, Anish Bhatt wrote:
> Yes, without this kernel is complaining about inconsitent lock state
> when lock debugging is enabled. Unfortunately I do not have the trace
> lying around right now.
>
If you have the trace that might help. I can't recall seeing any splats
in these code paths. Also as far as I can tell you shouldn't need to do
an init after the define. There are lots of examples in ./net/core where
this is done.
So we need to sort out why the init resolves the issue.
> If you wish, you can reject this patch, I'll resend it when I get the trace again, with trace included.
> -Anish
> ________________________________________
> From: John Fastabend [john.fastabend@gmail.com]
> Sent: Thursday, November 06, 2014 11:03 AM
> To: Anish Bhatt
> Cc: netdev@vger.kernel.org; davem@davemloft.net; john.r.fastabend@intel.com; ying.xue@windriver.com; jeffrey.t.kirsher@intel.com; ebiederm@xmission.com
> Subject: Re: [PATCH net] dcbnl : Fix lock initialization
>
> On 11/06/2014 10:09 AM, Anish Bhatt wrote:
>> dcb_lock was being used uninitialized in dcbnl and is infact missing
>> initialization code. Fixed
>>
>
> Are you trying to resolve a bug? It is initialized with
>
> static DEFINE_SPINLOCK(dcb_lock);
>
> and if you follow the code far enough you get to this in
> spinlock_types.h:
>
>
> #ifdef CONFIG_DEBUG_SPINLOCK
> # define SPIN_DEBUG_INIT(lockname) \
> .magic = SPINLOCK_MAGIC, \
> .owner_cpu = -1, \
> .owner = SPINLOCK_OWNER_INIT,
> #else
> # define SPIN_DEBUG_INIT(lockname)
> #endif
>
> #define __RAW_SPIN_LOCK_INITIALIZER(lockname) \
> { \
> .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
> SPIN_DEBUG_INIT(lockname) \
> SPIN_DEP_MAP_INIT(lockname) }
>
> [...]
>
>
>
> --
> John Fastabend Intel Corporation
>
--
John Fastabend Intel Corporation
^ permalink raw reply
* Re: [PATCH 0/2 net-next] sunvnet: bug fixes
From: David Miller @ 2014-11-06 20:17 UTC (permalink / raw)
To: sowmini.varadhan; +Cc: david.stevens, ben, netdev
In-Reply-To: <20141106195054.GD6238@oracle.com>
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date: Thu, 6 Nov 2014 14:50:54 -0500
> This patch series has a coding-style fix and a bug fix.
>
> The coding style fix (patch 1) is the extra indentation flagged by
> Ben Hutchings:
> http://marc.info/?l=linux-netdev&m=141529243409594&w=2
>
> The bugfix (patch 2) is the following:
> when vnet_event_napi() is called as part of napi_resume
> (i.e., continuation of a previous NAPI read that was truncated
> due to budget constraints), and then finds no more packets to read,
> the code was trying to avoid an additional trip through ldc_rx
> as an optimization. However, when this corner case happens, we would
> need to reset a number of dring state bits such as rcv_nxt carefully,
> which quickly becomes complex and hacky. The cleaner solution
> is to just roll back to vnet_poll, re-enable interrupts and set up
> dring state as was done in the pre-NAPI version of the driver.
Series applied, thanks.
^ permalink raw reply
* RE: [PATCH net] dcbnl : Fix lock initialization
From: Anish Bhatt @ 2014-11-06 20:19 UTC (permalink / raw)
To: John Fastabend
Cc: netdev@vger.kernel.org, davem@davemloft.net,
john.r.fastabend@intel.com, ying.xue@windriver.com,
jeffrey.t.kirsher@intel.com, ebiederm@xmission.com
In-Reply-To: <545BD720.6050008@gmail.com>
Dave,
Please do not apply this patch then.
John,
I will try to recreate this again and investigate. My setup is currently being used for other purposes so might take a few days.
-Anish
________________________________________
From: John Fastabend [john.fastabend@gmail.com]
Sent: Thursday, November 06, 2014 12:16 PM
To: Anish Bhatt
Cc: netdev@vger.kernel.org; davem@davemloft.net; john.r.fastabend@intel.com; ying.xue@windriver.com; jeffrey.t.kirsher@intel.com; ebiederm@xmission.com
Subject: Re: [PATCH net] dcbnl : Fix lock initialization
On 11/06/2014 11:12 AM, Anish Bhatt wrote:
> Yes, without this kernel is complaining about inconsitent lock state
> when lock debugging is enabled. Unfortunately I do not have the trace
> lying around right now.
>
If you have the trace that might help. I can't recall seeing any splats
in these code paths. Also as far as I can tell you shouldn't need to do
an init after the define. There are lots of examples in ./net/core where
this is done.
So we need to sort out why the init resolves the issue.
> If you wish, you can reject this patch, I'll resend it when I get the trace again, with trace included.
> -Anish
> ________________________________________
> From: John Fastabend [john.fastabend@gmail.com]
> Sent: Thursday, November 06, 2014 11:03 AM
> To: Anish Bhatt
> Cc: netdev@vger.kernel.org; davem@davemloft.net; john.r.fastabend@intel.com; ying.xue@windriver.com; jeffrey.t.kirsher@intel.com; ebiederm@xmission.com
> Subject: Re: [PATCH net] dcbnl : Fix lock initialization
>
> On 11/06/2014 10:09 AM, Anish Bhatt wrote:
>> dcb_lock was being used uninitialized in dcbnl and is infact missing
>> initialization code. Fixed
>>
>
> Are you trying to resolve a bug? It is initialized with
>
> static DEFINE_SPINLOCK(dcb_lock);
>
> and if you follow the code far enough you get to this in
> spinlock_types.h:
>
>
> #ifdef CONFIG_DEBUG_SPINLOCK
> # define SPIN_DEBUG_INIT(lockname) \
> .magic = SPINLOCK_MAGIC, \
> .owner_cpu = -1, \
> .owner = SPINLOCK_OWNER_INIT,
> #else
> # define SPIN_DEBUG_INIT(lockname)
> #endif
>
> #define __RAW_SPIN_LOCK_INITIALIZER(lockname) \
> { \
> .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \
> SPIN_DEBUG_INIT(lockname) \
> SPIN_DEP_MAP_INIT(lockname) }
>
> [...]
>
>
>
> --
> John Fastabend Intel Corporation
>
--
John Fastabend Intel Corporation
^ permalink raw reply
* Re: [PATCH 3/3 3.18] rtlwifi: rtl8192se: Fix connection problems
From: John W. Linville @ 2014-11-06 20:45 UTC (permalink / raw)
To: Larry Finger
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1415236254-12274-4-git-send-email-Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
On Wed, Nov 05, 2014 at 07:10:54PM -0600, Larry Finger wrote:
> Changes in the vendor driver were added to rtlwifi, but some updates
> to rtl8192se were missed.
>
> Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
> ---
> drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 129 +++++++++++++--------------
> drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 8 +-
> drivers/net/wireless/rtlwifi/rtl8192se/sw.c | 4 +
> drivers/net/wireless/rtlwifi/rtl8192se/trx.c | 23 +++++
> drivers/net/wireless/rtlwifi/rtl8192se/trx.h | 4 +
> 5 files changed, 100 insertions(+), 68 deletions(-)
This looks a bit big for a fix. Could this be broken-up a bit more?
Perhaps you could enhance the changelog a bit more?
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> index 00e0670..4626203 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> @@ -1170,27 +1170,32 @@ static int _rtl92se_set_media_status(struct ieee80211_hw *hw,
> {
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> u8 bt_msr = rtl_read_byte(rtlpriv, MSR);
> + enum led_ctl_mode ledaction = LED_CTL_NO_LINK;
> u32 temp;
> + u8 mode = MSR_NOLINK;
> +
> bt_msr &= ~MSR_LINK_MASK;
>
> switch (type) {
> case NL80211_IFTYPE_UNSPECIFIED:
> - bt_msr |= (MSR_LINK_NONE << MSR_LINK_SHIFT);
> + mode = MSR_NOLINK;
> RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
> "Set Network type to NO LINK!\n");
> break;
> case NL80211_IFTYPE_ADHOC:
> - bt_msr |= (MSR_LINK_ADHOC << MSR_LINK_SHIFT);
> + mode = MSR_ADHOC;
> RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
> "Set Network type to Ad Hoc!\n");
> break;
> case NL80211_IFTYPE_STATION:
> - bt_msr |= (MSR_LINK_MANAGED << MSR_LINK_SHIFT);
> + mode = MSR_INFRA;
> + ledaction = LED_CTL_LINK;
> RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
> "Set Network type to STA!\n");
> break;
> case NL80211_IFTYPE_AP:
> - bt_msr |= (MSR_LINK_MASTER << MSR_LINK_SHIFT);
> + mode = MSR_AP;
> + ledaction = LED_CTL_LINK;
> RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
> "Set Network type to AP!\n");
> break;
> @@ -1201,7 +1206,17 @@ static int _rtl92se_set_media_status(struct ieee80211_hw *hw,
>
> }
>
> - rtl_write_byte(rtlpriv, (MSR), bt_msr);
> + /* MSR_INFRA == Link in infrastructure network;
> + * MSR_ADHOC == Link in ad hoc network;
> + * Therefore, check link state is necessary.
> + *
> + * MSR_AP == AP mode; link state is not cared here.
> + */
> + if (mode != MSR_AP && rtlpriv->mac80211.link_state < MAC80211_LINKED) {
> + mode = MSR_NOLINK;
> + ledaction = LED_CTL_NO_LINK;
> +}
> + rtl_write_byte(rtlpriv, (MSR), bt_msr | mode);
>
> temp = rtl_read_dword(rtlpriv, TCR);
> rtl_write_dword(rtlpriv, TCR, temp & (~BIT(8)));
> @@ -1262,6 +1277,7 @@ void rtl92se_enable_interrupt(struct ieee80211_hw *hw)
> rtl_write_dword(rtlpriv, INTA_MASK, rtlpci->irq_mask[0]);
> /* Support Bit 32-37(Assign as Bit 0-5) interrupt setting now */
> rtl_write_dword(rtlpriv, INTA_MASK + 4, rtlpci->irq_mask[1] & 0x3F);
> + rtlpci->irq_enabled = true;
> }
>
> void rtl92se_disable_interrupt(struct ieee80211_hw *hw)
> @@ -1276,8 +1292,7 @@ void rtl92se_disable_interrupt(struct ieee80211_hw *hw)
> rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> rtl_write_dword(rtlpriv, INTA_MASK, 0);
> rtl_write_dword(rtlpriv, INTA_MASK + 4, 0);
> -
> - synchronize_irq(rtlpci->pdev->irq);
> + rtlpci->irq_enabled = false;
> }
>
> static u8 _rtl92s_set_sysclk(struct ieee80211_hw *hw, u8 data)
> @@ -2035,9 +2050,9 @@ static void rtl92se_update_hal_rate_table(struct ieee80211_hw *hw,
> u32 ratr_value;
> u8 ratr_index = 0;
> u8 nmode = mac->ht_enable;
> - u8 mimo_ps = IEEE80211_SMPS_OFF;
> u16 shortgi_rate = 0;
> u32 tmp_ratr_value = 0;
> + u32 ratr_mask;
> u8 curtxbw_40mhz = mac->bw_40;
> u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ?
> 1 : 0;
> @@ -2063,26 +2078,21 @@ static void rtl92se_update_hal_rate_table(struct ieee80211_hw *hw,
> case WIRELESS_MODE_N_24G:
> case WIRELESS_MODE_N_5G:
> nmode = 1;
> - if (mimo_ps == IEEE80211_SMPS_STATIC) {
> - ratr_value &= 0x0007F005;
> - } else {
> - u32 ratr_mask;
>
> - if (get_rf_type(rtlphy) == RF_1T2R ||
> - get_rf_type(rtlphy) == RF_1T1R) {
> - if (curtxbw_40mhz)
> - ratr_mask = 0x000ff015;
> - else
> - ratr_mask = 0x000ff005;
> - } else {
> - if (curtxbw_40mhz)
> - ratr_mask = 0x0f0ff015;
> - else
> - ratr_mask = 0x0f0ff005;
> - }
> -
> - ratr_value &= ratr_mask;
> + if (get_rf_type(rtlphy) == RF_1T2R ||
> + get_rf_type(rtlphy) == RF_1T1R) {
> + if (curtxbw_40mhz)
> + ratr_mask = 0x000ff015;
> + else
> + ratr_mask = 0x000ff005;
> + } else {
> + if (curtxbw_40mhz)
> + ratr_mask = 0x0f0ff015;
> + else
> + ratr_mask = 0x0f0ff005;
> }
> +
> + ratr_value &= ratr_mask;
> break;
> default:
> if (rtlphy->rf_type == RF_1T2R)
> @@ -2137,7 +2147,8 @@ static void rtl92se_update_hal_rate_mask(struct ieee80211_hw *hw,
> struct rtl_sta_info *sta_entry = NULL;
> u32 ratr_bitmap;
> u8 ratr_index = 0;
> - u8 curtxbw_40mhz = (sta->bandwidth >= IEEE80211_STA_RX_BW_40) ? 1 : 0;
> + u8 curtxbw_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
> + ? 1 : 0;
> u8 curshortgi_40mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ?
> 1 : 0;
> u8 curshortgi_20mhz = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20) ?
> @@ -2148,9 +2159,7 @@ static void rtl92se_update_hal_rate_mask(struct ieee80211_hw *hw,
> u8 shortgi_rate = 0;
> u32 mask = 0;
> u32 band = 0;
> - bool bmulticast = false;
> u8 macid = 0;
> - u8 mimo_ps = IEEE80211_SMPS_OFF;
>
> sta_entry = (struct rtl_sta_info *) sta->drv_priv;
> wirelessmode = sta_entry->wireless_mode;
> @@ -2198,41 +2207,32 @@ static void rtl92se_update_hal_rate_mask(struct ieee80211_hw *hw,
> band |= (WIRELESS_11N | WIRELESS_11G | WIRELESS_11B);
> ratr_index = RATR_INX_WIRELESS_NGB;
>
> - if (mimo_ps == IEEE80211_SMPS_STATIC) {
> - if (rssi_level == 1)
> - ratr_bitmap &= 0x00070000;
> - else if (rssi_level == 2)
> - ratr_bitmap &= 0x0007f000;
> - else
> - ratr_bitmap &= 0x0007f005;
> + if (rtlphy->rf_type == RF_1T2R ||
> + rtlphy->rf_type == RF_1T1R) {
> + if (rssi_level == 1) {
> + ratr_bitmap &= 0x000f0000;
> + } else if (rssi_level == 3) {
> + ratr_bitmap &= 0x000fc000;
> + } else if (rssi_level == 5) {
> + ratr_bitmap &= 0x000ff000;
> + } else {
> + if (curtxbw_40mhz)
> + ratr_bitmap &= 0x000ff015;
> + else
> + ratr_bitmap &= 0x000ff005;
> + }
> } else {
> - if (rtlphy->rf_type == RF_1T2R ||
> - rtlphy->rf_type == RF_1T1R) {
> - if (rssi_level == 1) {
> - ratr_bitmap &= 0x000f0000;
> - } else if (rssi_level == 3) {
> - ratr_bitmap &= 0x000fc000;
> - } else if (rssi_level == 5) {
> - ratr_bitmap &= 0x000ff000;
> - } else {
> - if (curtxbw_40mhz)
> - ratr_bitmap &= 0x000ff015;
> - else
> - ratr_bitmap &= 0x000ff005;
> - }
> + if (rssi_level == 1) {
> + ratr_bitmap &= 0x0f8f0000;
> + } else if (rssi_level == 3) {
> + ratr_bitmap &= 0x0f8fc000;
> + } else if (rssi_level == 5) {
> + ratr_bitmap &= 0x0f8ff000;
> } else {
> - if (rssi_level == 1) {
> - ratr_bitmap &= 0x0f8f0000;
> - } else if (rssi_level == 3) {
> - ratr_bitmap &= 0x0f8fc000;
> - } else if (rssi_level == 5) {
> - ratr_bitmap &= 0x0f8ff000;
> - } else {
> - if (curtxbw_40mhz)
> - ratr_bitmap &= 0x0f8ff015;
> - else
> - ratr_bitmap &= 0x0f8ff005;
> - }
> + if (curtxbw_40mhz)
> + ratr_bitmap &= 0x0f8ff015;
> + else
> + ratr_bitmap &= 0x0f8ff005;
> }
> }
>
> @@ -2275,15 +2275,12 @@ static void rtl92se_update_hal_rate_mask(struct ieee80211_hw *hw,
> rtl_write_byte(rtlpriv, SG_RATE, shortgi_rate);
> }
>
> - mask |= (bmulticast ? 1 : 0) << 9 | (macid & 0x1f) << 4 | (band & 0xf);
> + mask |= (macid & 0x1f) << 4 | (band & 0xf);
>
> RT_TRACE(rtlpriv, COMP_RATR, DBG_TRACE, "mask = %x, bitmap = %x\n",
> mask, ratr_bitmap);
> rtl_write_dword(rtlpriv, 0x2c4, ratr_bitmap);
> rtl_write_dword(rtlpriv, WFM5, (FW_RA_UPDATE_MASK | (mask << 8)));
> -
> - if (macid != 0)
> - sta_entry->ratr_index = ratr_index;
> }
>
> void rtl92se_update_hal_rate_tbl(struct ieee80211_hw *hw,
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
> index 77c5b5f..e382cef 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
> @@ -399,6 +399,11 @@ static bool _rtl92s_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,
> case 2:
> currentcmd = &postcommoncmd[*step];
> break;
> + default:
> + RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD,
> + "Invalid 'stage' = %d, Check it!\n",
> + *stage);
> + return true;
> }
>
> if (currentcmd->cmdid == CMDID_END) {
> @@ -602,7 +607,7 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw,
> }
> case ERFSLEEP:
> if (ppsc->rfpwr_state == ERFOFF)
> - return false;
> + break;
>
> for (queue_id = 0, i = 0;
> queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
> @@ -1064,7 +1069,6 @@ bool rtl92s_phy_bb_config(struct ieee80211_hw *hw)
> /* Check BB/RF confiuration setting. */
> /* We only need to configure RF which is turned on. */
> path1 = (u8)(rtl92s_phy_query_bb_reg(hw, RFPGA0_TXINFO, 0xf));
> - mdelay(10);
> path2 = (u8)(rtl92s_phy_query_bb_reg(hw, ROFDM0_TRXPATHENABLE, 0xf));
> pathmap = path1 | path2;
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> index aadba29..3c4238e 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> @@ -269,6 +269,7 @@ static struct rtl_hal_ops rtl8192se_hal_ops = {
> .led_control = rtl92se_led_control,
> .set_desc = rtl92se_set_desc,
> .get_desc = rtl92se_get_desc,
> + .is_tx_desc_closed = rtl92se_is_tx_desc_closed,
> .tx_polling = rtl92se_tx_polling,
> .enable_hw_sec = rtl92se_enable_hw_security_config,
> .set_key = rtl92se_set_key,
> @@ -278,6 +279,7 @@ static struct rtl_hal_ops rtl8192se_hal_ops = {
> .get_rfreg = rtl92s_phy_query_rf_reg,
> .set_rfreg = rtl92s_phy_set_rf_reg,
> .get_btc_status = rtl_btc_status_false,
> + .rx_command_packet = rtl92se_rx_command_packet,
> };
>
> static struct rtl_mod_params rtl92se_mod_params = {
> @@ -306,6 +308,8 @@ static struct rtl_hal_cfg rtl92se_hal_cfg = {
> .maps[MAC_RCR_ACRC32] = RCR_ACRC32,
> .maps[MAC_RCR_ACF] = RCR_ACF,
> .maps[MAC_RCR_AAP] = RCR_AAP,
> + .maps[MAC_HIMR] = INTA_MASK,
> + .maps[MAC_HIMRE] = INTA_MASK + 4,
>
> .maps[EFUSE_TEST] = REG_EFUSE_TEST,
> .maps[EFUSE_CTRL] = REG_EFUSE_CTRL,
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
> index 672fd3b..2014b18 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
> @@ -652,8 +652,31 @@ u32 rtl92se_get_desc(u8 *desc, bool istx, u8 desc_name)
> return ret;
> }
>
> +bool rtl92se_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index)
> +{
> + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> + struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
> + u8 *entry = (u8 *)(&ring->desc[ring->idx]);
> + u8 own = (u8)rtl92se_get_desc(entry, true, HW_DESC_OWN);
> +
> + /* beacon packet will only use the first
> + * descriptor iby default, and the own bit may not
> + * be cleared by the hardware
> + */
> + if (own)
> + return false;
> + return true;
> +}
> +
> void rtl92se_tx_polling(struct ieee80211_hw *hw, u8 hw_queue)
> {
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> rtl_write_word(rtlpriv, TP_POLL, BIT(0) << (hw_queue));
> }
> +
> +u32 rtl92se_rx_command_packet(struct ieee80211_hw *hw,
> + struct rtl_stats status,
> + struct sk_buff *skb)
> +{
> + return 0;
> +}
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
> index 5a13f17..bd9f4bf 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
> @@ -43,6 +43,10 @@ bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
> void rtl92se_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
> u8 desc_name, u8 *val);
> u32 rtl92se_get_desc(u8 *pdesc, bool istx, u8 desc_name);
> +bool rtl92se_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index);
> void rtl92se_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
> +u32 rtl92se_rx_command_packet(struct ieee80211_hw *hw,
> + struct rtl_stats status,
> + struct sk_buff *skb);
>
> #endif
> --
> 2.1.2
>
>
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH net-next] dccp: Convert DCCP_WARN to net_warn_ratelimited
From: Joe Perches @ 2014-11-06 20:53 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-kernel, Gerrit Renker
In-Reply-To: <20141106.151149.1321164537677873976.davem@davemloft.net>
Remove the dependency on the "warning" sysctl (net_msg_warn)
which is only used by the LIMIT_NETDEBUG macro.
Convert the LIMIT_NETDEBUG use in DCCP_WARN to the more
common net_warn_ratelimited mechanism.
This still ratelimits based on the net_ratelimit()
function, but removes the check for the sysctl.
Signed-off-by: Joe Perches <joe@perches.com>
---
On Thu, 2014-11-06 at 15:11 -0500, David Miller wrote:
> Applied, thanks for doing this work Joe.
No worries.
What about the LIMIT_NETDEBUG stuff now?
Maybe all of them might as well be net_dbg_ratelimited
even if it changes some of the logging levels.
Probably DCCP_WARN should be net_warn_ratelimited
so let's start there...
net/dccp/dccp.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index c678166..e4c144f 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -22,8 +22,8 @@
/*
* DCCP - specific warning and debugging macros.
*/
-#define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt, \
- __func__, ##a)
+#define DCCP_WARN(fmt, ...) \
+ net_warn_ratelimited("%s: " fmt, __func__, ##__VA_ARGS__)
#define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \
__FILE__, __LINE__, __func__)
#define DCCP_BUG(a...) do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0)
^ permalink raw reply related
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