* [PATCH] qed: fix spelling mistake: "taskelt" -> "tasklet"
From: Colin King @ 2018-05-10 14:03 UTC (permalink / raw)
To: Ariel Elior, everest-linux-l2, David S . Miller, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Trivial fix to spelling mistake in DP_VERBOSE message text
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 70bc5634675c..9feed3b79cd4 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -680,7 +680,7 @@ static int qed_nic_stop(struct qed_dev *cdev)
tasklet_disable(p_hwfn->sp_dpc);
p_hwfn->b_sp_dpc_enabled = false;
DP_VERBOSE(cdev, NETIF_MSG_IFDOWN,
- "Disabled sp taskelt [hwfn %d] at %p\n",
+ "Disabled sp tasklet [hwfn %d] at %p\n",
i, p_hwfn->sp_dpc);
}
}
--
2.17.0
^ permalink raw reply related
* Re: [PATCH] net/mlx4_en: Fix an error handling path in 'mlx4_en_init_netdev()'
From: Dan Carpenter @ 2018-05-10 14:18 UTC (permalink / raw)
To: Yuval Shaia
Cc: Christophe JAILLET, davem, tariqt, netdev, linux-rdma,
linux-kernel, kernel-janitors
In-Reply-To: <20180510133808.GA10943@lap1>
On Thu, May 10, 2018 at 04:38:08PM +0300, Yuval Shaia wrote:
> On Thu, May 10, 2018 at 09:02:26AM +0200, Christophe JAILLET wrote:
> > If an error occurs, 'mlx4_en_destroy_netdev()' is called.
> > It then calls 'mlx4_en_free_resources()' which does the needed resources
> > cleanup.
> >
> > So, doing some explicit kfree in the error handling path would lead to
> > some double kfree.
>
> Patch make sense but what's bothering me is that mlx4_en_free_resources
> loops on the entire array, assuming !priv->tx_ring[t] means entry is
> allocated but the existing code does not assume that, see [1]. So i looked
> to see where tx_ring array is zeroed and didn't find it.
>
> Am i missing something here.
>
It's zeroed twice. alloc_etherdev_mqs() allocates zeroed memory and
then we do a memset(priv, 0, sizeof(struct mlx4_en_priv));
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH v1 iproute2-next 2/3] rdma: print driver resource attributes
From: David Ahern @ 2018-05-10 14:20 UTC (permalink / raw)
To: Steve Wise, leon; +Cc: stephen, netdev, linux-rdma
In-Reply-To: <e94d0444-fcda-3a62-3b12-3b9e6ff23119@opengridcomputing.com>
On 5/10/18 8:19 AM, Steve Wise wrote:
>
> On 5/9/2018 11:08 PM, David Ahern wrote:
>> On 5/7/18 9:53 AM, Steve Wise wrote:
>>> @@ -152,7 +153,10 @@ int main(int argc, char **argv)
>>> pretty_output = true;
>>> break;
>>> case 'd':
>>> - show_details = true;
>>> + if (show_details)
>>> + show_driver_details = true;
>>> + else
>>> + show_details = true;
>>> break;
>>> case 'j':
>>> json_output = true;
>> The above change should be reflected in the man page.
>
> I did mention it in the man page:
>
> -d, --details
> Output detailed information. Adding a second -d includes
> driver-specific details.
>
> But I wasn't sure how to show it in the syntax. Maybe this?
>
> OPTIONS := { -V[ersion] | -d[etails] [-d[etails]] } -j[son] } -p[retty] }
I should have read the second patch before commenting. Didn't it have
first -d = details, a second -d = driver details? That should be fine.
>
>
>> Also, the set needs to be respun after I merged master where Stephen
>> brought in updates to the uapi files.
>
> Will do. Thanks for reviewing.
>
> Steve.
>
^ permalink raw reply
* Re: [PATCH net-next] rocker: Postpone filtering of !added_by_user FDB
From: Vivien Didelot @ 2018-05-10 14:21 UTC (permalink / raw)
To: Petr Machata, netdev; +Cc: jiri, davem
In-Reply-To: <6fbb39711485d7abbe7cdaa8042a222b9588a6b6.1525957759.git.petrm@mellanox.com>
Petr Machata <petrm@mellanox.com> writes:
> Breaking out of the switch in rocker_switchdev_event() still ends up
> scheduling work, except an ill-defined one. This leads to an OOPS cited
> below. Fix by postponing the check until rocker_switchdev_event_work().
>
> [ 23.148476] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
> [ 23.148810] PGD 0 P4D 0
> [ 23.148982] Oops: 0000 [#1] PREEMPT SMP PTI
> [ 23.149190] Modules linked in: bridge stp llc iptable_nat nf_nat_ipv4 nf_nat e1000 rocker
> [ 23.149768] CPU: 0 PID: 239 Comm: kworker/u2:4 Not tainted 4.17.0-rc3-net_next_queue-custom #6
> [ 23.150298] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-2.fc27 04/01/2014
> [ 23.150868] Workqueue: rocker rocker_switchdev_event_work [rocker]
> [ 23.151258] RIP: 0010:ofdpa_port_fdb+0x7b/0x230 [rocker]
> [ 23.151597] RSP: 0018:ffffc900004b3e18 EFLAGS: 00010246
> [ 23.151952] RAX: 00000000fffbc68c RBX: 0000000000000000 RCX: 0000000000000000
> [ 23.152363] RDX: 0000000000000010 RSI: ffff88003b4471e0 RDI: 00000000ffffffff
> [ 23.152768] RBP: ffff88003b4471c0 R08: ffff88003b4471e0 R09: ffff88003b4471c0
> [ 23.153141] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880036caf000
> [ 23.153515] R13: 0000000000000000 R14: 0000000000000000 R15: ffff88003bc00000
> [ 23.153919] FS: 0000000000000000(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000
> [ 23.154444] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [ 23.154806] CR2: 0000000000000000 CR3: 0000000036eb6000 CR4: 00000000000006f0
> [ 23.155194] Call Trace:
> [ 23.155472] rocker_switchdev_event_work+0x9b/0xd0 [rocker]
> [ 23.155850] ? __schedule+0x231/0x700
> [ 23.156175] process_one_work+0x1cf/0x3e0
> [ 23.156490] worker_thread+0x26/0x3d0
> [ 23.156795] ? trace_event_raw_event_workqueue_execute_start+0x80/0x80
> [ 23.157181] kthread+0x10e/0x130
> [ 23.157485] ? kthread_create_worker_on_cpu+0x40/0x40
> [ 23.157824] ret_from_fork+0x35/0x40
> [ 23.158174] Code: 00 00 c1 e8 02 4c 8d 45 20 bf ff ff ff ff 83 e0 01 4c 89 65 20 88 45 14 48 8b 05 21 da 1f e2 4c 89 c6 4c 89 44 24 10 48 89 45 18 <41> 8b 45 00 89 45 28 41 0f b7 45 04 66 89 45 2c 0f b7 44 24 04
> [ 23.159346] RIP: ofdpa_port_fdb+0x7b/0x230 [rocker] RSP: ffffc900004b3e18
> [ 23.159742] CR2: 0000000000000000
> [ 23.160088] ---[ end trace f9b16d4cb6df0629 ]---
>
> Fixes: 816a3bed9549 ("switchdev: Add fdb.added_by_user to switchdev notifications")
> Suggested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
^ permalink raw reply
* Re: [PATCHv2 1/1] net/mlx4_core: avoid resetting HCA when accessing an offline device
From: Tariq Toukan @ 2018-05-10 14:24 UTC (permalink / raw)
To: Zhu Yanjun, tariqt, netdev, linux-rdma
In-Reply-To: <1524058303-379-1-git-send-email-yanjun.zhu@oracle.com>
On 18/04/2018 4:31 PM, Zhu Yanjun wrote:
> While a faulty cable is used or HCA firmware error, HCA device will
> be offline. When the driver is accessing this offline device, the
> following call trace will pop out.
>
> "
> ...
> [<ffffffff816e4842>] dump_stack+0x63/0x81
> [<ffffffff816e459e>] panic+0xcc/0x21b
> [<ffffffffa03e5f8a>] mlx4_enter_error_state+0xba/0xf0 [mlx4_core]
> [<ffffffffa03e7298>] mlx4_cmd_reset_flow+0x38/0x60 [mlx4_core]
> [<ffffffffa03e7381>] mlx4_cmd_poll+0xc1/0x2e0 [mlx4_core]
> [<ffffffffa03e9f00>] __mlx4_cmd+0xb0/0x160 [mlx4_core]
> [<ffffffffa0406934>] mlx4_SENSE_PORT+0x54/0xd0 [mlx4_core]
> [<ffffffffa03f5f54>] mlx4_dev_cap+0x4a4/0xb50 [mlx4_core]
> ...
> "
> In the above call trace, the function mlx4_cmd_poll calls the function
> mlx4_cmd_post to access the HCA while HCA is offline. Then mlx4_cmd_post
> returns an error -EIO. Per -EIO, the function mlx4_cmd_poll calls
> mlx4_cmd_reset_flow to reset HCA. And the above call trace pops out.
>
> This is not reasonable. Since HCA device is offline when it is being
> accessed, it should not be reset again.
>
> In this patch, since HCA is offline, the function mlx4_cmd_post returns
> an error -EINVAL. Per -EINVAL, the function mlx4_cmd_poll directly returns
> instead of resetting HCA.
>
> CC: Srinivas Eeda <srinivas.eeda@oracle.com>
> CC: Junxiao Bi <junxiao.bi@oracle.com>
> Suggested-by: Håkon Bugge <haakon.bugge@oracle.com>
> Suggested-by: Tariq Toukan <tariqt@mellanox.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
> ---
> V1->V2: Follow Tariq's advice, avoid the disturbance from other returned errors.
> Since the returned values from the function mlx4_cmd_post are -EIO and -EINVAL,
> to -EIO, the HCA device should be reset. To -EINVAL, that means that the function
> mlx4_cmd_post is accessing an offline device. It is not necessary to reset HCA.
> Go to label out directly.
> ---
> drivers/net/ethernet/mellanox/mlx4/cmd.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Thanks Zhu.
^ permalink raw reply
* Re: [PATCH v1 iproute2-next 2/3] rdma: print driver resource attributes
From: Steve Wise @ 2018-05-10 14:19 UTC (permalink / raw)
To: David Ahern, leon; +Cc: stephen, netdev, linux-rdma
In-Reply-To: <06375fd7-f241-74ad-70ce-a670100bf060@gmail.com>
On 5/9/2018 11:08 PM, David Ahern wrote:
> On 5/7/18 9:53 AM, Steve Wise wrote:
>> @@ -152,7 +153,10 @@ int main(int argc, char **argv)
>> pretty_output = true;
>> break;
>> case 'd':
>> - show_details = true;
>> + if (show_details)
>> + show_driver_details = true;
>> + else
>> + show_details = true;
>> break;
>> case 'j':
>> json_output = true;
> The above change should be reflected in the man page.
I did mention it in the man page:
-d, --details
Output detailed information. Adding a second -d includes
driver-specific details.
But I wasn't sure how to show it in the syntax. Maybe this?
OPTIONS := { -V[ersion] | -d[etails] [-d[etails]] } -j[son] } -p[retty] }
> Also, the set needs to be respun after I merged master where Stephen
> brought in updates to the uapi files.
Will do. Thanks for reviewing.
Steve.
^ permalink raw reply
* Re: i.MX6S/DL and QCA8334 switch using DSA driver - CPU port not working
From: Andrew Lunn @ 2018-05-10 14:29 UTC (permalink / raw)
To: Michal Vokáč; +Cc: netdev, Vivien Didelot, Florian Fainelli
In-Reply-To: <5e8ecfed-c772-5668-4bac-1549143f599a@gmail.com>
> So both the CPU and the switch are trying to talk to each other but their
> frames are not delivered. This still looks like RGMII configuration problem.
Yes, i would say it is.
> As it works with my old PHY driver I suspect the problem is at the switches
> side somewhere in qca8k_set_pad_ctrl or qca8k_setup in the qca8k driver.
>
> Any other ideas?
I would probably add code to dump all the qca8k registers. Compare the
values for your working setup and your non-working setup. Hopefully
they are not too different, and you can quickly get to the bits which
matter.
Andrew
^ permalink raw reply
* Re: STMMAC driver with TSO enabled issue
From: Jose Abreu @ 2018-05-10 14:29 UTC (permalink / raw)
To: Bhadram Varka, Jose Abreu, netdev@vger.kernel.org, Joao Pinto
In-Reply-To: <77c98a42-195f-b597-711d-8c2e8b55f266@synopsys.com>
Hi Bhadram,
On 10-05-2018 09:55, Jose Abreu wrote:
> ++net-dev
>
> Hi Bhadram,
>
> On 09-05-2018 12:03, Bhadram Varka wrote:
>> Hi,
>>
>> Thanks for responding.
>>
>> Tried below suggested way. Still observing the issue -
> It seems stmmac has a bug in the RX side when using TSO which is
> causing all the RX descriptors to be consumed. The stmmac_rx()
> function will need to be refactored. I will send a fix ASAP.
Are you using this patch [1] ? Because there is a problem with
the patch. By adding the previously removed call to
stmmac_init_rx_desc() TSO works okay in my setup.
[1] https://patchwork.ozlabs.org/patch/910224/
>
> Thanks and Best Regards,
> Jose Miguel Abreu
>
>> [root@alarm ~]# iperf3 -c 10.19.65.141
>> Connecting to host 10.19.65.141, port 5201
>> [ 5] local 10.19.65.210 port 57630 connected to 10.19.65.141
>> port 5201
>> [ 65.408268] stmmac_tso_xmit(): line = 2842
>> [ 65.412362] stmmac_tso_xmit: tcphdrlen 32, hdr_len 66,
>> pay_len 0, mss 1448
>> [ 65.419224] skb->len 8754, skb->data_len 8688
>> [ 65.423672] stmmac_tso_xmit: curr=20 dirty=17 f=18, e=20,
>> f_p=00000000178e52e1, nfrags 1
>> [ 65.431747] TX descriptor ring:
>> [ 65.434881] 000 [0x82005000]: 0x0 0x0 0x0 0x0
>> [ 65.439230] 001 [0x82005010]: 0x0 0x0 0x0 0x0
>> [ 65.443578] 002 [0x82005020]: 0x0 0x0 0x0 0x0
>> [ 65.447927] 003 [0x82005030]: 0x0 0x0 0x0 0x0
>> [ 65.452275] 004 [0x82005040]: 0x0 0x0 0x0 0x0
>> [ 65.456622] 005 [0x82005050]: 0x0 0x0 0x0 0x0
>> [ 65.460970] 006 [0x82005060]: 0x0 0x0 0x0 0x0
>> [ 65.465316] 007 [0x82005070]: 0x0 0x0 0x0 0x0
>> [ 65.469664] 008 [0x82005080]: 0x0 0x0 0x0 0x0
>> [ 65.474010] 009 [0x82005090]: 0x0 0x0 0x0 0x0
>> [ 65.478357] 010 [0x820050a0]: 0x0 0x0 0x0 0x0
>> [ 65.482706] 011 [0x820050b0]: 0x0 0x0 0x0 0x0
>> [ 65.487053] 012 [0x820050c0]: 0x0 0x0 0x0 0x0
>> [ 65.491400] 013 [0x820050d0]: 0x0 0x0 0x0 0x0
>> [ 65.495746] 014 [0x820050e0]: 0x0 0x0 0x0 0x0
>> [ 65.500092] 015 [0x820050f0]: 0x0 0x0 0x0 0x0
>> [ 65.504438] 016 [0x82005100]: 0x0 0x0 0x0 0x0
>> [ 65.508784] 017 [0x82005110]: 0x0 0x0 0x5a8 0xc4000000
>> [ 65.513910] 018 [0x82005120]: 0xfb297000 0x0 0x42 0xa04421f0
>> [ 65.519557] 019 [0x82005130]: 0xfb298000 0x0 0x21f0 0x90000000
>> [ 65.525376] 020 [0x82005140]: 0x0 0x0 0x0 0x0
>> [ 65.529722] 021 [0x82005150]: 0x0 0x0 0x0 0x0
>> [ 65.534069] 022 [0x82005160]: 0x0 0x0 0x0 0x0
>> [ 65.538414] 023 [0x82005170]: 0x0 0x0 0x0 0x0
>> [ 65.542761] 024 [0x82005180]: 0x0 0x0 0x0 0x0
>> [ 65.547107] 025 [0x82005190]: 0x0 0x0 0x0 0x0
>> [ 65.551454] 026 [0x820051a0]: 0x0 0x0 0x0 0x0
>> [ 65.555802] 027 [0x820051b0]: 0x0 0x0 0x0 0x0
>> [ 65.560147] 028 [0x820051c0]: 0x0 0x0 0x0 0x0
>> [ 65.564493] 029 [0x820051d0]: 0x0 0x0 0x0 0x0
>> [ 65.568840] 030 [0x820051e0]: 0x0 0x0 0x0 0x0
>> [ 65.573187] 031 [0x820051f0]: 0x0 0x0 0x0 0x0
>> [ 65.577533] 032 [0x82005200]: 0x0 0x0 0x0 0x0
>> [ 65.581879] 033 [0x82005210]: 0x0 0x0 0x0 0x0
>> [ 65.586225] 034 [0x82005220]: 0x0 0x0 0x0 0x0
>> [ 65.590571] 035 [0x82005230]: 0x0 0x0 0x0 0x0
>> [ 65.594917] 036 [0x82005240]: 0x0 0x0 0x0 0x0
>> [ 65.599262] 037 [0x82005250]: 0x0 0x0 0x0 0x0
>> [ 65.603607] 038 [0x82005260]: 0x0 0x0 0x0 0x0
>> [ 65.607952] 039 [0x82005270]: 0x0 0x0 0x0 0x0
>> [ 65.612297] 040 [0x82005280]: 0x0 0x0 0x0 0x0
>> [ 65.616643] 041 [0x82005290]: 0x0 0x0 0x0 0x0
>> [ 65.620989] 042 [0x820052a0]: 0x0 0x0 0x0 0x0
>> [ 65.625336] 043 [0x820052b0]: 0x0 0x0 0x0 0x0
>> [ 65.629681] 044 [0x820052c0]: 0x0 0x0 0x0 0x0
>> [ 65.634027] 045 [0x820052d0]: 0x0 0x0 0x0 0x0
>> [ 65.638372] 046 [0x820052e0]: 0x0 0x0 0x0 0x0
>> [ 65.642718] 047 [0x820052f0]: 0x0 0x0 0x0 0x0
>> [ 65.647063] 048 [0x82005300]: 0x0 0x0 0x0 0x0
>> [ 65.651408] 049 [0x82005310]: 0x0 0x0 0x0 0x0
>> [ 65.655754] 050 [0x82005320]: 0x0 0x0 0x0 0x0
>> [ 65.660099] 051 [0x82005330]: 0x0 0x0 0x0 0x0
>> [ 65.664444] 052 [0x82005340]: 0x0 0x0 0x0 0x0
>> [ 65.668790] 053 [0x82005350]: 0x0 0x0 0x0 0x0
>> [ 65.673134] 054 [0x82005360]: 0x0 0x0 0x0 0x0
>> [ 65.677480] 055 [0x82005370]: 0x0 0x0 0x0 0x0
>> [ 65.681825] 056 [0x82005380]: 0x0 0x0 0x0 0x0
>> [ 65.686170] 057 [0x82005390]: 0x0 0x0 0x0 0x0
>> [ 65.690515] 058 [0x820053a0]: 0x0 0x0 0x0 0x0
>> [ 65.694861] 059 [0x820053b0]: 0x0 0x0 0x0 0x0
>> [ 65.699206] 060 [0x820053c0]: 0x0 0x0 0x0 0x0
>> [ 65.703552] 061 [0x820053d0]: 0x0 0x0 0x0 0x0
>> [ 65.707898] 062 [0x820053e0]: 0x0 0x0 0x0 0x0
>> [ 65.712243] 063 [0x820053f0]: 0x0 0x0 0x0 0x0
>> [ 65.716706] stmmac_tso_xmit(): line = 2842
>> [ 65.720802] stmmac_tso_xmit: tcphdrlen 32, hdr_len 66,
>> pay_len 0, mss 1448
>> [ 65.727669] skb->len 4410, skb->data_len 4344
>> [ 65.732114] stmmac_tso_xmit: curr=22 dirty=19 f=20, e=22,
>> f_p=00000000b1247b41, nfrags 1
>> [ 65.740190] TX descriptor ring:
>> [ 65.743327] 000 [0x82005000]: 0x0 0x0 0x0 0x0
>> [ 65.747678] 001 [0x82005010]: 0x0 0x0 0x0 0x0
>> [ 65.752029] 002 [0x82005020]: 0x0 0x0 0x0 0x0
>> [ 65.756378] 003 [0x82005030]: 0x0 0x0 0x0 0x0
>> [ 65.760727] 004 [0x82005040]: 0x0 0x0 0x0 0x0
>> [ 65.765077] 005 [0x82005050]: 0x0 0x0 0x0 0x0
>> [ 65.769427] 006 [0x82005060]: 0x0 0x0 0x0 0x0
>> [ 65.773776] 007 [0x82005070]: 0x0 0x0 0x0 0x0
>> [ 65.778126] 008 [0x82005080]: 0x0 0x0 0x0 0x0
>> [ 65.782476] 009 [0x82005090]: 0x0 0x0 0x0 0x0
>> [ 65.786826] 010 [0x820050a0]: 0x0 0x0 0x0 0x0
>> [ 65.791176] 011 [0x820050b0]: 0x0 0x0 0x0 0x0
>> [ 65.795526] 012 [0x820050c0]: 0x0 0x0 0x0 0x0
>> [ 65.799875] 013 [0x820050d0]: 0x0 0x0 0x0 0x0
>> [ 65.804225] 014 [0x820050e0]: 0x0 0x0 0x0 0x0
>> [ 65.808575] 015 [0x820050f0]: 0x0 0x0 0x0 0x0
>> [ 65.812925] 016 [0x82005100]: 0x0 0x0 0x0 0x0
>> [ 65.817274] 017 [0x82005110]: 0x0 0x0 0x0 0x0
>> [ 65.821625] 018 [0x82005120]: 0x0 0x0 0x0 0x0
>> [ 65.825976] 019 [0x82005130]: 0xfb298000 0x0 0x21f0 0x90000000
>> [ 65.831800] 020 [0x82005140]: 0xfb2a1000 0x0 0x42 0xa04410f8
>> [ 65.837450] 021 [0x82005150]: 0xfb2a2000 0x0 0x10f8 0x90000000
>> [ 65.843273] 022 [0x82005160]: 0x0 0x0 0x0 0x0
>> [ 65.847622] 023 [0x82005170]: 0x0 0x0 0x0 0x0
>> [ 65.851971] 024 [0x82005180]: 0x0 0x0 0x0 0x0
>> [ 65.856319] 025 [0x82005190]: 0x0 0x0 0x0 0x0
>> [ 65.860670] 026 [0x820051a0]: 0x0 0x0 0x0 0x0
>> [ 65.865020] 027 [0x820051b0]: 0x0 0x0 0x0 0x0
>> [ 65.869369] 028 [0x820051c0]: 0x0 0x0 0x0 0x0
>> [ 65.873719] 029 [0x820051d0]: 0x0 0x0 0x0 0x0
>> [ 65.878068] 030 [0x820051e0]: 0x0 0x0 0x0 0x0
>> [ 65.882418] 031 [0x820051f0]: 0x0 0x0 0x0 0x0
>> [ 65.886767] 032 [0x82005200]: 0x0 0x0 0x0 0x0
>> [ 65.891118] 033 [0x82005210]: 0x0 0x0 0x0 0x0
>> [ 65.895467] 034 [0x82005220]: 0x0 0x0 0x0 0x0
>> [ 65.899816] 035 [0x82005230]: 0x0 0x0 0x0 0x0
>> [ 65.904165] 036 [0x82005240]: 0x0 0x0 0x0 0x0
>> [ 65.908515] 037 [0x82005250]: 0x0 0x0 0x0 0x0
>> [ 65.912865] 038 [0x82005260]: 0x0 0x0 0x0 0x0
>> [ 65.917215] 039 [0x82005270]: 0x0 0x0 0x0 0x0
>> [ 65.921564] 040 [0x82005280]: 0x0 0x0 0x0 0x0
>> [ 65.925915] 041 [0x82005290]: 0x0 0x0 0x0 0x0
>> [ 65.930264] 042 [0x820052a0]: 0x0 0x0 0x0 0x0
>> [ 65.934615] 043 [0x820052b0]: 0x0 0x0 0x0 0x0
>> [ 65.938964] 044 [0x820052c0]: 0x0 0x0 0x0 0x0
>> [ 65.943313] 045 [0x820052d0]: 0x0 0x0 0x0 0x0
>> [ 65.947664] 046 [0x820052e0]: 0x0 0x0 0x0 0x0
>> [ 65.952012] 047 [0x820052f0]: 0x0 0x0 0x0 0x0
>> [ 65.956363] 048 [0x82005300]: 0x0 0x0 0x0 0x0
>> [ 65.960712] 049 [0x82005310]: 0x0 0x0 0x0 0x0
>> [ 65.965061] 050 [0x82005320]: 0x0 0x0 0x0 0x0
>> [ 65.969410] 051 [0x82005330]: 0x0 0x0 0x0 0x0
>> [ 65.973760] 052 [0x82005340]: 0x0 0x0 0x0 0x0
>> [ 65.978110] 053 [0x82005350]: 0x0 0x0 0x0 0x0
>> [ 65.982460] 054 [0x82005360]: 0x0 0x0 0x0 0x0
>> [ 65.986812] 055 [0x82005370]: 0x0 0x0 0x0 0x0
>> [ 65.991161] 056 [0x82005380]: 0x0 0x0 0x0 0x0
>> [ 65.995510] 057 [0x82005390]: 0x0 0x0 0x0 0x0
>> [ 65.999860] 058 [0x820053a0]: 0x0 0x0 0x0 0x0
>> [ 66.004210] 059 [0x820053b0]: 0x0 0x0 0x0 0x0
>> [ 66.008559] 060 [0x820053c0]: 0x0 0x0 0x0 0x0
>> [ 66.012908] 061 [0x820053d0]: 0x0 0x0 0x0 0x0
>> [ 66.017257] 062 [0x820053e0]: 0x0 0x0 0x0 0x0
>> [ 66.021607] 063 [0x820053f0]: 0x0 0x0 0x0 0x0
>> [ ID] Interval Transfer Bitrate Retr Cwnd
>> [ 5] 0.00-1.00 sec 184 KBytes 1.50 Mbits/sec 0
>> 1.41 KBytes
>> [ 5] 1.00-2.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41
>> KBytes
>> [ 5] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41
>> KBytes
>> [ 5] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41
>> KBytes
>> [ 5] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41
>> KBytes
>> [ 5] 5.00-6.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41
>> KBytes
>> [ 5] 6.00-7.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41
>> KBytes
>> [ 5] 7.00-8.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41
>> KBytes
>> [ 5] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41
>> KBytes
>>
>>
>> On 5/9/2018 3:35 PM, Jose Abreu wrote:
>>> Hi Bhadram,
>>>
>>> On 09-05-2018 08:18, Bhadram Varka wrote:
>>>> + queue0 {
>>>> + snps,weight = <0x10>;
>>>> + queue1 {
>>>> + snps,weight = <0x10>;
>>>>
>>>> + queue2 {
>>>> + snps,weight = <0x10>;
>>>>
>>>> + queue3 {
>>>> + snps,weight = <0x10>;
>>>>
>>> This is wrong. You can't use the same weight for all queues.
>>> Please try with different weights (for example: 0x10, 0x11, 0x12,
>>> 0x13).
>>>
>>> Thanks and Best Regards,
>>> Jose Miguel Abreu
>>>
>>>
^ permalink raw reply
* [PATCH] rsi: fix spelling mistake: "thead" -> "thread"
From: Colin King @ 2018-05-10 14:32 UTC (permalink / raw)
To: Kalle Valo, David S . Miller, Amitkumar Karwar,
Prameela Rani Garnepudi, linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Trivial fix to spelling mistake in rsi_dbg debug message text
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/rsi/rsi_91x_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_core.c b/drivers/net/wireless/rsi/rsi_91x_core.c
index 1f1b97220d43..3644d7d99463 100644
--- a/drivers/net/wireless/rsi/rsi_91x_core.c
+++ b/drivers/net/wireless/rsi/rsi_91x_core.c
@@ -485,7 +485,7 @@ void rsi_core_xmit(struct rsi_common *common, struct sk_buff *skb)
}
rsi_core_queue_pkt(common, skb);
- rsi_dbg(DATA_TX_ZONE, "%s: ===> Scheduling TX thead <===\n", __func__);
+ rsi_dbg(DATA_TX_ZONE, "%s: ===> Scheduling TX thread <===\n", __func__);
rsi_set_event(&common->tx_thread.event);
return;
--
2.17.0
^ permalink raw reply related
* Re: [PATCH net-next 08/10] net: stmmac: Do not initialize the RX Descriptor twice
From: Jose Abreu @ 2018-05-10 14:33 UTC (permalink / raw)
To: Jose Abreu, netdev
Cc: David S. Miller, Joao Pinto, Vitor Soares, Giuseppe Cavallaro,
Alexandre Torgue
In-Reply-To: <8dc038066ee0fbb30f1a82bce5e2e9118b13ce01.1525683833.git.joabreu@synopsys.com>
On 08-05-2018 15:45, Jose Abreu wrote:
> The RX Descriptor is already initialized in at setup phase so there is
> no need to set the values again, we just need to set the owner. This
> allow us to remove another if condition.
>
> Signed-off-by: Jose Abreu <joabreu@synopsys.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Joao Pinto <jpinto@synopsys.com>
> Cc: Vitor Soares <soares@synopsys.com>
> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> Cc: Alexandre Torgue <alexandre.torgue@st.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index c5769b4..80439be 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -3255,10 +3255,7 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
> }
> dma_wmb();
>
> - if (unlikely(priv->synopsys_id >= DWMAC_CORE_4_00))
> - stmmac_init_rx_desc(priv, p, priv->use_riwt, 0, 0);
This cant be removed. Please don't merge it.
Thanks and Best Regards,
Jose Miguel Abreu
> - else
> - stmmac_set_rx_owner(priv, p);
> + stmmac_set_rx_owner(priv, p);
>
> dma_wmb();
>
^ permalink raw reply
* Re: [PATCH] net/mlx4_en: Fix an error handling path in 'mlx4_en_init_netdev()'
From: Christophe JAILLET @ 2018-05-10 14:35 UTC (permalink / raw)
To: Yuval Shaia
Cc: davem, tariqt, netdev, linux-rdma, linux-kernel, kernel-janitors
In-Reply-To: <20180510133808.GA10943@lap1>
Le 10/05/2018 à 15:38, Yuval Shaia a écrit :
> On Thu, May 10, 2018 at 09:02:26AM +0200, Christophe JAILLET wrote:
>> If an error occurs, 'mlx4_en_destroy_netdev()' is called.
>> It then calls 'mlx4_en_free_resources()' which does the needed resources
>> cleanup.
>>
>> So, doing some explicit kfree in the error handling path would lead to
>> some double kfree.
> Patch make sense but what's bothering me is that mlx4_en_free_resources
> loops on the entire array, assuming !priv->tx_ring[t] means entry is
> allocated but the existing code does not assume that, see [1]. So i looked
> to see where tx_ring array is zeroed and didn't find it.
>
> Am i missing something here.
My understanding is that the array is zeoed at line 3289, when the whole
priv struct is memset(0)'ed (also done in alloc_etherdev_mqs but leaving
an explicit memset help to remind that the struct is zeroed)
If speed matters here (and I don't think so), the memset could be saved
(the mlx4_en_priv struct is quite big after all), but at least a comment
should remind that it is initialized within alloc_etherdev_mqs.
CJ
>> Simplify code to avoid such a case.
>>
>> Fixes: 67f8b1dcb9ee ("net/mlx4_en: Refactor the XDP forwarding rings scheme")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>> drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 8 +-------
>> 1 file changed, 1 insertion(+), 7 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
>> index e0adac4a9a19..9670b33fc9b1 100644
>> --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
>> +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
>> @@ -3324,12 +3324,11 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
>> MAX_TX_RINGS, GFP_KERNEL);
>> if (!priv->tx_ring[t]) {
>> err = -ENOMEM;
>> - goto err_free_tx;
>> + goto out;
>> }
>> priv->tx_cq[t] = kzalloc(sizeof(struct mlx4_en_cq *) *
>> MAX_TX_RINGS, GFP_KERNEL);
>> if (!priv->tx_cq[t]) {
>> - kfree(priv->tx_ring[t]);
>> err = -ENOMEM;
>> goto out;
>> }
>> @@ -3582,11 +3581,6 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
>>
>> return 0;
>>
>> -err_free_tx:
>> - while (t--) {
> [1]
>
>> - kfree(priv->tx_ring[t]);
>> - kfree(priv->tx_cq[t]);
>> - }
>> out:
>> mlx4_en_destroy_netdev(dev);
>> return err;
>> --
>> 2.17.0
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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] net/mlx4_en: Fix an error handling path in 'mlx4_en_init_netdev()'
From: Tariq Toukan @ 2018-05-10 14:36 UTC (permalink / raw)
To: Dan Carpenter, Yuval Shaia
Cc: Christophe JAILLET, davem, tariqt, netdev, linux-rdma,
linux-kernel, kernel-janitors
In-Reply-To: <20180510141836.2qlm676j4675buti@mwanda>
On 10/05/2018 5:18 PM, Dan Carpenter wrote:
> On Thu, May 10, 2018 at 04:38:08PM +0300, Yuval Shaia wrote:
>> On Thu, May 10, 2018 at 09:02:26AM +0200, Christophe JAILLET wrote:
>>> If an error occurs, 'mlx4_en_destroy_netdev()' is called.
>>> It then calls 'mlx4_en_free_resources()' which does the needed resources
>>> cleanup.
>>>
>>> So, doing some explicit kfree in the error handling path would lead to
>>> some double kfree.
>>
>> Patch make sense but what's bothering me is that mlx4_en_free_resources
>> loops on the entire array, assuming !priv->tx_ring[t] means entry is
>> allocated but the existing code does not assume that, see [1]. So i looked
>> to see where tx_ring array is zeroed and didn't find it.
>>
>> Am i missing something here.
>>
>
> It's zeroed twice. alloc_etherdev_mqs() allocates zeroed memory and
> then we do a memset(priv, 0, sizeof(struct mlx4_en_priv));
>
> regards,
> dan carpenter
>
We do zero (twice) on init, that's right. But I think Yuval's comment is
valid in case of the driver went into configuration change, or down/up,
that reallocates the rings. I'm double checking this.
^ permalink raw reply
* Re: [PATCH] net: aquantia: Fix an error handling path in 'aq_pci_probe()'
From: Christophe JAILLET @ 2018-05-10 14:38 UTC (permalink / raw)
To: Igor Russkikh, davem, pavel.belous, weiyongjun1, dan.carpenter
Cc: netdev, linux-kernel, kernel-janitors
In-Reply-To: <a784ae7f-cd9c-4141-f862-0c01f61d0200@aquantia.com>
Le 08/05/2018 à 09:19, Igor Russkikh a écrit :
>
> This was just submitted yesterday and is already accepted in netdev by David:
>
> http://patchwork.ozlabs.org/patch/909746/
>
> Thanks!
>
> BR, Igor
>
Patch timing is sometimes surprising!
Not sure at all if it can be an issue, but I also noted that the order
of 'pci_release_regions()' and 'free_netdev()' is in reverse
order in the 'aq_pci_remove()' function.
I don't know if done on purpose and/or needed, so I've left it as-is.
CJ
^ permalink raw reply
* Re: Significant capacity drop on loopback interface
From: Stephen Hemminger @ 2018-05-10 14:58 UTC (permalink / raw)
To: Naruto Nguyen; +Cc: netdev
In-Reply-To: <CANpxKHFZPEOgE21oPM2WHF97jhD8w3-N-wdycSPEnOeMPwREsQ@mail.gmail.com>
On Thu, 10 May 2018 15:35:59 +0700
Naruto Nguyen <narutonguyen2018@gmail.com> wrote:
> Hello everyone,
>
> Recently, I used netperf to test the TCP performance on loopback
> interface on my 2 nodes, one is installed kernel 4.4.103 and the other
> is 3.12.61
>
> netperf -l 100 -t TCP_RR
> netperf -l 100 -t TCP_RR -- -D
>
> In both cases, I see that the throughput on 4.4.103 is about just 1/2
> in comparing with 3.12.61 node
>
> # netperf -l 100 -t TCP_RR
> MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0
> AF_INET to localhost () port 0 AF_INET : first burst 0
> Local /Remote
> Socket Size Request Resp. Elapsed Trans.
> Send Recv Size Size Time Rate
> bytes Bytes bytes bytes secs. per sec
>
> 16384 87380 1 1 100.00 37714.68
> 16384 87380
>
>
> netperf -l 100 -t TCP_RR
> MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0
> AF_INET to localhost () port 0 AF_INET : first burst 0
> Local /Remote
> Socket Size Request Resp. Elapsed Trans.
> Send Recv Size Size Time Rate
> bytes Bytes bytes bytes secs. per sec
>
> 16384 87380 1 1 100.00 64038.41
> 16384 87380
>
>
> When running tcpdump to capture all packets in loopback interface, I
> see that during 200s capture, the number of packets on loopback of
> 4.4.103 is double the number of packets in 3.12.61? Could you please
> let me know if it can cause the low throughput as above? Do we have
> any tuning for TCP on loopback to improve the performace (actually the
> low throughput also happens with UDP) or if we have any known
> performance issue in 4.4 kernel on loopback?
>
> Thanks a lot,
> Brs,
> Naruto
This might just be the increased overhead of KPTI to fix Spectre/Meltdown.
Loopback is very sensitive to syscall overhead.
^ permalink raw reply
* Re: [PATCH] net/mlx4_en: Fix an error handling path in 'mlx4_en_init_netdev()'
From: Tariq Toukan @ 2018-05-10 15:03 UTC (permalink / raw)
To: Dan Carpenter, Yuval Shaia
Cc: Christophe JAILLET, davem, netdev, linux-rdma, linux-kernel,
kernel-janitors
In-Reply-To: <f29e851d-c4d7-cd04-dbb7-582adebc2854@mellanox.com>
On 10/05/2018 5:36 PM, Tariq Toukan wrote:
>
>
> On 10/05/2018 5:18 PM, Dan Carpenter wrote:
>> On Thu, May 10, 2018 at 04:38:08PM +0300, Yuval Shaia wrote:
>>> On Thu, May 10, 2018 at 09:02:26AM +0200, Christophe JAILLET wrote:
>>>> If an error occurs, 'mlx4_en_destroy_netdev()' is called.
>>>> It then calls 'mlx4_en_free_resources()' which does the needed
>>>> resources
>>>> cleanup.
>>>>
>>>> So, doing some explicit kfree in the error handling path would lead to
>>>> some double kfree.
>>>
>>> Patch make sense but what's bothering me is that mlx4_en_free_resources
>>> loops on the entire array, assuming !priv->tx_ring[t] means entry is
>>> allocated but the existing code does not assume that, see [1]. So i
>>> looked
>>> to see where tx_ring array is zeroed and didn't find it.
>>>
>>> Am i missing something here.
>>>
>>
>> It's zeroed twice. alloc_etherdev_mqs() allocates zeroed memory and
>> then we do a memset(priv, 0, sizeof(struct mlx4_en_priv));
>>
>> regards,
>> dan carpenter
>>
>
> We do zero (twice) on init, that's right. But I think Yuval's comment is
> valid in case of the driver went into configuration change, or down/up,
> that reallocates the rings. I'm double checking this.
Well, the flows in which we need to nullify the tx_rings pointer (if
any, I still need to investigate this) is not related to this init function.
Here we're safe.
Anyway, a V2 is already submitted, please use it for your next comments.
I think patch is OK.
^ permalink raw reply
* Re: STMMAC driver with TSO enabled issue
From: Bhadram Varka @ 2018-05-10 15:08 UTC (permalink / raw)
To: Jose Abreu, netdev@vger.kernel.org, Joao Pinto
In-Reply-To: <f423213d-4092-f77a-3bc5-4f4198bb222c@synopsys.com>
Hi Jose,
On 5/10/2018 7:59 PM, Jose Abreu wrote:
> Hi Bhadram,
>
> On 10-05-2018 09:55, Jose Abreu wrote:
>> ++net-dev
>>
>> Hi Bhadram,
>>
>> On 09-05-2018 12:03, Bhadram Varka wrote:
>>> Hi,
>>>
>>> Thanks for responding.
>>>
>>> Tried below suggested way. Still observing the issue -
>> It seems stmmac has a bug in the RX side when using TSO which is
>> causing all the RX descriptors to be consumed. The stmmac_rx()
>> function will need to be refactored. I will send a fix ASAP.
>
> Are you using this patch [1] ? Because there is a problem with
> the patch. By adding the previously removed call to
> stmmac_init_rx_desc() TSO works okay in my setup.
>
No. I don't have this change in my code base. I am using net-next tree.
Can you please post the change for which TSO works ? I can help you with
the testing.
--
Thanks,
Bhadram.
^ permalink raw reply
* Re: Significant capacity drop on loopback interface
From: Stephen Hemminger @ 2018-05-10 15:18 UTC (permalink / raw)
To: Naruto Nguyen; +Cc: netdev@vger.kernel.org
In-Reply-To: <CANpxKHFKqL+n596Liw7kzJpV3K+CqT9o+R9ynNoy+rPDwj1YNA@mail.gmail.com>
On Thu, 10 May 2018 22:03:33 +0700
Naruto Nguyen <narutonguyen2018@gmail.com> wrote:
> Hi Stephen,
>
> Thanks for your responding. But as I know kernel 4.4.104 has not included
> Spectre/Meltdown fix yet, right?
Yes. 4.4.104 doesn't have KPTI.
That came in around 4.4.109
^ permalink raw reply
* Re: [PATCH] net: aquantia: Fix an error handling path in 'aq_pci_probe()'
From: Igor Russkikh @ 2018-05-10 15:25 UTC (permalink / raw)
To: Christophe JAILLET, davem, pavel.belous, weiyongjun1,
dan.carpenter
Cc: netdev, linux-kernel, kernel-janitors
In-Reply-To: <2369a016-547d-65e1-9ba7-9a6d16cda41a@wanadoo.fr>
> Patch timing is sometimes surprising!
Indeed it.
>
> Not sure at all if it can be an issue, but I also noted that the order of 'pci_release_regions()' and 'free_netdev()' is in reverse
> order in the 'aq_pci_remove()' function.
> I don't know if done on purpose and/or needed, so I've left it as-is.
I think the order is not important here, so believe thats merely a cosmetics.
BR, Igor
^ permalink raw reply
* Re: [PATCH][next] net: aquantia: fix unsigned numvecs comparison with less than zero
From: Igor Russkikh @ 2018-05-10 15:36 UTC (permalink / raw)
To: Colin King, David S . Miller, Pavel Belous, Wei Yongjun, netdev
Cc: kernel-janitors, linux-kernel
In-Reply-To: <20180510125201.19707-1-colin.king@canonical.com>
Thanks, Colin!
> The comparison of numvecs < 0 is always false because numvecs is a u32
> and hence the error return from a failed call to pci_alloc_irq_vectores
> is never detected. Fix this by using the signed int ret to handle the
> error return and assign numvecs to err.
>
> Detected by CoverityScan, CID#1468650 ("Unsigned compared against 0")
>
> Fixes: a09bd81b5413 ("net: aquantia: Limit number of vectors to actually allocated irqs")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
Acked-by: Igor Russkikh <igor.russkikh@aquantia.com>
^ permalink raw reply
* Re: STMMAC driver with TSO enabled issue
From: Jose Abreu @ 2018-05-10 15:45 UTC (permalink / raw)
To: Bhadram Varka, Jose Abreu, netdev@vger.kernel.org, Joao Pinto
In-Reply-To: <5309d046-fc6f-bc63-06dc-6cc98276dce4@nvidia.com>
On 10-05-2018 16:08, Bhadram Varka wrote:
> Hi Jose,
>
> On 5/10/2018 7:59 PM, Jose Abreu wrote:
>> Hi Bhadram,
>>
>> On 10-05-2018 09:55, Jose Abreu wrote:
>>> ++net-dev
>>>
>>> Hi Bhadram,
>>>
>>> On 09-05-2018 12:03, Bhadram Varka wrote:
>>>> Hi,
>>>>
>>>> Thanks for responding.
>>>>
>>>> Tried below suggested way. Still observing the issue -
>>> It seems stmmac has a bug in the RX side when using TSO which is
>>> causing all the RX descriptors to be consumed. The stmmac_rx()
>>> function will need to be refactored. I will send a fix ASAP.
>>
>> Are you using this patch [1] ? Because there is a problem with
>> the patch. By adding the previously removed call to
>> stmmac_init_rx_desc() TSO works okay in my setup.
>>
>
> No. I don't have this change in my code base. I am using
> net-next tree.
>
> Can you please post the change for which TSO works ? I can help
> you with the testing.
It should work with net-next because patch was not merged yet ...
Please send me the output of "dmesg | grep -i stmmac", since boot
and your full register values (from 0x0 to 0x12E4).
^ permalink raw reply
* [PATCH 00/18] Convert default pr_fmt from empty to KBUILD_MODNAME
From: Joe Perches @ 2018-05-10 15:45 UTC (permalink / raw)
To: Steven Rostedt, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Mathieu Desnoyers, Lai Jiangshan, Andy Lutomirski, Will Drewry,
linux-block, linux-crypto, netdev, linux-fbdev, linux-audit,
linux-kernel, iommu, netfilter-devel, coreteam, linux-integrity,
keyrings, selinux
Cc: dri-devel, linux-security-module
pr_<level> logging uses allow a prefix to be specified with a
specific #define pr_fmt
The default of pr_fmt in printk.h is #define pr_fmt(fmt) fmt
so no prefixing of logging output is generically done.
There are several output logging uses like dump_stack() that are
unprefixed and should remain unprefixed.
This patch series attempts to convert the default #define of pr_fmt to
KBUILD_MODNAME ": " fmt and as well update the various bits of the kernel
that should _not_ be prefixed by adding #define pr_fmt(fmt) fmt to those
compilation units that do not want output message prefixing.
There are about 1200 uses of #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
that could be removed if the default is changed.
A script that does this removal (and removes any blank lines that follow)
for the linux-kernel tree is included below:
$ git grep -P --name-only "define\s+pr_fmt\b" | \
grep -v include/linux/printk.h | \
xargs perl -i -e 'local $/; while (<>) {s/(\n)*[ \t]*#[ \t]*define[ \t]+pr_fmt[ \t]*\([ \t]*(\w+)[ \t]*\)[ \t]*KBUILD_MODNAME[ \t]*\": \"[ \t]*\2[ \t]*\n\s*/\1\n/; s/^\n//; print;}'
This script should be run after this patch series is applied.
The above script output diff is currently:
1198 files changed, 70 insertions(+), 2241 deletions(-)
Joe Perches (18):
kernel: Use pr_fmt
lib: Use pr_fmt
printk: Convert pr_fmt from blank define to KBUILD_MODNAME
x86: Remove pr_fmt duplicate logging prefixes
x86/mtrr: Rename main.c to mtrr.c and remove duplicate prefixes
net: Remove pr_fmt duplicate logging prefixes
blk-mq: Remove pr_fmt duplicate logging prefixes
random: Remove pr_fmt duplicate logging prefixes
ptp: Remove pr_fmt duplicate logging prefixes
efifb: Remove pr_fmt duplicate logging prefixes
proc: Remove pr_fmt duplicate logging prefixes
uprobes: Remove pr_fmt duplicate logging prefixes
printk: Remove pr_fmt duplicate logging prefixes
lib/mpi: Remove pr_fmt duplicate logging prefixes
security: Remove pr_fmt duplicate logging prefixes
aoe: Remove pr_fmt duplicate logging prefixes
security: encrypted-keys: Remove pr_fmt duplicate logging prefixes
rcu: Use pr_fmt to prefix "rcu: " to logging output
arch/x86/events/amd/ibs.c | 2 +-
arch/x86/kernel/cpu/mtrr/Makefile | 2 +-
arch/x86/kernel/cpu/mtrr/{main.c => mtrr.c} | 33 ++++++-------
arch/x86/kernel/e820.c | 32 ++++++------
arch/x86/kernel/hpet.c | 5 +-
arch/x86/kernel/uprobes.c | 4 +-
arch/x86/mm/numa.c | 22 ++++-----
block/blk-mq.c | 9 ++--
drivers/block/aoe/aoeblk.c | 29 ++++++-----
drivers/block/aoe/aoechr.c | 11 ++---
drivers/block/aoe/aoecmd.c | 34 ++++++-------
drivers/block/aoe/aoedev.c | 19 +++-----
drivers/block/aoe/aoemain.c | 6 +--
drivers/block/aoe/aoenet.c | 19 +++-----
drivers/char/hw_random/via-rng.c | 10 ++--
drivers/char/random.c | 16 +++---
drivers/ptp/ptp_clock.c | 4 +-
drivers/video/fbdev/efifb.c | 48 +++++++++---------
fs/proc/root.c | 6 +--
include/linux/printk.h | 2 +-
kernel/acct.c | 2 +
kernel/async.c | 14 +++---
kernel/audit_tree.c | 2 +-
kernel/backtracetest.c | 8 +--
kernel/crash_core.c | 29 ++++++-----
kernel/events/uprobes.c | 3 +-
kernel/exit.c | 2 +
kernel/hung_task.c | 13 +++--
kernel/kprobes.c | 20 +++++---
kernel/module.c | 59 +++++++++++------------
kernel/panic.c | 3 ++
kernel/params.c | 13 +++--
kernel/pid.c | 2 +
kernel/printk/printk.c | 2 +-
kernel/profile.c | 2 +
kernel/range.c | 2 +-
kernel/rcu/rcu_segcblist.c | 2 +
kernel/rcu/rcuperf.c | 10 ++--
kernel/rcu/rcutorture.c | 46 +++++++++---------
kernel/rcu/srcutiny.c | 2 +
kernel/rcu/srcutree.c | 5 +-
kernel/rcu/tiny.c | 3 ++
kernel/rcu/tree.c | 8 +--
kernel/rcu/tree_plugin.h | 67 +++++++++++++++-----------
kernel/rcu/update.c | 19 +++++---
kernel/relay.c | 5 +-
kernel/seccomp.c | 4 +-
kernel/signal.c | 10 ++--
kernel/smpboot.c | 5 +-
kernel/taskstats.c | 4 +-
kernel/torture.c | 6 ++-
kernel/tracepoint.c | 3 ++
kernel/workqueue.c | 2 +
lib/cpu_rmap.c | 15 +++---
lib/crc32test.c | 2 +
lib/earlycpio.c | 5 +-
lib/find_bit_benchmark.c | 2 +
lib/kobject.c | 36 +++++++-------
lib/kobject_uevent.c | 27 +++++------
lib/mpi/mpicoder.c | 10 ++--
lib/nmi_backtrace.c | 3 ++
lib/percpu_ida.c | 4 +-
lib/percpu_test.c | 2 +
lib/random32.c | 10 ++--
lib/stmp_device.c | 2 +
lib/string.c | 2 +
lib/swiotlb.c | 4 +-
lib/test_debug_virtual.c | 2 +
lib/test_rhashtable.c | 44 +++++++++--------
lib/test_sort.c | 2 +
lib/ubsan.c | 61 ++++++++++++-----------
net/ipv4/ipconfig.c | 59 ++++++++++-------------
net/ipv4/ipmr.c | 2 +-
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 9 ++--
net/ipv6/ip6mr.c | 2 +-
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 6 +--
net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 4 +-
net/netfilter/nf_conntrack_helper.c | 11 ++---
net/netfilter/nf_conntrack_standalone.c | 2 +-
net/socket.c | 2 +-
security/keys/encrypted-keys/encrypted.c | 63 +++++++++++-------------
security/selinux/selinuxfs.c | 29 ++++++-----
82 files changed, 580 insertions(+), 532 deletions(-)
rename arch/x86/kernel/cpu/mtrr/{main.c => mtrr.c} (96%)
--
2.15.0
^ permalink raw reply
* [PATCH 02/18] lib: Use pr_fmt
From: Joe Perches @ 2018-05-10 15:45 UTC (permalink / raw)
To: Greg Kroah-Hartman, David S. Miller, Konrad Rzeszutek Wilk
Cc: linux-kernel, netdev, iommu
In-Reply-To: <cover.1525964381.git.joe@perches.com>
Sometime in the future, it would be useful to convert pr_fmt from a
default simple define to use a default prefix with KBUILD_MODNAME.
There are files in lib/ that use pr_<level>, some with an embedded
prefix, that also do not have a specific pr_fmt define.
Add pr_fmt for those files.
There are some differences in output as some logging output now is
prefixed with the appropriate KBUILD_MODNAME.
Miscellanea:
o Simplify debugging macros to only require a single function definition
by moving #define DEBUG into the definition and removing the empty
function definition
o Function alignment neatening
o Use %s, __func__ instead of embedding function names as strings
o Add missing newline terminations
Signed-off-by: Joe Perches <joe@perches.com>
---
lib/cpu_rmap.c | 15 +++++-------
lib/crc32test.c | 2 ++
lib/earlycpio.c | 5 ++--
lib/find_bit_benchmark.c | 2 ++
lib/kobject.c | 36 ++++++++++++++--------------
lib/kobject_uevent.c | 27 ++++++++++-----------
lib/nmi_backtrace.c | 3 +++
lib/percpu_ida.c | 4 +++-
lib/percpu_test.c | 2 ++
lib/random32.c | 10 ++++----
lib/stmp_device.c | 2 ++
lib/string.c | 2 ++
lib/swiotlb.c | 4 +++-
lib/test_debug_virtual.c | 2 ++
lib/test_rhashtable.c | 44 ++++++++++++++++++----------------
lib/test_sort.c | 2 ++
lib/ubsan.c | 61 ++++++++++++++++++++++++------------------------
17 files changed, 122 insertions(+), 101 deletions(-)
diff --git a/lib/cpu_rmap.c b/lib/cpu_rmap.c
index f610b2a10b3e..2d7204928c60 100644
--- a/lib/cpu_rmap.c
+++ b/lib/cpu_rmap.c
@@ -7,6 +7,8 @@
* by the Free Software Foundation, incorporated herein by reference.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/cpu_rmap.h>
#include <linux/interrupt.h>
#include <linux/export.h>
@@ -110,26 +112,21 @@ static bool cpu_rmap_copy_neigh(struct cpu_rmap *rmap, unsigned int cpu,
return false;
}
-#ifdef DEBUG
static void debug_print_rmap(const struct cpu_rmap *rmap, const char *prefix)
{
+#ifdef DEBUG
unsigned index;
unsigned int cpu;
- pr_info("cpu_rmap %p, %s:\n", rmap, prefix);
+ pr_info("%p, %s:\n", rmap, prefix);
for_each_possible_cpu(cpu) {
index = rmap->near[cpu].index;
pr_info("cpu %d -> obj %u (distance %u)\n",
cpu, index, rmap->near[cpu].dist);
}
-}
-#else
-static inline void
-debug_print_rmap(const struct cpu_rmap *rmap, const char *prefix)
-{
-}
#endif
+}
/**
* cpu_rmap_add - add object to a rmap
@@ -258,7 +255,7 @@ irq_cpu_rmap_notify(struct irq_affinity_notify *notify, const cpumask_t *mask)
rc = cpu_rmap_update(glue->rmap, glue->index, mask);
if (rc)
- pr_warning("irq_cpu_rmap_notify: update failed: %d\n", rc);
+ pr_warn("%s: update failed: %d\n", __func__, rc);
}
/**
diff --git a/lib/crc32test.c b/lib/crc32test.c
index 97d6a57cefcc..63bb08ccb6f3 100644
--- a/lib/crc32test.c
+++ b/lib/crc32test.c
@@ -24,6 +24,8 @@
* Version 2. See the file COPYING for more details.
*/
+#define pr_fmt(fmt) fmt
+
#include <linux/crc32.h>
#include <linux/module.h>
#include <linux/sched.h>
diff --git a/lib/earlycpio.c b/lib/earlycpio.c
index db283ba4d2c1..e98816b13719 100644
--- a/lib/earlycpio.c
+++ b/lib/earlycpio.c
@@ -130,9 +130,8 @@ struct cpio_data find_cpio_data(const char *path, void *data,
*nextoff = (long)nptr - (long)data;
if (ch[C_NAMESIZE] - mypathsize >= MAX_CPIO_FILE_NAME) {
- pr_warn(
- "File %s exceeding MAX_CPIO_FILE_NAME [%d]\n",
- p, MAX_CPIO_FILE_NAME);
+ pr_warn("File %s exceeding MAX_CPIO_FILE_NAME [%d]\n",
+ p, MAX_CPIO_FILE_NAME);
}
strlcpy(cd.name, p + mypathsize, MAX_CPIO_FILE_NAME);
diff --git a/lib/find_bit_benchmark.c b/lib/find_bit_benchmark.c
index 5367ffa5c18f..d59d92c9e73e 100644
--- a/lib/find_bit_benchmark.c
+++ b/lib/find_bit_benchmark.c
@@ -24,6 +24,8 @@
* - sparse bitmap with few set bits at random positions.
*/
+#define pr_fmt(fmt) fmt
+
#include <linux/bitops.h>
#include <linux/kernel.h>
#include <linux/list.h>
diff --git a/lib/kobject.c b/lib/kobject.c
index 18989b5b3b56..2bb9a50da4b0 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -10,6 +10,8 @@
* about using the kobject interface.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kobject.h>
#include <linux/string.h>
#include <linux/export.h>
@@ -129,8 +131,8 @@ static void fill_kobj_path(struct kobject *kobj, char *path, int length)
*(path + --length) = '/';
}
- pr_debug("kobject: '%s' (%p): %s: path = '%s'\n", kobject_name(kobj),
- kobj, __func__, path);
+ pr_debug("'%s' (%p): %s: path = '%s'\n",
+ kobject_name(kobj), kobj, __func__, path);
}
/**
@@ -220,7 +222,7 @@ static int kobject_add_internal(struct kobject *kobj)
kobj->parent = parent;
}
- pr_debug("kobject: '%s' (%p): %s: parent: '%s', set: '%s'\n",
+ pr_debug("'%s' (%p): %s: parent: '%s', set: '%s'\n",
kobject_name(kobj), kobj, __func__,
parent ? kobject_name(parent) : "<NULL>",
kobj->kset ? kobject_name(&kobj->kset->kobj) : "<NULL>");
@@ -333,7 +335,7 @@ void kobject_init(struct kobject *kobj, struct kobj_type *ktype)
}
if (kobj->state_initialized) {
/* do not error out as sometimes we can recover */
- pr_err("kobject (%p): tried to init an initialized object, something is seriously wrong.\n",
+ pr_err("(%p): tried to init an initialized object, something is seriously wrong\n",
kobj);
dump_stack();
}
@@ -343,7 +345,7 @@ void kobject_init(struct kobject *kobj, struct kobj_type *ktype)
return;
error:
- pr_err("kobject (%p): %s\n", kobj, err_str);
+ pr_err("(%p): %s\n", kobj, err_str);
dump_stack();
}
EXPORT_SYMBOL(kobject_init);
@@ -356,7 +358,7 @@ static __printf(3, 0) int kobject_add_varg(struct kobject *kobj,
retval = kobject_set_name_vargs(kobj, fmt, vargs);
if (retval) {
- pr_err("kobject: can not set name properly!\n");
+ pr_err("can not set name properly!\n");
return retval;
}
kobj->parent = parent;
@@ -398,7 +400,7 @@ int kobject_add(struct kobject *kobj, struct kobject *parent,
return -EINVAL;
if (!kobj->state_initialized) {
- pr_err("kobject '%s' (%p): tried to add an uninitialized object, something is seriously wrong.\n",
+ pr_err("'%s' (%p): tried to add an uninitialized object, something is seriously wrong.n",
kobject_name(kobj), kobj);
dump_stack();
return -EINVAL;
@@ -616,36 +618,36 @@ static void kobject_cleanup(struct kobject *kobj)
struct kobj_type *t = get_ktype(kobj);
const char *name = kobj->name;
- pr_debug("kobject: '%s' (%p): %s, parent %p\n",
+ pr_debug("'%s' (%p): %s, parent %p\n",
kobject_name(kobj), kobj, __func__, kobj->parent);
if (t && !t->release)
- pr_debug("kobject: '%s' (%p): does not have a release() function, it is broken and must be fixed.\n",
+ pr_debug("'%s' (%p): does not have a release() function, it is broken and must be fixed.\n",
kobject_name(kobj), kobj);
/* send "remove" if the caller did not do it but sent "add" */
if (kobj->state_add_uevent_sent && !kobj->state_remove_uevent_sent) {
- pr_debug("kobject: '%s' (%p): auto cleanup 'remove' event\n",
+ pr_debug("'%s' (%p): auto cleanup 'remove' event\n",
kobject_name(kobj), kobj);
kobject_uevent(kobj, KOBJ_REMOVE);
}
/* remove from sysfs if the caller did not do it */
if (kobj->state_in_sysfs) {
- pr_debug("kobject: '%s' (%p): auto cleanup kobject_del\n",
+ pr_debug("'%s' (%p): auto cleanup kobject_del\n",
kobject_name(kobj), kobj);
kobject_del(kobj);
}
if (t && t->release) {
- pr_debug("kobject: '%s' (%p): calling ktype release\n",
+ pr_debug("'%s' (%p): calling ktype release\n",
kobject_name(kobj), kobj);
t->release(kobj);
}
/* free name if we allocated it */
if (name) {
- pr_debug("kobject: '%s': free name\n", name);
+ pr_debug("'%s': free name\n", name);
kfree_const(name);
}
}
@@ -663,8 +665,8 @@ static void kobject_release(struct kref *kref)
struct kobject *kobj = container_of(kref, struct kobject, kref);
#ifdef CONFIG_DEBUG_KOBJECT_RELEASE
unsigned long delay = HZ + HZ * (get_random_int() & 0x3);
- pr_info("kobject: '%s' (%p): %s, parent %p (delayed %ld)\n",
- kobject_name(kobj), kobj, __func__, kobj->parent, delay);
+ pr_info("'%s' (%p): %s, parent %p (delayed %ld)\n",
+ kobject_name(kobj), kobj, __func__, kobj->parent, delay);
INIT_DELAYED_WORK(&kobj->release, kobject_delayed_cleanup);
schedule_delayed_work(&kobj->release, delay);
@@ -693,7 +695,7 @@ EXPORT_SYMBOL(kobject_put);
static void dynamic_kobj_release(struct kobject *kobj)
{
- pr_debug("kobject: (%p): %s\n", kobj, __func__);
+ pr_debug("(%p): %s\n", kobj, __func__);
kfree(kobj);
}
@@ -863,7 +865,7 @@ EXPORT_SYMBOL_GPL(kset_find_obj);
static void kset_release(struct kobject *kobj)
{
struct kset *kset = container_of(kobj, struct kset, kobj);
- pr_debug("kobject: '%s' (%p): %s\n",
+ pr_debug("'%s' (%p): %s\n",
kobject_name(kobj), kobj, __func__);
kfree(kset);
}
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 63d0816ab23b..c4b2453f7c16 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -13,6 +13,8 @@
* Greg Kroah-Hartman <greg@kroah.com>
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/kobject.h>
@@ -464,8 +466,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
int i = 0;
int retval = 0;
- pr_debug("kobject: '%s' (%p): %s\n",
- kobject_name(kobj), kobj, __func__);
+ pr_debug("'%s' (%p): %s\n", kobject_name(kobj), kobj, __func__);
/* search the kset we belong to */
top_kobj = kobj;
@@ -473,9 +474,8 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
top_kobj = top_kobj->parent;
if (!top_kobj->kset) {
- pr_debug("kobject: '%s' (%p): %s: attempted to send uevent "
- "without kset!\n", kobject_name(kobj), kobj,
- __func__);
+ pr_debug("'%s' (%p): %s: attempted to send uevent without kset!\n",
+ kobject_name(kobj), kobj, __func__);
return -EINVAL;
}
@@ -484,16 +484,14 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
/* skip the event, if uevent_suppress is set*/
if (kobj->uevent_suppress) {
- pr_debug("kobject: '%s' (%p): %s: uevent_suppress "
- "caused the event to drop!\n",
- kobject_name(kobj), kobj, __func__);
+ pr_debug("'%s' (%p): %s: uevent_suppress caused the event to drop!\n",
+ kobject_name(kobj), kobj, __func__);
return 0;
}
/* skip the event, if the filter returns zero. */
if (uevent_ops && uevent_ops->filter)
if (!uevent_ops->filter(kset, kobj)) {
- pr_debug("kobject: '%s' (%p): %s: filter function "
- "caused the event to drop!\n",
+ pr_debug("'%s' (%p): %s: filter function caused the event to drop!\n",
kobject_name(kobj), kobj, __func__);
return 0;
}
@@ -504,8 +502,8 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
else
subsystem = kobject_name(&kset->kobj);
if (!subsystem) {
- pr_debug("kobject: '%s' (%p): %s: unset subsystem caused the "
- "event to drop!\n", kobject_name(kobj), kobj,
+ pr_debug("'%s' (%p): %s: unset subsystem caused the event to drop!\n",
+ kobject_name(kobj), kobj,
__func__);
return 0;
}
@@ -546,9 +544,8 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
if (uevent_ops && uevent_ops->uevent) {
retval = uevent_ops->uevent(kset, kobj, env);
if (retval) {
- pr_debug("kobject: '%s' (%p): %s: uevent() returned "
- "%d\n", kobject_name(kobj), kobj,
- __func__, retval);
+ pr_debug("'%s' (%p): %s: uevent() returned %d\n",
+ kobject_name(kobj), kobj, __func__, retval);
goto exit;
}
}
diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c
index 61a6b5aab07e..5141d7072c99 100644
--- a/lib/nmi_backtrace.c
+++ b/lib/nmi_backtrace.c
@@ -13,6 +13,9 @@
*
* Bits copied from original nmi.c file
*/
+
+#define pr_fmt(fmt) fmt
+
#include <linux/cpumask.h>
#include <linux/delay.h>
#include <linux/kprobes.h>
diff --git a/lib/percpu_ida.c b/lib/percpu_ida.c
index 6016f1deb1f5..4283e4f9092e 100644
--- a/lib/percpu_ida.c
+++ b/lib/percpu_ida.c
@@ -14,6 +14,8 @@
* General Public License for more details.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/mm.h>
#include <linux/bitmap.h>
#include <linux/bitops.h>
@@ -299,7 +301,7 @@ int __percpu_ida_init(struct percpu_ida *pool, unsigned long nr_tags,
/* Guard against overflow */
if (nr_tags > (unsigned) INT_MAX + 1) {
- pr_err("percpu_ida_init(): nr_tags too large\n");
+ pr_err("%s: nr_tags too large\n", __func__);
return -EINVAL;
}
diff --git a/lib/percpu_test.c b/lib/percpu_test.c
index 0b5d14dadd1a..349ef717a0d9 100644
--- a/lib/percpu_test.c
+++ b/lib/percpu_test.c
@@ -1,3 +1,5 @@
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
/* validate @native and @pcp counter values match @expected */
diff --git a/lib/random32.c b/lib/random32.c
index 4aaa76404d56..8de1ac412588 100644
--- a/lib/random32.c
+++ b/lib/random32.c
@@ -32,6 +32,8 @@
* s1 > 1, s2 > 7, s3 > 15, s4 > 127.
*/
+#define pr_fmt(fmt) "prandom: " fmt
+
#include <linux/types.h>
#include <linux/percpu.h>
#include <linux/export.h>
@@ -437,9 +439,9 @@ static void __init prandom_state_selftest(void)
}
if (error)
- pr_warn("prandom: seed boundary self test failed\n");
+ pr_warn("seed boundary self test failed\n");
else
- pr_info("prandom: seed boundary self test passed\n");
+ pr_info("seed boundary self test passed\n");
for (i = 0; i < ARRAY_SIZE(test2); i++) {
struct rnd_state state;
@@ -458,8 +460,8 @@ static void __init prandom_state_selftest(void)
}
if (errors)
- pr_warn("prandom: %d/%d self tests failed\n", errors, runs);
+ pr_warn("%d/%d self tests failed\n", errors, runs);
else
- pr_info("prandom: %d self tests passed\n", runs);
+ pr_info("%d self tests passed\n", runs);
}
#endif
diff --git a/lib/stmp_device.c b/lib/stmp_device.c
index a904656f4fd7..e06dea3c9a7a 100644
--- a/lib/stmp_device.c
+++ b/lib/stmp_device.c
@@ -12,6 +12,8 @@
* (at your option) any later version.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/io.h>
#include <linux/errno.h>
#include <linux/delay.h>
diff --git a/lib/string.c b/lib/string.c
index 2c0900a5d51a..19c032243185 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -20,6 +20,8 @@
* - Kissed strtok() goodbye
*/
+#define pr_fmt(fmt) fmt
+
#include <linux/types.h>
#include <linux/string.h>
#include <linux/ctype.h>
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index bd1e0c5ba1b8..ca70b081bf3c 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -17,6 +17,8 @@
* 08/12/11 beckyb Add highmem support
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/cache.h>
#include <linux/dma-direct.h>
#include <linux/mm.h>
@@ -165,7 +167,7 @@ void swiotlb_print_info(void)
unsigned char *vstart, *vend;
if (no_iotlb_memory) {
- pr_warn("software IO TLB: No low mem\n");
+ pr_warn("No low mem\n");
return;
}
diff --git a/lib/test_debug_virtual.c b/lib/test_debug_virtual.c
index b9cdeecc19dc..97b9ecfc6a83 100644
--- a/lib/test_debug_virtual.c
+++ b/lib/test_debug_virtual.c
@@ -1,3 +1,5 @@
+#define pr_fmt(fmt) fmt
+
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/export.h>
diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c
index f4000c137dbe..cd5a3cea1ac3 100644
--- a/lib/test_rhashtable.c
+++ b/lib/test_rhashtable.c
@@ -13,6 +13,8 @@
* Self Test
**************************************************************************/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/init.h>
#include <linux/jhash.h>
#include <linux/kernel.h>
@@ -132,7 +134,7 @@ static int insert_retry(struct rhashtable *ht, struct test_obj *obj,
} while (err == -EBUSY);
if (enomem_retries)
- pr_info(" %u insertions retried after -ENOMEM\n",
+ pr_info("%u insertions retried after -ENOMEM\n",
enomem_retries);
return err ? : retries;
@@ -184,7 +186,7 @@ static void test_bucket_stats(struct rhashtable *ht, unsigned int entries)
err = rhashtable_walk_init(ht, &hti, GFP_KERNEL);
if (err) {
- pr_warn("Test failed: allocation error");
+ pr_warn("Test failed: allocation error\n");
return;
}
@@ -207,11 +209,11 @@ static void test_bucket_stats(struct rhashtable *ht, unsigned int entries)
rhashtable_walk_stop(&hti);
rhashtable_walk_exit(&hti);
- pr_info(" Traversal complete: counted=%u, nelems=%u, entries=%d, table-jumps=%u\n",
+ pr_info("Traversal complete: counted=%u, nelems=%u, entries=%d, table-jumps=%u\n",
total, atomic_read(&ht->nelems), entries, chain_len);
if (total != atomic_read(&ht->nelems) || total != entries)
- pr_warn("Test failed: Total count mismatch ^^^");
+ pr_warn("Test failed: Total count mismatch ^^^\n");
}
static s64 __init test_rhashtable(struct rhashtable *ht, struct test_obj *array,
@@ -226,7 +228,7 @@ static s64 __init test_rhashtable(struct rhashtable *ht, struct test_obj *array,
* Insertion Test:
* Insert entries into table with all keys even numbers
*/
- pr_info(" Adding %d keys\n", entries);
+ pr_info("Adding %d keys\n", entries);
start = ktime_get_ns();
for (i = 0; i < entries; i++) {
struct test_obj *obj = &array[i];
@@ -240,7 +242,7 @@ static s64 __init test_rhashtable(struct rhashtable *ht, struct test_obj *array,
}
if (insert_retries)
- pr_info(" %u insertions retried due to memory pressure\n",
+ pr_info("%u insertions retried due to memory pressure\n",
insert_retries);
test_bucket_stats(ht, entries);
@@ -250,7 +252,7 @@ static s64 __init test_rhashtable(struct rhashtable *ht, struct test_obj *array,
test_bucket_stats(ht, entries);
- pr_info(" Deleting %d keys\n", entries);
+ pr_info("Deleting %d keys\n", entries);
for (i = 0; i < entries; i++) {
struct test_obj_val key = {
.id = i * 2,
@@ -267,7 +269,7 @@ static s64 __init test_rhashtable(struct rhashtable *ht, struct test_obj *array,
}
end = ktime_get_ns();
- pr_info(" Duration of test: %lld ns\n", end - start);
+ pr_info("Duration of test: %lld ns\n", end - start);
return end - start;
}
@@ -481,7 +483,7 @@ static int __init test_rhashtable_max(struct test_obj *array,
err = 0;
} else {
pr_info("insert element %u should have failed with %d, got %d\n",
- ht.max_elems, -E2BIG, err);
+ ht.max_elems, -E2BIG, err);
if (err == 0)
err = -1;
}
@@ -611,13 +613,14 @@ static int thread_lookup_test(struct thread_data *tdata)
obj = rhashtable_lookup_fast(&ht, &key, test_rht_params);
if (obj && (tdata->objs[i].value.id == TEST_INSERT_FAIL)) {
- pr_err(" found unexpected object %d-%d\n", key.tid, key.id);
+ pr_err("found unexpected object %d-%d\n",
+ key.tid, key.id);
err++;
} else if (!obj && (tdata->objs[i].value.id != TEST_INSERT_FAIL)) {
- pr_err(" object %d-%d not found!\n", key.tid, key.id);
+ pr_err("object %d-%d not found!\n", key.tid, key.id);
err++;
} else if (obj && memcmp(&obj->value, &key, sizeof(key))) {
- pr_err(" wrong object returned (got %d-%d, expected %d-%d)\n",
+ pr_err("wrong object returned (got %d-%d, expected %d-%d)\n",
obj->value.tid, obj->value.id, key.tid, key.id);
err++;
}
@@ -634,7 +637,7 @@ static int threadfunc(void *data)
up(&prestart_sem);
if (down_interruptible(&startup_sem))
- pr_err(" thread[%d]: down_interruptible failed\n", tdata->id);
+ pr_err("thread[%d]: down_interruptible failed\n", tdata->id);
for (i = 0; i < tdata->entries; i++) {
tdata->objs[i].value.id = i;
@@ -643,18 +646,18 @@ static int threadfunc(void *data)
if (err > 0) {
insert_retries += err;
} else if (err) {
- pr_err(" thread[%d]: rhashtable_insert_fast failed\n",
+ pr_err("thread[%d]: rhashtable_insert_fast failed\n",
tdata->id);
goto out;
}
}
if (insert_retries)
- pr_info(" thread[%d]: %u insertions retried due to memory pressure\n",
+ pr_info("thread[%d]: %u insertions retried due to memory pressure\n",
tdata->id, insert_retries);
err = thread_lookup_test(tdata);
if (err) {
- pr_err(" thread[%d]: rhashtable_lookup_test failed\n",
+ pr_err("thread[%d]: rhashtable_lookup_test failed\n",
tdata->id);
goto out;
}
@@ -666,7 +669,7 @@ static int threadfunc(void *data)
err = rhashtable_remove_fast(&ht, &tdata->objs[i].node,
test_rht_params);
if (err) {
- pr_err(" thread[%d]: rhashtable_remove_fast failed\n",
+ pr_err("thread[%d]: rhashtable_remove_fast failed\n",
tdata->id);
goto out;
}
@@ -676,7 +679,7 @@ static int threadfunc(void *data)
}
err = thread_lookup_test(tdata);
if (err) {
- pr_err(" thread[%d]: rhashtable_lookup_test (2) failed\n",
+ pr_err("thread[%d]: rhashtable_lookup_test (2) failed\n",
tdata->id);
goto out;
}
@@ -738,7 +741,8 @@ static int __init test_rht_init(void)
}
pr_info("test if its possible to exceed max_size %d: %s\n",
- test_rht_params.max_size, test_rhashtable_max(objs, entries) == 0 ?
+ test_rht_params.max_size,
+ test_rhashtable_max(objs, entries) == 0 ?
"no, ok" : "YES, failed");
vfree(objs);
@@ -784,7 +788,7 @@ static int __init test_rht_init(void)
started_threads++;
}
if (down_interruptible(&prestart_sem))
- pr_err(" down interruptible failed\n");
+ pr_err("down interruptible failed\n");
for (i = 0; i < tcount; i++)
up(&startup_sem);
for (i = 0; i < tcount; i++) {
diff --git a/lib/test_sort.c b/lib/test_sort.c
index 385c0ed5202f..4ee9b64a34ef 100644
--- a/lib/test_sort.c
+++ b/lib/test_sort.c
@@ -1,3 +1,5 @@
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/sort.h>
#include <linux/slab.h>
#include <linux/module.h>
diff --git a/lib/ubsan.c b/lib/ubsan.c
index 59fee96c29a0..c16fccf5277d 100644
--- a/lib/ubsan.c
+++ b/lib/ubsan.c
@@ -10,6 +10,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/ctype.h>
@@ -49,10 +51,11 @@ static bool was_reported(struct source_location *location)
}
static void print_source_location(const char *prefix,
- struct source_location *loc)
+ struct source_location *loc)
{
- pr_err("%s %s:%d:%d\n", prefix, loc->file_name,
- loc->line & LINE_MASK, loc->column & COLUMN_MASK);
+ pr_err("%s %s:%d:%d\n",
+ prefix, loc->file_name,
+ loc->line & LINE_MASK, loc->column & COLUMN_MASK);
}
static bool suppress_report(struct source_location *loc)
@@ -149,16 +152,14 @@ static void ubsan_prologue(struct source_location *location,
current->in_ubsan++;
spin_lock_irqsave(&report_lock, *flags);
- pr_err("========================================"
- "========================================\n");
- print_source_location("UBSAN: Undefined behaviour in", location);
+ pr_err("================================================================================\n");
+ print_source_location("Undefined behaviour in", location);
}
static void ubsan_epilogue(unsigned long *flags)
{
dump_stack();
- pr_err("========================================"
- "========================================\n");
+ pr_err("================================================================================\n");
spin_unlock_irqrestore(&report_lock, *flags);
current->in_ubsan--;
}
@@ -182,9 +183,9 @@ static void handle_overflow(struct overflow_data *data, unsigned long lhs,
pr_err("%s integer overflow:\n",
type_is_signed(type) ? "signed" : "unsigned");
pr_err("%s %c %s cannot be represented in type %s\n",
- lhs_val_str,
- op,
- rhs_val_str,
+ lhs_val_str,
+ op,
+ rhs_val_str,
type->type_name);
ubsan_epilogue(&flags);
@@ -229,7 +230,7 @@ void __ubsan_handle_negate_overflow(struct overflow_data *data,
val_to_string(old_val_str, sizeof(old_val_str), data->type, old_val);
pr_err("negation of %s cannot be represented in type %s:\n",
- old_val_str, data->type->type_name);
+ old_val_str, data->type->type_name);
ubsan_epilogue(&flags);
}
@@ -252,7 +253,7 @@ void __ubsan_handle_divrem_overflow(struct overflow_data *data,
if (type_is_signed(data->type) && get_signed_val(data->type, rhs) == -1)
pr_err("division of %s by -1 cannot be represented in type %s\n",
- rhs_val_str, data->type->type_name);
+ rhs_val_str, data->type->type_name);
else
pr_err("division by zero\n");
@@ -270,8 +271,8 @@ static void handle_null_ptr_deref(struct type_mismatch_data_common *data)
ubsan_prologue(data->location, &flags);
pr_err("%s null pointer of type %s\n",
- type_check_kinds[data->type_check_kind],
- data->type->type_name);
+ type_check_kinds[data->type_check_kind],
+ data->type->type_name);
ubsan_epilogue(&flags);
}
@@ -287,8 +288,8 @@ static void handle_misaligned_access(struct type_mismatch_data_common *data,
ubsan_prologue(data->location, &flags);
pr_err("%s misaligned address %p for type %s\n",
- type_check_kinds[data->type_check_kind],
- (void *)ptr, data->type->type_name);
+ type_check_kinds[data->type_check_kind],
+ (void *)ptr, data->type->type_name);
pr_err("which requires %ld byte alignment\n", data->alignment);
ubsan_epilogue(&flags);
@@ -304,8 +305,8 @@ static void handle_object_size_mismatch(struct type_mismatch_data_common *data,
ubsan_prologue(data->location, &flags);
pr_err("%s address %p with insufficient space\n",
- type_check_kinds[data->type_check_kind],
- (void *) ptr);
+ type_check_kinds[data->type_check_kind],
+ (void *)ptr);
pr_err("for an object of type %s\n", data->type->type_name);
ubsan_epilogue(&flags);
}
@@ -381,8 +382,8 @@ void __ubsan_handle_out_of_bounds(struct out_of_bounds_data *data,
ubsan_prologue(&data->location, &flags);
val_to_string(index_str, sizeof(index_str), data->index_type, index);
- pr_err("index %s is out of range for type %s\n", index_str,
- data->array_type->type_name);
+ pr_err("index %s is out of range for type %s\n",
+ index_str, data->array_type->type_name);
ubsan_epilogue(&flags);
}
EXPORT_SYMBOL(__ubsan_handle_out_of_bounds);
@@ -410,17 +411,15 @@ void __ubsan_handle_shift_out_of_bounds(struct shift_out_of_bounds_data *data,
else if (get_unsigned_val(rhs_type, rhs) >=
type_bit_width(lhs_type))
pr_err("shift exponent %s is too large for %u-bit type %s\n",
- rhs_str,
- type_bit_width(lhs_type),
- lhs_type->type_name);
+ rhs_str,
+ type_bit_width(lhs_type),
+ lhs_type->type_name);
else if (val_is_negative(lhs_type, lhs))
- pr_err("left shift of negative value %s\n",
- lhs_str);
+ pr_err("left shift of negative value %s\n", lhs_str);
else
- pr_err("left shift of %s by %s places cannot be"
- " represented in type %s\n",
- lhs_str, rhs_str,
- lhs_type->type_name);
+ pr_err("left shift of %s by %s places cannot be represented in type %s\n",
+ lhs_str, rhs_str,
+ lhs_type->type_name);
ubsan_epilogue(&flags);
}
@@ -453,7 +452,7 @@ void __ubsan_handle_load_invalid_value(struct invalid_value_data *data,
val_to_string(val_str, sizeof(val_str), data->type, val);
pr_err("load of value %s is not a valid value for type %s\n",
- val_str, data->type->type_name);
+ val_str, data->type->type_name);
ubsan_epilogue(&flags);
}
--
2.15.0
^ permalink raw reply related
* [PATCH 06/18] net: Remove pr_fmt duplicate logging prefixes
From: Joe Perches @ 2018-05-10 15:45 UTC (permalink / raw)
To: David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI,
Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal
Cc: netdev, linux-kernel, netfilter-devel, coreteam
In-Reply-To: <cover.1525964381.git.joe@perches.com>
Using KBUILD_MODNAME as the default pr_fmt prefix caused some
duplication on logging prefixes in net/.
Remove the duplicate prefixes.
Signed-off-by: Joe Perches <joe@perches.com>
---
net/ipv4/ipconfig.c | 59 ++++++++++++--------------
net/ipv4/ipmr.c | 2 +-
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 9 ++--
net/ipv6/ip6mr.c | 2 +-
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 6 +--
net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 4 +-
net/netfilter/nf_conntrack_helper.c | 11 ++---
net/netfilter/nf_conntrack_standalone.c | 2 +-
net/socket.c | 2 +-
9 files changed, 43 insertions(+), 54 deletions(-)
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index d839d74853fc..fcf7a4f1b09a 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -224,7 +224,7 @@ static int __init ic_open_devs(void)
if (!(dev->flags & IFF_LOOPBACK) && !netdev_uses_dsa(dev))
continue;
if (dev_change_flags(dev, dev->flags | IFF_UP) < 0)
- pr_err("IP-Config: Failed to open %s\n", dev->name);
+ pr_err("Failed to open %s\n", dev->name);
}
for_each_netdev(&init_net, dev) {
@@ -242,8 +242,7 @@ static int __init ic_open_devs(void)
continue;
oflags = dev->flags;
if (dev_change_flags(dev, oflags | IFF_UP) < 0) {
- pr_err("IP-Config: Failed to open %s\n",
- dev->name);
+ pr_err("Failed to open %s\n", dev->name);
continue;
}
if (!(d = kmalloc(sizeof(struct ic_device), GFP_KERNEL))) {
@@ -260,7 +259,7 @@ static int __init ic_open_devs(void)
else
d->xid = 0;
ic_proto_have_if |= able;
- pr_debug("IP-Config: %s UP (able=%d, xid=%08x)\n",
+ pr_debug("%s UP (able=%d, xid=%08x)\n",
dev->name, able, d->xid);
}
}
@@ -287,7 +286,7 @@ static int __init ic_open_devs(void)
elapsed = jiffies_to_msecs(jiffies - start);
wait = (CONF_CARRIER_TIMEOUT - elapsed + 500)/1000;
- pr_info("Waiting up to %d more seconds for network.\n", wait);
+ pr_info("Waiting up to %d more seconds for network\n", wait);
next_msg = jiffies + msecs_to_jiffies(CONF_CARRIER_TIMEOUT/12);
}
have_carrier:
@@ -297,10 +296,9 @@ static int __init ic_open_devs(void)
if (!ic_first_dev) {
if (user_dev_name[0])
- pr_err("IP-Config: Device `%s' not found\n",
- user_dev_name);
+ pr_err("Device `%s' not found\n", user_dev_name);
else
- pr_err("IP-Config: No network devices available\n");
+ pr_err("No network devices available\n");
return -ENODEV;
}
return 0;
@@ -317,7 +315,7 @@ static void __init ic_close_devs(void)
next = d->next;
dev = d->dev;
if (d != ic_dev && !netdev_uses_dsa(dev)) {
- pr_debug("IP-Config: Downing %s\n", dev->name);
+ pr_debug("Downing %s\n", dev->name);
dev_change_flags(dev, d->flags);
}
kfree(d);
@@ -351,20 +349,17 @@ static int __init ic_setup_if(void)
strcpy(ir.ifr_ifrn.ifrn_name, ic_dev->dev->name);
set_sockaddr(sin, ic_myaddr, 0);
if ((err = devinet_ioctl(&init_net, SIOCSIFADDR, &ir)) < 0) {
- pr_err("IP-Config: Unable to set interface address (%d)\n",
- err);
+ pr_err("Unable to set interface address (%d)\n", err);
return -1;
}
set_sockaddr(sin, ic_netmask, 0);
if ((err = devinet_ioctl(&init_net, SIOCSIFNETMASK, &ir)) < 0) {
- pr_err("IP-Config: Unable to set interface netmask (%d)\n",
- err);
+ pr_err("Unable to set interface netmask (%d)\n", err);
return -1;
}
set_sockaddr(sin, ic_myaddr | ~ic_netmask, 0);
if ((err = devinet_ioctl(&init_net, SIOCSIFBRDADDR, &ir)) < 0) {
- pr_err("IP-Config: Unable to set interface broadcast address (%d)\n",
- err);
+ pr_err("Unable to set interface broadcast address (%d)\n", err);
return -1;
}
/* Handle the case where we need non-standard MTU on the boot link (a network
@@ -374,7 +369,7 @@ static int __init ic_setup_if(void)
if (ic_dev_mtu != 0) {
rtnl_lock();
if ((err = dev_set_mtu(ic_dev->dev, ic_dev_mtu)) < 0)
- pr_err("IP-Config: Unable to set interface mtu to %d (%d)\n",
+ pr_err("Unable to set interface mtu to %d (%d)\n",
ic_dev_mtu, err);
rtnl_unlock();
}
@@ -391,7 +386,7 @@ static int __init ic_setup_routes(void)
memset(&rm, 0, sizeof(rm));
if ((ic_gateway ^ ic_myaddr) & ic_netmask) {
- pr_err("IP-Config: Gateway not on directly connected network\n");
+ pr_err("Gateway not on directly connected network\n");
return -1;
}
set_sockaddr((struct sockaddr_in *) &rm.rt_dst, 0, 0);
@@ -399,8 +394,7 @@ static int __init ic_setup_routes(void)
set_sockaddr((struct sockaddr_in *) &rm.rt_gateway, ic_gateway, 0);
rm.rt_flags = RTF_UP | RTF_GATEWAY;
if ((err = ip_rt_ioctl(&init_net, SIOCADDRT, &rm)) < 0) {
- pr_err("IP-Config: Cannot add default route (%d)\n",
- err);
+ pr_err("Cannot add default route (%d)\n", err);
return -1;
}
}
@@ -433,12 +427,11 @@ static int __init ic_defaults(void)
else if (IN_CLASSC(ntohl(ic_myaddr)))
ic_netmask = htonl(IN_CLASSC_NET);
else {
- pr_err("IP-Config: Unable to guess netmask for address %pI4\n",
+ pr_err("Unable to guess netmask for address %pI4\n",
&ic_myaddr);
return -1;
}
- pr_notice("IP-Config: Guessing netmask %pI4\n",
- &ic_netmask);
+ pr_notice("Guessing netmask %pI4\n", &ic_netmask);
}
return 0;
@@ -834,8 +827,8 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d
else if (dev->type == ARPHRD_FDDI)
b->htype = ARPHRD_ETHER;
else {
- pr_warn("Unknown ARP type 0x%04x for device %s\n", dev->type,
- dev->name);
+ pr_warn("Unknown ARP type 0x%04x for device %s\n",
+ dev->type, dev->name);
b->htype = dev->type; /* can cause undefined behavior */
}
@@ -1169,7 +1162,7 @@ static int __init ic_dynamic(void)
* are missing, and without DHCP/BOOTP/RARP we are unable to get it.
*/
if (!ic_proto_enabled) {
- pr_err("IP-Config: Incomplete network configuration information\n");
+ pr_err("Incomplete network configuration information\n");
return -1;
}
@@ -1281,7 +1274,7 @@ static int __init ic_dynamic(void)
return -1;
}
- pr_info("IP-Config: Got %s answer from %pI4, my address is %pI4\n",
+ pr_info("Got %s answer from %pI4, my address is %pI4\n",
((ic_got_reply & IC_RARP) ? "RARP"
: (ic_proto_enabled & IC_USE_DHCP) ? "DHCP" : "BOOTP"),
&ic_addrservaddr, &ic_myaddr);
@@ -1479,7 +1472,7 @@ static int __init ip_auto_config(void)
if (!ic_enable)
return 0;
- pr_debug("IP-Config: Entered.\n");
+ pr_debug("Entered\n");
#ifdef IPCONFIG_DYNAMIC
try_try_again:
#endif
@@ -1529,22 +1522,22 @@ static int __init ip_auto_config(void)
*/
#ifdef CONFIG_ROOT_NFS
if (ROOT_DEV == Root_NFS) {
- pr_err("IP-Config: Retrying forever (NFS root)...\n");
+ pr_err("Retrying forever (NFS root)...\n");
goto try_try_again;
}
#endif
if (--retries) {
- pr_err("IP-Config: Reopening network devices...\n");
+ pr_err("Reopening network devices...\n");
goto try_try_again;
}
/* Oh, well. At least we tried. */
- pr_err("IP-Config: Auto-configuration of network failed\n");
+ pr_err("Auto-configuration of network failed\n");
return -1;
}
#else /* !DYNAMIC */
- pr_err("IP-Config: Incomplete network configuration information\n");
+ pr_err("Incomplete network configuration information\n");
ic_close_devs();
return -1;
#endif /* IPCONFIG_DYNAMIC */
@@ -1574,7 +1567,7 @@ static int __init ip_auto_config(void)
/*
* Clue in the operator.
*/
- pr_info("IP-Config: Complete:\n");
+ pr_info("Complete:\n");
pr_info(" device=%s, hwaddr=%*phC, ipaddr=%pI4, mask=%pI4, gw=%pI4\n",
ic_dev->dev->name, ic_dev->dev->addr_len, ic_dev->dev->dev_addr,
@@ -1718,7 +1711,7 @@ static int __init ip_auto_config_setup(char *addrs)
if ((cp = strchr(ip, ':')))
*cp++ = '\0';
if (strlen(ip) > 0) {
- pr_debug("IP-Config: Parameter #%d: `%s'\n", num, ip);
+ pr_debug("Parameter #%d: `%s'\n", num, ip);
switch (num) {
case 0:
if ((ic_myaddr = in_aton(ip)) == ANY)
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 38e092eafc97..3c39f526c770 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1259,7 +1259,7 @@ static int ipmr_mfc_add(struct net *net, struct mr_table *mrt,
ret = rhltable_insert_key(&mrt->mfc_hash, &c->cmparg, &c->_c.mnode,
ipmr_rht_params);
if (ret) {
- pr_err("ipmr: rhtable insert error %d\n", ret);
+ pr_err("rhtable insert error %d\n", ret);
ipmr_cache_free(c);
return ret;
}
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
index 9db988f9a4d7..5bcd97269093 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
@@ -83,8 +83,7 @@ static int ipv4_get_l4proto(const struct sk_buff *skb, unsigned int nhoff,
/* Check bogus IP headers */
if (*dataoff > skb->len) {
- pr_debug("nf_conntrack_ipv4: bogus IPv4 packet: "
- "nhoff %u, ihl %u, skblen %u\n",
+ pr_debug("bogus IPv4 packet: nhoff %u, ihl %u, skblen %u\n",
nhoff, iph->ihl << 2, skb->len);
return -NF_ACCEPT;
}
@@ -268,7 +267,7 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len)
else
return 0;
}
- pr_debug("SO_ORIGINAL_DST: Can't find %pI4/%u-%pI4/%u.\n",
+ pr_debug("SO_ORIGINAL_DST: Can't find %pI4/%u-%pI4/%u\n",
&tuple.src.u3.ip, ntohs(tuple.src.u.tcp.port),
&tuple.dst.u3.ip, ntohs(tuple.dst.u.tcp.port));
return -ENOENT;
@@ -432,7 +431,7 @@ static int __init nf_conntrack_l3proto_ipv4_init(void)
ret = register_pernet_subsys(&ipv4_net_ops);
if (ret < 0) {
- pr_err("nf_conntrack_ipv4: can't register pernet ops\n");
+ pr_err("can't register pernet ops\n");
goto cleanup_sockopt;
}
@@ -443,7 +442,7 @@ static int __init nf_conntrack_l3proto_ipv4_init(void)
ret = nf_ct_l3proto_register(&nf_conntrack_l3proto_ipv4);
if (ret < 0) {
- pr_err("nf_conntrack_ipv4: can't register ipv4 proto.\n");
+ pr_err("can't register ipv4 proto\n");
goto cleanup_l4proto;
}
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 20a419ee8000..95cc0e8634cb 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1458,7 +1458,7 @@ static int ip6mr_mfc_add(struct net *net, struct mr_table *mrt,
err = rhltable_insert_key(&mrt->mfc_hash, &c->cmparg, &c->_c.mnode,
ip6mr_rht_params);
if (err) {
- pr_err("ip6mr: rhtable insert error %d\n", err);
+ pr_err("rhtable insert error %d\n", err);
ip6mr_cache_free(c);
return err;
}
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
index 663827ee3cf8..b15cc05dedd7 100644
--- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
@@ -77,7 +77,7 @@ static int ipv6_get_l4proto(const struct sk_buff *skb, unsigned int nhoff,
if (skb_copy_bits(skb, nhoff + offsetof(struct ipv6hdr, nexthdr),
&nexthdr, sizeof(nexthdr)) != 0) {
- pr_debug("ip6_conntrack_core: can't get nexthdr\n");
+ pr_debug("can't get nexthdr\n");
return -NF_ACCEPT;
}
protoff = ipv6_skip_exthdr(skb, extoff, &nexthdr, &frag_off);
@@ -86,7 +86,7 @@ static int ipv6_get_l4proto(const struct sk_buff *skb, unsigned int nhoff,
* IPv6 and possibly extensions headers, but it is tracked anyway
*/
if (protoff < 0 || (frag_off & htons(~0x7)) != 0) {
- pr_debug("ip6_conntrack_core: can't find proto in pkt\n");
+ pr_debug("can't find proto in pkt\n");
return -NF_ACCEPT;
}
@@ -432,7 +432,7 @@ static int __init nf_conntrack_l3proto_ipv6_init(void)
ret = nf_ct_l3proto_register(&nf_conntrack_l3proto_ipv6);
if (ret < 0) {
- pr_err("nf_conntrack_ipv6: can't register ipv6 proto.\n");
+ pr_err("can't register ipv6 proto\n");
goto cleanup_l4proto;
}
return ret;
diff --git a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
index c87b48359e8f..b0d42797d003 100644
--- a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
+++ b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
@@ -111,12 +111,12 @@ static int __init nf_defrag_init(void)
ret = nf_ct_frag6_init();
if (ret < 0) {
- pr_err("nf_defrag_ipv6: can't initialize frag6.\n");
+ pr_err("can't initialize frag6\n");
return ret;
}
ret = register_pernet_subsys(&defrag6_net_ops);
if (ret < 0) {
- pr_err("nf_defrag_ipv6: can't register pernet ops\n");
+ pr_err("can't register pernet ops\n");
goto cleanup_frag6;
}
return ret;
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
index 551a1eddf0fa..716017f4131b 100644
--- a/net/netfilter/nf_conntrack_helper.c
+++ b/net/netfilter/nf_conntrack_helper.c
@@ -74,7 +74,7 @@ static int nf_conntrack_helper_init_sysctl(struct net *net)
register_net_sysctl(net, "net/netfilter", table);
if (!net->ct.helper_sysctl_header) {
- pr_err("nf_conntrack_helper: can't register to sysctl.\n");
+ pr_err("can't register to sysctl\n");
goto out_register;
}
return 0;
@@ -202,7 +202,7 @@ nf_ct_helper_ext_add(struct nf_conn *ct,
if (help)
INIT_HLIST_HEAD(&help->expectations);
else
- pr_debug("failed to add helper extension area");
+ pr_debug("failed to add helper extension area\n");
return help;
}
EXPORT_SYMBOL_GPL(nf_ct_helper_ext_add);
@@ -215,10 +215,7 @@ nf_ct_lookup_helper(struct nf_conn *ct, struct net *net)
return NULL;
if (!__nf_ct_helper_find(&ct->tuplehash[IP_CT_DIR_REPLY].tuple))
return NULL;
- pr_info("nf_conntrack: default automatic helper assignment "
- "has been turned off for security reasons and CT-based "
- " firewall rule not found. Use the iptables CT target "
- "to attach helpers instead.\n");
+ pr_info("default automatic helper assignment has been turned off for security reasons and CT-based firewall rule not found. Use the iptables CT target to attach helpers instead.\n");
net->ct.auto_assign_helper_warned = 1;
return NULL;
}
@@ -553,7 +550,7 @@ int nf_conntrack_helper_init(void)
ret = nf_ct_extend_register(&helper_extend);
if (ret < 0) {
- pr_err("nf_ct_helper: Unable to register helper extension.\n");
+ pr_err("Unable to register helper extension\n");
goto out_extend;
}
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index 037fec54c850..e5de8d609135 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -720,7 +720,7 @@ static int __init nf_conntrack_standalone_init(void)
nf_ct_netfilter_header =
register_net_sysctl(&init_net, "net", nf_ct_netfilter_table);
if (!nf_ct_netfilter_header) {
- pr_err("nf_conntrack: can't register to sysctl.\n");
+ pr_err("can't register to sysctl\n");
ret = -ENOMEM;
goto out_sysctl;
}
diff --git a/net/socket.c b/net/socket.c
index 667a7b397134..0b7ce9fd9d35 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1248,7 +1248,7 @@ int __sock_create(struct net *net, int family, int type, int protocol,
*/
sock = sock_alloc();
if (!sock) {
- net_warn_ratelimited("socket: no more sockets\n");
+ net_warn_ratelimited("no more sockets\n");
return -ENFILE; /* Not exactly a match, but its the
closest posix thing */
}
--
2.15.0
^ permalink raw reply related
* [PATCH 09/18] ptp: Remove pr_fmt duplicate logging prefixes
From: Joe Perches @ 2018-05-10 15:45 UTC (permalink / raw)
To: Richard Cochran; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1525964381.git.joe@perches.com>
Converting pr_fmt from a simple define to use KBUILD_MODNAME added
some duplicate logging prefixes to existing uses.
Remove them.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/ptp/ptp_clock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index 7eacc1c4b3b1..35d9e1aa6564 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -396,13 +396,13 @@ static int __init ptp_init(void)
ptp_class = class_create(THIS_MODULE, "ptp");
if (IS_ERR(ptp_class)) {
- pr_err("ptp: failed to allocate class\n");
+ pr_err("failed to allocate class\n");
return PTR_ERR(ptp_class);
}
err = alloc_chrdev_region(&ptp_devt, 0, MINORMASK + 1, "ptp");
if (err < 0) {
- pr_err("ptp: failed to allocate device region\n");
+ pr_err("failed to allocate device region\n");
goto no_region;
}
--
2.15.0
^ permalink raw reply related
* Re: [PATCH bpf v3] x86/cpufeature: bpf hack for clang not supporting asm goto
From: Alexei Starovoitov @ 2018-05-10 15:52 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Yonghong Song, mingo, torvalds, ast, daniel, linux-kernel, x86,
netdev, kernel-team, Thomas Gleixner
In-Reply-To: <20180510100634.GZ12217@hirez.programming.kicks-ass.net>
On Thu, May 10, 2018 at 12:06:34PM +0200, Peter Zijlstra wrote:
> On Thu, May 03, 2018 at 08:31:19PM -0700, Yonghong Song wrote:
>
> > This approach is preferred since the already deployed bcc scripts, or
> > any other bpf applicaitons utilizing LLVM JIT compilation functionality,
> > will continue work with the new kernel without re-compilation and
> > re-deployment.
>
> So I really hate this and would much rather see the BPF build
> environment changed. It not consistenyly having __BPF__ defined really
> smells like a bug on your end.
>
> Sometimes you just need to update tools... Is it really too hard to do
> -D__BPF__ in the bpf build process that we need to mollest the kernel
> for it?
>
> > Note that this is a hack in the kernel to workaround bpf compilation issue.
> > The hack will be removed once clang starts to support asm goto.
>
> Note that that ^^ already mandates people re-deploy their bpf tools, so
> why is llvm supporting asm-goto a better point to re-deploy than fixing
> a consistent __BPF__ define for the bpf build environment?
This thread has been going for over a month now. Looks like we're starting
to go in circles and what we discussed earlier got lost. To recap:
- this is NOT a bpf issue. libbcc is the first user that got broken
by commit d0266046ad54 ("x86: Remove FAST_FEATURE_TESTS")
- all other libraries and tools (like fuzzers, static code analyzers, etc)
that are using clang front-end to process kernel headers are broken too
That makes me wonder what happened with "we do not break user space" rule?
I think the safest course of action would be to partially revert the
offending commit d0266046ad54 which we proposed first.
Since you were concerned that this is somehow will disincentivize clang
folks to add asm-goto support, we agreed to add this __NO_CLANG_BPF_HACK
macro to un-break libbcc at least, so that existing libbcc installations
will continue to work when people upgrade kernels.
The __BPF__ macro is automatically defined by clang when '-target bpf' is used.
This is NOT the case here. libbcc has to use native target when
processing kernel headers.
It happens from time to time that one or the other libbcc script gets
broken by new kernel because kprobe symbol that the script is using
got changed in the recent kernel. That's ok and we deal with this situation
all the time. What's different this time that ALL bcc scripts are broken
because of this commit and we cannot workaround in user space.
^ 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