* Re: [PATCH 3/3] stmmac: pci: Use dmi_system_id table for retrieving PHY addresses
From: Joe Perches @ 2017-05-22 13:13 UTC (permalink / raw)
To: Jan Kiszka, Giuseppe Cavallaro, Alexandre Torgue, David Miller
Cc: netdev, linux-kernel, Andy Shevchenko
In-Reply-To: <72ff21ba-f774-b3d5-23b4-e70095cedbef@siemens.com>
On Mon, 2017-05-22 at 14:49 +0200, Jan Kiszka wrote:
> On 2017-05-22 13:33, Joe Perches wrote:
> > On Mon, 2017-05-22 at 13:12 +0200, Jan Kiszka wrote:
> > > Avoids reimplementation of DMI matching in stmmac_pci_find_phy_addr.
> >
> > []
> > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
> >
> > []
> > > @@ -31,65 +31,78 @@
> >
> > []
> > > +static const struct stmmac_pci_dmi_data iot2040_stmmac_dmi_data[] = {
> > > {
> > > - .name = "GalileoGen2",
> > > .func = 6,
> > > .phy_addr = 1,
> > > },
> > > {
> > > - .name = "SIMATIC IOT2000",
> > > - .asset_tag = "6ES7647-0AA00-0YA2",
> > > - .func = 6,
> > > + .func = 7,
> >
> > Why change this from 6 to 7?
> >
>
> The diff is confusing here: If you look at the outcome, we now have
> galileo_stmmac_dmi_data with function 6 only (also used for the
> IOT2020), and iot2040_stmmac_dmi_data with both function 6 and 7 (both
> MACs are wired up).
Right. Apologies for noise.
^ permalink raw reply
* Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low
From: Oliver Neukum @ 2017-05-22 13:27 UTC (permalink / raw)
To: David Laight, 'Bjørn Mork'
Cc: 'Jim Baxter',
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DCFFFAC2B-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
Am Freitag, den 19.05.2017, 14:46 +0000 schrieb David Laight:
> For XHCI it isn't too bad because it will do arbitrary scatter-gather
> (apart from the ring end).
> But I believe the earlier controllers only support fragments that
> end on usb packet boundaries.
>
> I looked at the usbnet code a few years ago, I'm sure it ought to
> be possible to shortcut most of the code that uses URB and directly
> write to the xhci (in particular) ring descriptors.
Hi,
we cannot break the layering. URBs can support scatter/gather and
that infrastructure must be used. And usbnet will work with sg used
in skbs. What you should honor in general is not splitting packets.
So 512 byte chunks.
Regards
Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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 1/2] ip: include libc headers first
From: Baruch Siach @ 2017-05-22 13:27 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger, Baruch Siach
Including libc headers first helps as a workaround to redefinition of struct
ethhdr with a suitably patched musl libc that suppresses the kernel
if_ether.h.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
ip/iplink_bridge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index 818b43c89b5b..cccdec1c203a 100644
--- a/ip/iplink_bridge.c
+++ b/ip/iplink_bridge.c
@@ -13,9 +13,9 @@
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
+#include <netinet/ether.h>
#include <linux/if_link.h>
#include <linux/if_bridge.h>
-#include <netinet/ether.h>
#include <net/if.h>
#include "rt_names.h"
--
2.11.0
^ permalink raw reply related
* [PATCH 2/2] Add missing <sys/types.h> include
From: Baruch Siach @ 2017-05-22 13:27 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger, Thomas Petazzoni, Baruch Siach
In-Reply-To: <8afdd8babb9e82bcfde78e851b24b698436a6f9f.1495459674.git.baruch@tkos.co.il>
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The u_intXX_t types are defined in <sys/types.h>, so it should be
included before using those types. Otherwise, with certain C
libraries, the build fails with:
In file included from ../include/iptables.h:4:0,
from m_ipt.c:18:
../include/iptables_common.h:47:16: error: unknown type name ‘u_int32_t’
#define __le32 u_int32_t
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
include/iptables_common.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/iptables_common.h b/include/iptables_common.h
index 9099667ffa6d..2c27a4b61fcd 100644
--- a/include/iptables_common.h
+++ b/include/iptables_common.h
@@ -43,6 +43,8 @@ extern char *lib_dir;
extern void init_extensions(void);
#endif
+#include <sys/types.h>
+
#define __be32 u_int32_t
#define __le32 u_int32_t
#define __be16 u_int16_t
--
2.11.0
^ permalink raw reply related
* Re: [kernel-hardening] [PATCH v4 next 0/3] modules: automatic module loading restrictions
From: Djalal Harouni @ 2017-05-22 13:49 UTC (permalink / raw)
To: Solar Designer
Cc: linux-kernel, netdev-u79uwXL29TY76Z2rM5mHXA, LSM List,
kernel-hardening-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8,
Andy Lutomirski, Kees Cook, Andrew Morton, Rusty Russell,
Serge E. Hallyn, Jessica Yu, David S. Miller, James Morris,
Paul Moore, Stephen Smalley, Greg Kroah-Hartman, Tetsuo Handa,
Ingo Molnar, Linux API, Dongsu Park, Casey Schaufler <ca
In-Reply-To: <20170522120848.GA3003-cxoSlKxDwOJWk0Htik3J/w@public.gmane.org>
Hi Alexander,
On Mon, May 22, 2017 at 2:08 PM, Solar Designer <solar-cxoSlKxDwOJWk0Htik3J/w@public.gmane.org> wrote:
> Hi Djalal,
>
> Thank you for your work on this!
>
> On Mon, May 22, 2017 at 01:57:03PM +0200, Djalal Harouni wrote:
>> *) When modules_autoload_mode is set to (2), automatic module loading is
>> disabled for all. Once set, this value can not be changed.
>
> What purpose does this securelevel-like property ("Once set, this value
> can not be changed.") serve here? I think this mode 2 is needed, but
> without this extra property, which is bypassable by e.g. explicitly
> loaded kernel modules anyway (and that's OK).
My reasoning about "Once set, this value can not be changed" is mainly for:
If you have some systems where modules are not updated for any given
reason, then the only one who will be able to load a module is an
administrator, basically this is a shortcut for:
* Apps/services can run with CAP_NET_ADMIN but they are not allowed to
auto-load 'netdev' modules.
* Explicitly loading modules can be guarded by seccomp filters *per*
app, so even if these apps have
CAP_SYS_MODULE they won't be able to explicitly load modules, one
has to remount some sysctl /proc/ entries read-only here and remove
CAP_SYS_ADMIN for all apps anyway.
This mainly serves the purpose of these systems that do not receive
updates, if I don't want to expose those kernel interfaces what should
I do ? then if I want to unload old versions and replace them with new
ones what operation should be allowed ? and only real root of the
system can do it. Hence, the "Once set, this value can not be changed"
is more of a shortcut, also the idea was put in my mind based on how
"modules_disabled" is disabled forever, and some other interfaces. I
would say: it is easy to handle a transition from 1) "hey this system
is still up to date, some features should be exposed" to 2) "this
system is not up to date anymore, only root should expose some
features..."
Hmm, I am not sure if this answers your question ? :-)
I definitively don't want to fall into "modules_disabled" trap where
is it too strict! "Once set, this value can not be changed" means for
some users do not set it otherwise the system is unusable...
Maybe an extra "4" mode for that ? better get it right.
Thanks!
--
tixxdz
^ permalink raw reply
* Re: [Patch net] vsock: use new wait API for vsock_stream_sendmsg()
From: Stefan Hajnoczi @ 2017-05-22 13:56 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev, Jorgen Hansen, Michael S. Tsirkin, Claudio Imbrenda
In-Reply-To: <1495218119-12358-1-git-send-email-xiyou.wangcong@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 960 bytes --]
On Fri, May 19, 2017 at 11:21:59AM -0700, Cong Wang wrote:
> As reported by Michal, vsock_stream_sendmsg() could still
> sleep at vsock_stream_has_space() after prepare_to_wait():
>
> vsock_stream_has_space
> vmci_transport_stream_has_space
> vmci_qpair_produce_free_space
> qp_lock
> qp_acquire_queue_mutex
> mutex_lock
>
> Just switch to the new wait API like we did for commit
> d9dc8b0f8b4e ("net: fix sleeping for sk_wait_event()").
>
> Reported-by: Michal Kubecek <mkubecek@suse.cz>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: Jorgen Hansen <jhansen@vmware.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> ---
> net/vmw_vsock/af_vsock.c | 21 ++++++++-------------
> 1 file changed, 8 insertions(+), 13 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply
* Re: [PATCH] net: fec: add post PHY reset delay DT property
From: Andrew Lunn @ 2017-05-22 13:57 UTC (permalink / raw)
To: Quentin Schulz
Cc: fugang.duan-3arQi8VN3Tc, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
mark.rutland-5wv7dgnIgG8, netdev-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
In-Reply-To: <20170522091517.6857-1-quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
On Mon, May 22, 2017 at 11:15:17AM +0200, Quentin Schulz wrote:
> Some PHY require to wait for a bit after the reset GPIO has been
> toggled. This adds support for the DT property `phy-reset-post-delay`
> which gives the delay in milliseconds to wait after reset.
>
> If the DT property is not given, no delay is observed. Post reset delay
> greater than 1000ms are invalid and are default to 1ms.
Hi Quentin
If it is invalid, please return -EINVAL.
> Signed-off-by: Quentin Schulz <quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> ---
> Documentation/devicetree/bindings/net/fsl-fec.txt | 5 +++++
> drivers/net/ethernet/freescale/fec_main.c | 17 +++++++++++++++--
> 2 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
> index a1e3693cca16..8795e8ca5793 100644
> --- a/Documentation/devicetree/bindings/net/fsl-fec.txt
> +++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
> @@ -15,6 +15,11 @@ Optional properties:
> - phy-reset-active-high : If present then the reset sequence using the GPIO
> specified in the "phy-reset-gpios" property is reversed (H=reset state,
> L=operation state).
> +- phy-reset-post-delay : Post reset delay in milliseconds. If present then
> + a delay of phy-reset-post-delay milliseconds will be observed after the
> + phy-reset-gpios has been toggled. Can be omitted thus no delay is
> + observed. Delay is in range of 1ms to 1000ms. If given delay is higher
> + than 1000ms, 1ms delay is done instead.
> - phy-supply : regulator that powers the Ethernet PHY.
> - phy-handle : phandle to the PHY device connected to this device.
> - fixed-link : Assume a fixed link. See fixed-link.txt in the same directory.
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 56a563f90b0b..00a7fd0bcd59 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -3192,7 +3192,7 @@ static int fec_reset_phy(struct platform_device *pdev)
> {
> int err, phy_reset;
> bool active_high = false;
> - int msec = 1;
> + int msec = 1, phy_post_delay = 0;
> struct device_node *np = pdev->dev.of_node;
>
> if (!np)
> @@ -3210,7 +3210,6 @@ static int fec_reset_phy(struct platform_device *pdev)
> return 0;
>
> active_high = of_property_read_bool(np, "phy-reset-active-high");
> -
> err = devm_gpio_request_one(&pdev->dev, phy_reset,
> active_high ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW,
> "phy-reset");
No white space changes please.
Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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
* Re: [PATCH] net: fec: add post PHY reset delay DT property
From: Quentin Schulz @ 2017-05-22 14:00 UTC (permalink / raw)
To: Andrew Lunn
Cc: fugang.duan-3arQi8VN3Tc, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
mark.rutland-5wv7dgnIgG8, netdev-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
In-Reply-To: <20170522135705.GB29447-g2DYL2Zd6BY@public.gmane.org>
Hi Andrew
On 22/05/2017 15:57, Andrew Lunn wrote:
> On Mon, May 22, 2017 at 11:15:17AM +0200, Quentin Schulz wrote:
>> Some PHY require to wait for a bit after the reset GPIO has been
>> toggled. This adds support for the DT property `phy-reset-post-delay`
>> which gives the delay in milliseconds to wait after reset.
>>
>> If the DT property is not given, no delay is observed. Post reset delay
>> greater than 1000ms are invalid and are default to 1ms.
>
> Hi Quentin
>
> If it is invalid, please return -EINVAL.
>
Just copying the wording and behavior of phy-reset-duration. Should we
then change the behavior of phy-reset-duration as well to return -EINVAL
in that case or I just leave both as is?
Quentin
>> Signed-off-by: Quentin Schulz <quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
>> ---
>> Documentation/devicetree/bindings/net/fsl-fec.txt | 5 +++++
>> drivers/net/ethernet/freescale/fec_main.c | 17 +++++++++++++++--
>> 2 files changed, 20 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
>> index a1e3693cca16..8795e8ca5793 100644
>> --- a/Documentation/devicetree/bindings/net/fsl-fec.txt
>> +++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
>> @@ -15,6 +15,11 @@ Optional properties:
>> - phy-reset-active-high : If present then the reset sequence using the GPIO
>> specified in the "phy-reset-gpios" property is reversed (H=reset state,
>> L=operation state).
>> +- phy-reset-post-delay : Post reset delay in milliseconds. If present then
>> + a delay of phy-reset-post-delay milliseconds will be observed after the
>> + phy-reset-gpios has been toggled. Can be omitted thus no delay is
>> + observed. Delay is in range of 1ms to 1000ms. If given delay is higher
>> + than 1000ms, 1ms delay is done instead.
>> - phy-supply : regulator that powers the Ethernet PHY.
>> - phy-handle : phandle to the PHY device connected to this device.
>> - fixed-link : Assume a fixed link. See fixed-link.txt in the same directory.
>> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
>> index 56a563f90b0b..00a7fd0bcd59 100644
>> --- a/drivers/net/ethernet/freescale/fec_main.c
>> +++ b/drivers/net/ethernet/freescale/fec_main.c
>> @@ -3192,7 +3192,7 @@ static int fec_reset_phy(struct platform_device *pdev)
>> {
>> int err, phy_reset;
>> bool active_high = false;
>> - int msec = 1;
>> + int msec = 1, phy_post_delay = 0;
>> struct device_node *np = pdev->dev.of_node;
>>
>> if (!np)
>> @@ -3210,7 +3210,6 @@ static int fec_reset_phy(struct platform_device *pdev)
>> return 0;
>>
>> active_high = of_property_read_bool(np, "phy-reset-active-high");
>> -
>> err = devm_gpio_request_one(&pdev->dev, phy_reset,
>> active_high ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW,
>> "phy-reset");
>
> No white space changes please.
>
> Andrew
>
--
Quentin Schulz, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] kernel: bpf: remove dead code
From: Gustavo A. R. Silva @ 2017-05-22 14:07 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann
Cc: netdev, linux-kernel, Gustavo A. R. Silva
Execution cannot reach NET_IP_ALIGN inside the following statement:
ip_align = strict ? 2 : NET_IP_ALIGN
Addresses-Coverity-ID: 1409762
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
NOTE: variable ip_align could also be removed and use value 2 directly.
kernel/bpf/verifier.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 1eddb71..94f6e46 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -812,7 +812,7 @@ static int check_pkt_ptr_alignment(const struct bpf_reg_state *reg,
* we force this to 2 which is universally what architectures use
* when they don't set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS.
*/
- ip_align = strict ? 2 : NET_IP_ALIGN;
+ ip_align = 2;
if ((ip_align + reg_off + off) % size != 0) {
verbose("misaligned packet access off %d+%d+%d size %d\n",
ip_align, reg_off, off, size);
--
2.5.0
^ permalink raw reply related
* Re: [PATCH 2/2] vhost/scsi: Delete error messages for failed memory allocations in five functions
From: Stefan Hajnoczi @ 2017-05-22 14:08 UTC (permalink / raw)
To: Dan Carpenter
Cc: kvm, Michael S. Tsirkin, netdev, Wolfram Sang, kernel-janitors,
LKML, virtualization, SF Markus Elfring
In-Reply-To: <20170522123833.asx2biaw4xaz4qpv@mwanda>
[-- Attachment #1.1: Type: text/plain, Size: 433 bytes --]
On Mon, May 22, 2017 at 03:38:33PM +0300, Dan Carpenter wrote:
> On Mon, May 22, 2017 at 12:23:20PM +0100, Stefan Hajnoczi wrote:
> > I'm not sure if kmalloc() and friends guarantee to show
> > a message (not just the first time, but for every failed allocation)?
> >
>
> It prints multiple times, but it's ratelimited. It can also be disabled
> using a config option.
>
> See slab_out_of_memory().
Thanks!
Stefan
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply
* Re: vhost/scsi: Delete error messages for failed memory allocations in five functions
From: Stefan Hajnoczi @ 2017-05-22 14:09 UTC (permalink / raw)
To: SF Markus Elfring
Cc: kvm, netdev, virtualization, kernel-janitors, Jason Wang,
Michael S. Tsirkin, LKML, Wolfram Sang
In-Reply-To: <e6658e56-a2b0-4ecc-0a95-0ba193ff2c97@users.sourceforge.net>
[-- Attachment #1: Type: text/plain, Size: 861 bytes --]
On Mon, May 22, 2017 at 01:34:34PM +0200, SF Markus Elfring wrote:
> >> Do you find information from a Linux allocation failure report sufficient
> >> for any function implementations here?
> >
> > If kmalloc() and friends guarantee to print a warning and backtrace on
> > every allocation failure, then there's no need for error messages in
> > callers.
> >
> > That seems like good justification that can go in the commit
> > description, but I'm not sure if kmalloc() and friends guarantee to show
> > a message (not just the first time, but for every failed allocation)?
>
> I am also looking for a more complete and easier accessible documentation
> for this aspect of the desired exception handling.
> How would we like to resolve any remaining open issues there?
No objection from me but please make sure to keep vq_err().
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply
* [PATCH 0/3] RDS: Adjustments for two function implementations
From: SF Markus Elfring @ 2017-05-22 14:10 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
rds-devel-N0ozoZBvEnrZJqsBc5GL+g, David S. Miller,
Santosh Shilimkar, Sowmini Varadhan
Cc: LKML, kernel-janitors-u79uwXL29TY76Z2rM5mHXA
From: Markus Elfring <elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Date: Mon, 22 May 2017 16:02:03 +0200
Three update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Delete an error message for a failed memory allocation in rds_ib_add_one()
Improve a size determination in rds_ib_add_one()
Delete an error message for a failed memory allocation in rds_tcp_init_net()
net/rds/ib.c | 7 ++-----
net/rds/tcp.c | 5 ++---
2 files changed, 4 insertions(+), 8 deletions(-)
--
2.13.0
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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 1/3] RDS: IB: Delete an error message for a failed memory allocation in rds_ib_add_one()
From: SF Markus Elfring @ 2017-05-22 14:11 UTC (permalink / raw)
To: linux-rdma, netdev, rds-devel, David S. Miller, Santosh Shilimkar,
Sowmini Varadhan
Cc: LKML, kernel-janitors
In-Reply-To: <44b46c51-3665-5f14-dd3b-6e6f230258a7@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 May 2017 15:34:28 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
net/rds/ib.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/net/rds/ib.c b/net/rds/ib.c
index 7a64c8db81ab..c5514d058171 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -166,8 +166,5 @@ static void rds_ib_add_one(struct ib_device *device)
- if (!rds_ibdev->vector_load) {
- pr_err("RDS/IB: %s failed to allocate vector memory\n",
- __func__);
+ if (!rds_ibdev->vector_load)
goto put_dev;
- }
rds_ibdev->dev = device;
rds_ibdev->pd = ib_alloc_pd(device, 0);
--
2.13.0
^ permalink raw reply related
* [PATCH 2/3] RDS: IB: Improve a size determination in rds_ib_add_one()
From: SF Markus Elfring @ 2017-05-22 14:12 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
rds-devel-N0ozoZBvEnrZJqsBc5GL+g, David S. Miller,
Santosh Shilimkar, Sowmini Varadhan
Cc: LKML, kernel-janitors-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <44b46c51-3665-5f14-dd3b-6e6f230258a7-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
From: Markus Elfring <elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Date: Mon, 22 May 2017 15:40:21 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
---
net/rds/ib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rds/ib.c b/net/rds/ib.c
index c5514d058171..ed37bf011704 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -131,7 +131,7 @@ static void rds_ib_add_one(struct ib_device *device)
if (device->node_type != RDMA_NODE_IB_CA)
return;
- rds_ibdev = kzalloc_node(sizeof(struct rds_ib_device), GFP_KERNEL,
+ rds_ibdev = kzalloc_node(sizeof(*rds_ibdev), GFP_KERNEL,
ibdev_to_node(device));
if (!rds_ibdev)
return;
--
2.13.0
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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 related
* [PATCH 3/3] RDS: TCP: Delete an error message for a failed memory allocation in rds_tcp_init_net()
From: SF Markus Elfring @ 2017-05-22 14:13 UTC (permalink / raw)
To: linux-rdma, netdev, rds-devel, David S. Miller, Santosh Shilimkar,
Sowmini Varadhan
Cc: LKML, kernel-janitors
In-Reply-To: <44b46c51-3665-5f14-dd3b-6e6f230258a7@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 May 2017 15:45:31 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
net/rds/tcp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index 431404dbdad1..b0348697dee5 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -431,10 +431,9 @@ static __net_init int rds_tcp_init_net(struct net *net)
} else {
tbl = kmemdup(rds_tcp_sysctl_table,
sizeof(rds_tcp_sysctl_table), GFP_KERNEL);
- if (!tbl) {
- pr_warn("could not set allocate syctl table\n");
+ if (!tbl)
return -ENOMEM;
- }
+
rtn->ctl_table = tbl;
}
tbl[RDS_TCP_SNDBUF].data = &rtn->sndbuf_size;
--
2.13.0
^ permalink raw reply related
* Re: [PATCH] vhost: Coalesce vq_err formats, pr_fmt misuse, add missing newlines
From: Stefan Hajnoczi @ 2017-05-22 14:16 UTC (permalink / raw)
To: Joe Perches
Cc: Michael S. Tsirkin, Jason Wang, kvm, virtualization, netdev,
linux-kernel
In-Reply-To: <0e8f84aec009831d34ccb2b4ed27364e78b07e02.1495449147.git.joe@perches.com>
[-- Attachment #1: Type: text/plain, Size: 824 bytes --]
On Mon, May 22, 2017 at 03:33:43AM -0700, Joe Perches wrote:
> vhost logging uses of vq_err has a few defects and style inconsistencies.
>
> o pr_debug already uses pr_fmt so its use in vq_err is defective
> however no #defines of pr_fmt exist in this code so no actual
> defects exist
> o vq_err uses need terminating newlines so add the missing ones
> o Coalesce formats and realign arguments
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/vhost/net.c | 17 ++++++-------
> drivers/vhost/scsi.c | 17 ++++++-------
> drivers/vhost/test.c | 4 +--
> drivers/vhost/vhost.c | 70 +++++++++++++++++++++++----------------------------
> drivers/vhost/vhost.h | 11 ++++----
> 5 files changed, 54 insertions(+), 65 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply
* Re: linux-next: build failure after merge of the net-next tree
From: David Miller @ 2017-05-22 14:17 UTC (permalink / raw)
To: sfr; +Cc: netdev, linux-next, linux-kernel, mlichvar, willemb
In-Reply-To: <20170522134300.0bfd175a@canb.auug.org.au>
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 22 May 2017 13:43:00 +1000
> Hi Dave,
>
> On Sun, 21 May 2017 23:14:10 -0400 (EDT) David Miller <davem@davemloft.net> wrote:
>>
>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>> Date: Mon, 22 May 2017 11:16:05 +1000
>>
>> > After merging the net-next tree, today's linux-next build (powerpc
>> > ppc64_defconfig) failed like this:
>> >
>> > net/socket.c: In function 'put_ts_pktinfo':
>> > net/socket.c:695:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
>> > put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMPING_PKTINFO,
>> > ^
>> > Caused by commit
>> >
>> > aad9c8c470f2 ("net: add new control message for incoming HW-timestamped packets")
>> >
>> > This probably broke every architecture that has its own
>> > arch/<arch>/include/uapi/asm/socket.h that does not include
>> > include/uapi/asm-generic/socket.h :-(
>> >
>> > I have used the net-next tree from next-20170519 for today.
>>
>> I've just pushed the following, thanks for the report:
>
> Looks good except:
>
>> diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h
>> index 5147018..784b871 100644
>> --- a/arch/parisc/include/uapi/asm/socket.h
>> +++ b/arch/parisc/include/uapi/asm/socket.h
>> @@ -97,4 +97,6 @@
>>
>> #define SO_COOKIE 0x4032
>>
>> +#define SCM_TIMESTAMPING_PKTINFO 58
>
> Does this need to be 0x4033 (or something)?
Good catch, I'll fix this up!
^ permalink raw reply
* Re: vhost/scsi: Delete error messages for failed memory allocations in five functions
From: SF Markus Elfring @ 2017-05-22 14:21 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: kvm, Michael S. Tsirkin, netdev, kernel-janitors, LKML,
virtualization
In-Reply-To: <20170522140935.GB1021@stefanha-x1.localdomain>
> No objection from me but please make sure to keep vq_err().
How long should I wait before I may dare to send another variant for the
discussed update suggestion?
Which commit message would be acceptable then for this update step?
Regards,
Markus
^ permalink raw reply
* network performance degradation in virtio_net in 4.12-rc
From: Mikulas Patocka @ 2017-05-22 14:25 UTC (permalink / raw)
To: Michael S. Tsirkin, Jason Wang; +Cc: kvm, virtualization, netdev
Hi
I see severe network performance degradation with the kernels 4.12-rc1 and
4.12-rc2 in the network virtio driver. Download rate drops down to about
100kB/s.
I bisected it and it is caused by patch
d85b758f72b05a774045545f24d70980e3e9aac4 ("virtio_net: fix support for
small rings"). When I revert this patch, the problem goes away.
The host is Debian Jessie with kernel 4.4.62, the guest is Debian Sid with
kernel 4.12-rc.
Mikulas
^ permalink raw reply
* Re: [PATCH 3/3] RDS: TCP: Delete an error message for a failed memory allocation in rds_tcp_init_net()
From: Sowmini Varadhan @ 2017-05-22 14:26 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
rds-devel-N0ozoZBvEnrZJqsBc5GL+g, David S. Miller,
Santosh Shilimkar, LKML, kernel-janitors-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <5d523cf8-1540-e704-2301-a5e0205cb536-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
On (05/22/17 16:13), SF Markus Elfring wrote:
>
> Omit an extra message for a memory allocation failure in this function.
The change itself is harmless, but I'm curious about the "extra"
part: "extra" from what? If this happens, hopefully this will be logged
somewhere? Note that this type of (infrequent) logging noise is useful
in some cases, e.g., with 8ce675ff, when one is trying to do the
post-mortem of where things first went wrong.
--Sowmini
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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
* Re: [PATCHv4] wlcore: add wl1285 compatible
From: David Miller @ 2017-05-22 14:30 UTC (permalink / raw)
To: kvalo-sgV2jX0FEOL9JmXXK+q4OQ
Cc: sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ,
sre-DgEjT+Ai2ygdnm+yROfE0A, tony-4v6yS6AI5VpBDgjK7y7TUQ,
marcel-kz+m5ild9QBg9hUCZPvPmw, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <8737bx5jgr.fsf-5ukZ45wKbUHoml4zekdYB16hYfS7NtTn@public.gmane.org>
From: Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Date: Mon, 22 May 2017 12:28:20 +0300
> Sebastian Reichel <sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org> writes:
>
>> Motorola Droid 4 uses a WL1285C. With differences between the
>> chips not being public let's add explicit binding for wl1285
>> instead of relying on wl1283 being very similar.
>>
>> Reviewed-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>> Acked-by: Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
>> Acked-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
>> Signed-off-by: Sebastian Reichel <sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
>> ---
>> Hi Dave,
>>
>> I previously send this in two patches, but its hard to apply without
>> requiring multiple kernel releases (the driver must be updated before
>> the DTS change). Since the actual change is not very complex Marcel
>> Holtmann & Tony Lindgren suggested, that I send this directly to you
>> in a single patch for inclusion into 4.12. This also means, that the
>> remaining series can be queued normally for 4.13.
>
> I noticed that Dave set this patch to Awaiting Upstream state on his
> patchwork:
>
> https://patchwork.ozlabs.org/patch/759042/
>
> Which makes me suspect that he is waiting me to apply this (as I
> normally apply wlcore patches). Dave, should I actually take this patch?
> What do you prefer?
Anything that touches wireless drivers I defer to you, yes.
^ permalink raw reply
* Re: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477
From: Andrew Lunn @ 2017-05-22 14:31 UTC (permalink / raw)
To: Woojung.Huh
Cc: f.fainelli, vivien.didelot, sergei.shtylyov, netdev, davem,
UNGLinuxDriver
In-Reply-To: <9235D6609DB808459E95D78E17F2E43D40A7C023@CHN-SV-EXMX02.mchp-main.com>
On Fri, May 19, 2017 at 10:57:12PM +0000, Woojung.Huh@microchip.com wrote:
> +static struct {
> + int index;
> + char string[ETH_GSTRING_LEN];
Hi Woojung
Since you need to respin for the skb_put_padto(), please make this
const.
> +static int get_vlan_table(struct dsa_switch *ds, u16 vid, u32 *vlan_table)
> +{
> + struct ksz_device *dev = ds->priv;
> + u8 data;
> + int timeout = 1000;
> +
> + ksz_write16(dev, REG_SW_VLAN_ENTRY_INDEX__2, vid & VLAN_INDEX_M);
> + ksz_write8(dev, REG_SW_VLAN_CTRL, VLAN_READ | VLAN_START);
> +
> + /* wait to be cleared */
> + data = 0;
> + do {
> + ksz_read8(dev, REG_SW_VLAN_CTRL, &data);
> + if (!(data & VLAN_START))
> + break;
> + usleep_range(1, 10);
> + } while (timeout-- > 0);
> +
> + if (!timeout)
> + return -ETIMEDOUT;
> +
> + ksz_read32(dev, REG_SW_VLAN_ENTRY__4, &vlan_table[0]);
> + ksz_read32(dev, REG_SW_VLAN_ENTRY_UNTAG__4, &vlan_table[1]);
> + ksz_read32(dev, REG_SW_VLAN_ENTRY_PORTS__4, &vlan_table[2]);
> +
> + ksz_write8(dev, REG_SW_VLAN_CTRL, 0);
> +
> + return 0;
> +}
> +
> +static int set_vlan_table(struct dsa_switch *ds, u16 vid, u32 *vlan_table)
> +{
> + struct ksz_device *dev = ds->priv;
> + u8 data;
> + int timeout = 1000;
> +
> + ksz_write32(dev, REG_SW_VLAN_ENTRY__4, vlan_table[0]);
> + ksz_write32(dev, REG_SW_VLAN_ENTRY_UNTAG__4, vlan_table[1]);
> + ksz_write32(dev, REG_SW_VLAN_ENTRY_PORTS__4, vlan_table[2]);
> +
> + ksz_write16(dev, REG_SW_VLAN_ENTRY_INDEX__2, vid & VLAN_INDEX_M);
> + ksz_write8(dev, REG_SW_VLAN_CTRL, VLAN_START | VLAN_WRITE);
> +
> + do {
> + ksz_read8(dev, REG_SW_VLAN_CTRL, &data);
> + if (!(data & VLAN_START))
> + break;
> + usleep_range(1, 10);
> + } while (timeout-- > 0);
> +
> + if (!timeout)
> + return -ETIMEDOUT;
> +
> + ksz_write8(dev, REG_SW_VLAN_CTRL, 0);
> +
> + mutex_lock(&dev->vlancache_mutex);
Humm. I think this is wrong. Shouldn't you hold the mutex while you
change the hardware as well as the cache. Otherwise there is a risk
your cache could be different to the hardware when you get a race
between two threads?
> +
> + /* update vlan cache table */
> + dev->vlan_cache[vid].table[0] = vlan_table[0];
> + dev->vlan_cache[vid].table[1] = vlan_table[1];
> + dev->vlan_cache[vid].table[2] = vlan_table[2];
> +
> + mutex_unlock(&dev->vlancache_mutex);
> +
> + return 0;
> +}
Andrew
^ permalink raw reply
* Re: [PATCH v3 net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support
From: Andrew Lunn @ 2017-05-22 14:32 UTC (permalink / raw)
To: Woojung.Huh
Cc: f.fainelli, vivien.didelot, sergei.shtylyov, netdev, davem,
UNGLinuxDriver
In-Reply-To: <9235D6609DB808459E95D78E17F2E43D40A7C02D@CHN-SV-EXMX02.mchp-main.com>
On Fri, May 19, 2017 at 10:57:15PM +0000, Woojung.Huh@microchip.com wrote:
> From: Woojung Huh <Woojung.Huh@microchip.com>
>
> Adding Microchip 9477 Phy included in KSZ9477 Switch.
>
> Signed-off-by: Woojung Huh <Woojung.Huh@microchip.com>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by? I didn't contribute any code. It probably should be
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: RDS: TCP: Delete an error message for a failed memory allocation in rds_tcp_init_net()
From: SF Markus Elfring @ 2017-05-22 14:32 UTC (permalink / raw)
To: Sowmini Varadhan, linux-rdma, netdev, rds-devel, kernel-janitors
Cc: David S. Miller, Santosh Shilimkar, LKML
In-Reply-To: <20170522142651.GA29434@oracle.com>
>> Omit an extra message for a memory allocation failure in this function.
>
> The change itself is harmless, but I'm curious about the "extra"
> part: "extra" from what? If this happens, hopefully this will be logged
> somewhere? Note that this type of (infrequent) logging noise is useful
> in some cases, e.g., with 8ce675ff, when one is trying to do the
> post-mortem of where things first went wrong.
Do you find information from a Linux allocation failure report sufficient
for such an use case?
Regards,
Markus
^ permalink raw reply
* Re: [PATCH] kernel: bpf: remove dead code
From: David Miller @ 2017-05-22 14:38 UTC (permalink / raw)
To: garsilva; +Cc: ast, daniel, netdev, linux-kernel
In-Reply-To: <20170522140746.GA10113@embeddedgus>
From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date: Mon, 22 May 2017 09:07:46 -0500
> Execution cannot reach NET_IP_ALIGN inside the following statement:
> ip_align = strict ? 2 : NET_IP_ALIGN
>
> Addresses-Coverity-ID: 1409762
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
> NOTE: variable ip_align could also be removed and use value 2 directly.
Incorrect.
Some platforms define NET_IP_ALIGN to zero, so the code must remain
as is.
^ 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