Netdev List
 help / color / mirror / Atom feed
* [PATCH 1/5] netfilter: nft_set_hash: skip fixed hash if timeout is specified
From: Pablo Neira Ayuso @ 2018-03-12 16:16 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <20180312161604.3060-1-pablo@netfilter.org>

Fixed hash supports to timeouts, so skip it. Otherwise, userspace hits
EOPNOTSUPP.

Fixes: 6c03ae210ce3 ("netfilter: nft_set_hash: add non-resizable hashtable implementation")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/nft_set_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/nft_set_hash.c b/net/netfilter/nft_set_hash.c
index 3f1624ee056f..d40591fe1b2f 100644
--- a/net/netfilter/nft_set_hash.c
+++ b/net/netfilter/nft_set_hash.c
@@ -674,7 +674,7 @@ static const struct nft_set_ops *
 nft_hash_select_ops(const struct nft_ctx *ctx, const struct nft_set_desc *desc,
 		    u32 flags)
 {
-	if (desc->size) {
+	if (desc->size && !(flags & NFT_SET_TIMEOUT)) {
 		switch (desc->klen) {
 		case 4:
 			return &nft_hash_fast_ops;
-- 
2.11.0

^ permalink raw reply related

* [PATCH 0/5] Netfilter fixes for net
From: Pablo Neira Ayuso @ 2018-03-12 16:15 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev

Hi David,

The following patchset contains Netfilter fixes for your net tree, they are:

1) Fixed hashtable representation doesn't support timeout flag, skip it
   otherwise rules to add elements from the packet fail bogusly fail with
   EOPNOTSUPP.

2) Fix bogus error with 32-bits ebtables userspace and 64-bits kernel,
   patch from Florian Westphal.

3) Sanitize proc names in several x_tables extensions, also from Florian.

4) Add sanitization to ebt_among wormhash logic, from Florian.

5) Missing release of hook array in flowtable.


You can pull these changes from:

  git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git

Thanks!

----------------------------------------------------------------

The following changes since commit ce380619fab99036f5e745c7a865b21c59f005f6:

  Merge tag 'please-pull-ia64_misc' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux (2018-03-05 20:31:14 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git HEAD

for you to fetch changes up to c04a3f730021c304c7cc4bc30ee57ee70ad98d57:

  netfilter: nf_tables: release flowtable hooks (2018-03-11 21:24:56 +0100)

----------------------------------------------------------------
Florian Westphal (3):
      netfilter: ebtables: fix erroneous reject of last rule
      netfilter: x_tables: add and use xt_check_proc_name
      netfilter: bridge: ebt_among: add more missing match size checks

Pablo Neira Ayuso (2):
      netfilter: nft_set_hash: skip fixed hash if timeout is specified
      netfilter: nf_tables: release flowtable hooks

 include/linux/netfilter/x_tables.h |  2 ++
 net/bridge/netfilter/ebt_among.c   | 34 ++++++++++++++++++++++++++++++++++
 net/bridge/netfilter/ebtables.c    |  6 +++++-
 net/netfilter/nf_tables_api.c      |  1 +
 net/netfilter/nft_set_hash.c       |  2 +-
 net/netfilter/x_tables.c           | 30 ++++++++++++++++++++++++++++++
 net/netfilter/xt_hashlimit.c       | 16 ++++++++++------
 net/netfilter/xt_recent.c          |  6 +++---
 8 files changed, 86 insertions(+), 11 deletions(-)

^ permalink raw reply

* Re: [PATCH net] ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu
From: Sabrina Dubroca @ 2018-03-12 16:05 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, sbrivio
In-Reply-To: <20180309.160619.741646019216536916.davem@davemloft.net>

2018-03-09, 16:06:19 -0500, David Miller wrote:
> From: Sabrina Dubroca <sd@queasysnail.net>
> Date: Fri,  9 Mar 2018 17:43:21 +0100
> 
> > diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
> > index f80524396c06..77d0a78cf7d2 100644
> > --- a/include/net/ip_fib.h
> > +++ b/include/net/ip_fib.h
> > @@ -59,6 +59,7 @@ struct fib_nh_exception {
> >  	int				fnhe_genid;
> >  	__be32				fnhe_daddr;
> >  	u32				fnhe_pmtu;
> > +	bool				fnhe_mtu_locked;
> >  	__be32				fnhe_gw;
> >  	unsigned long			fnhe_expires;
> >  	struct rtable __rcu		*fnhe_rth_input;
> > diff --git a/include/net/route.h b/include/net/route.h
> > index 1eb9ce470e25..729bb5e61e9a 100644
> > --- a/include/net/route.h
> > +++ b/include/net/route.h
> > @@ -64,6 +64,7 @@ struct rtable {
> >  
> >  	/* Miscellaneous cached information */
> >  	u32			rt_pmtu;
> > +	bool			rt_mtu_locked;
> >  
> >  	u32			rt_table_id;
> >  
> 
> Please use a flag bit for this, we've worked hard to shrink these
> datastructures as much as possible.

Oops, sorry.

> I think if you just choose an unused RTCF_* bit (f.e. 0x02000000) for
> the state, you can use that because values propagate into the
> rtable->rt_flags, and do not propagate out.  So you should be able to
> use it in this way privately inside the kernel.

What about a bitfield?

-	u32			rt_pmtu;
+	u32			rt_mtu_locked:1,
+				rt_pmtu:31;

Since it's going to be private to the kernel, I'd rather not use a
value that's in uapi, especially considering that they're almost all
used (unless we start recycling).

-- 
Sabrina

^ permalink raw reply

* Re: [pci PATCH v4 1/4] pci-iov: Add support for unmanaged SR-IOV
From: Alexander Duyck @ 2018-03-12 16:01 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Alex Williamson, Bjorn Helgaas, Duyck, Alexander H, linux-pci,
	virtio-dev, kvm, Netdev, Daly, Dan, LKML, linux-nvme, keith.busch,
	netanel, Maximilian Heyne, Wang, Liang-min, Rustad, Mark D,
	David Woodhouse, dwmw
In-Reply-To: <20180312075907.GA5342@lst.de>

On Mon, Mar 12, 2018 at 12:59 AM, Christoph Hellwig <hch@lst.de> wrote:
> On Sun, Mar 11, 2018 at 09:59:09PM -0600, Alex Williamson wrote:
>> I still struggle to understand why we need this "unmanaged"
>> complication and how a user of the sysfs API is expected to have any
>> idea whether a PF is managed or unmanaged and why they should care.
>> Can't we just have a pci_simple_sriov_configure() helper and ignore
>> this unmanaged business?  Thanks,
>
> Just a pci_simple_sriov_configure is exactly what I envisioned originally.

I can drop the "unmanaged" bits if that is what is wanted, but based
on previous conversations I thought there was some concern about the
kernel loading VFs when there was some foreign entity managing the VFs
other than the kernel.

Thanks.

- Alex

^ permalink raw reply

* Re: [PATCH net-next] sctp: fix error return code in sctp_sendmsg_new_asoc()
From: Marcelo Ricardo Leitner @ 2018-03-12 15:50 UTC (permalink / raw)
  To: Xin Long
  Cc: Wei Yongjun, Vlad Yasevich, Neil Horman, linux-sctp, network dev,
	kernel-janitors
In-Reply-To: <CADvbK_fFdFJ4uREOP2bAYShB_TkP5Xi3d0v1_YodazNYyMjAdw@mail.gmail.com>

On Mon, Mar 12, 2018 at 09:38:53PM +0800, Xin Long wrote:
> On Mon, Mar 12, 2018 at 8:16 PM, Wei Yongjun <weiyongjun1@huawei.com> wrote:
...
> Btw, the 'err' initialization can also be removed in your patch.
 
I second this.

^ permalink raw reply

* Re: [PATCH net-next] sctp: fix error return code in sctp_sendmsg_new_asoc()
From: Neil Horman @ 2018-03-12 15:40 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Vlad Yasevich, Xin Long, linux-sctp, netdev, kernel-janitors
In-Reply-To: <1520856964-132516-1-git-send-email-weiyongjun1@huawei.com>

On Mon, Mar 12, 2018 at 12:16:04PM +0000, Wei Yongjun wrote:
> Return error code -EINVAL in the address len check error handling
> case since 'err' can be overwrite to 0 by 'err = sctp_verify_addr()'
> in the for loop.
> 
> Fixes: 2c0dbaa0c43d ("sctp: add support for SCTP_DSTADDRV4/6 Information for sendmsg")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  net/sctp/socket.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index 7d3476a..5e7bfc2 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -1761,16 +1761,20 @@ static int sctp_sendmsg_new_asoc(struct sock *sk, __u16 sflags,
>  		memset(daddr, 0, sizeof(*daddr));
>  		dlen = cmsg->cmsg_len - sizeof(struct cmsghdr);
>  		if (cmsg->cmsg_type == SCTP_DSTADDRV4) {
> -			if (dlen < sizeof(struct in_addr))
> +			if (dlen < sizeof(struct in_addr)) {
> +				err = -EINVAL;
>  				goto free;
> +			}
>  
>  			dlen = sizeof(struct in_addr);
>  			daddr->v4.sin_family = AF_INET;
>  			daddr->v4.sin_port = htons(asoc->peer.port);
>  			memcpy(&daddr->v4.sin_addr, CMSG_DATA(cmsg), dlen);
>  		} else {
> -			if (dlen < sizeof(struct in6_addr))
> +			if (dlen < sizeof(struct in6_addr)) {
> +				err = -EINVAL;
>  				goto free;
> +			}
>  
>  			dlen = sizeof(struct in6_addr);
>  			daddr->v6.sin6_family = AF_INET6;
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply

* Re: [PATCH 3/4 net-next] ibmvnic: Pad small packets to minimum MTU size
From: Thomas Falcon @ 2018-03-12 15:24 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, nfont, jallen
In-Reply-To: <20180311.225616.1559105614501920898.davem@davemloft.net>

On 03/11/2018 09:56 PM, David Miller wrote:
> From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
> Date: Fri,  9 Mar 2018 13:23:56 -0600
>
>> +	/* For some backing devices, mishandling of small packets
>> +	 * can result in a loss of connection or TX stall. Device
>> +	 * architects recommend that no packet should be smaller
>> +	 * than the minimum MTU value provided to the driver, so
>> +	 * pad any packets to that length
>> +	 */
>> +	if (skb->len < netdev->min_mtu) {
>> +		return skb_put_padto(skb, netdev->min_mtu);
>> +	}
> Please do not use curly braces for a single statement
> basic block.
>
> Thank you.
>
Oops, sorry about that. I'll fix that and resend.

Thanks.

^ permalink raw reply

* Re: [BUGFIX PATCH bpf-next] error-injection: Fix to prohibit jump optimization
From: Daniel Borkmann @ 2018-03-12 15:21 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: Alexei Starovoitov, Josef Bacik, rostedt, mingo, davem, netdev,
	linux-kernel, ast, kernel-team, linux-btrfs, darrick.wong,
	Josef Bacik, Akinobu Mita
In-Reply-To: <20180312230625.cea180f66d44dc1ea4930fa7@kernel.org>

On 03/12/2018 03:06 PM, Masami Hiramatsu wrote:
> On Mon, 12 Mar 2018 11:44:21 +0100
> Daniel Borkmann <daniel@iogearbox.net> wrote:
>> On 03/12/2018 11:27 AM, Masami Hiramatsu wrote:
>>> On Mon, 12 Mar 2018 19:00:49 +0900
>>> Masami Hiramatsu <mhiramat@kernel.org> wrote:
>>>
>>>> Since the kprobe which was optimized by jump can not change
>>>> the execution path, the kprobe for error-injection must not
>>>> be optimized. To prohibit it, set a dummy post-handler as
>>>> officially stated in Documentation/kprobes.txt.
>>>
>>> Note that trace-probe based BPF is not affected, because it
>>> ensures the trace-probe is based on ftrace, which is not
>>> jump optimized.
>>
>> Thanks for the fix! I presume this should go via bpf instead of bpf-next
>> tree since 4b1a29a7f542 ("error-injection: Support fault injection framework")
>> is in Linus' tree as well. Unless there are objection I would rather route
>> it that way so it would be for 4.16.
> 
> Ah, right! It should go into 4.16. It should be applicable cleanly either tree
> since there is only the above commit on kernel/fail_function.c :)

Applied to bpf tree, thanks Masami!

^ permalink raw reply

* Re: [PATCH net-next] sctp: fix error return code in sctp_sendmsg_new_asoc()
From: David Miller @ 2018-03-12 15:19 UTC (permalink / raw)
  To: weiyongjun1
  Cc: vyasevich, nhorman, lucien.xin, linux-sctp, netdev,
	kernel-janitors
In-Reply-To: <1520856964-132516-1-git-send-email-weiyongjun1@huawei.com>

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Mon, 12 Mar 2018 12:16:04 +0000

> Return error code -EINVAL in the address len check error handling
> case since 'err' can be overwrite to 0 by 'err = sctp_verify_addr()'
> in the for loop.
> 
> Fixes: 2c0dbaa0c43d ("sctp: add support for SCTP_DSTADDRV4/6 Information for sendmsg")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Xin, I do not want to have a bug fix like this blocked because of that
SCTP options merge nightmare which is of no fault of our own.

^ permalink raw reply

* Re: pull-request: can 2018-03-12
From: David Miller @ 2018-03-12 15:17 UTC (permalink / raw)
  To: mkl; +Cc: netdev, linux-can, kernel
In-Reply-To: <20180312100410.10404-1-mkl@pengutronix.de>

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Mon, 12 Mar 2018 11:04:04 +0100

> this is a pull reqeust of 6 patches for net/master.
> 
> The first patch is by Wolfram Sang and fixes a bitshift vs. comparison mistake
> in the m_can driver. Two patches of Marek Vasut repair the error handling in
> the ifi driver. The two patches by Stephane Grosjean fix a "echo_skb is
> occupied!" bug in the peak/pcie_fd driver. Bich HEMON's patch adds pinctrl
> select state calls to the m_can's driver to further improve power saving during
> suspend.

Pulled, thank you.

^ permalink raw reply

* RE: [PATCH v2 iproute2-next 0/6] cm_id, cq, mr, and pd resource tracking
From: Steve Wise @ 2018-03-12 15:16 UTC (permalink / raw)
  To: dsahern; +Cc: leon, stephen, netdev, linux-rdma
In-Reply-To: <cover.1520020530.git.swise@opengridcomputing.com>

Hey all,

The kernel side of this series has been merged for rdma-next [1].  Let me
know if this iproute2 series can be merged, of if it needs more changes.

Thanks,

Steve.

[1] https://www.spinics.net/lists/linux-rdma/msg61720.html



> -----Original Message-----
> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> owner@vger.kernel.org] On Behalf Of Steve Wise
> Sent: Friday, March 02, 2018 1:56 PM
> To: dsahern@gmail.com
> Cc: leon@kernel.org; stephen@networkplumber.org; netdev@vger.kernel.org;
> linux-rdma@vger.kernel.org
> Subject: [PATCH v2 iproute2-next 0/6] cm_id, cq, mr, and pd resource
tracking
> 
> Hello,
> 
> This series enhances the iproute2 rdma tool to include dumping of
> connection manager id (cm_id), completion queue (cq), memory region (mr),
> and protection domain (pd) rdma resources.  It is the user-space part of
> the resource tracking series under review now on the linux-rdma list [1].
> 
> Changes since v1/RFC:
> - removed RFC tag
> - initialize rd properly to avoid passing a garbage port number
> - revert accidental change to qp_valid_filters
> - removed cm_id dev/network/transport types
> - cm_id ip addrs now passed up as __kernel_sockaddr_storage
> - cm_id ip address ports printed as "address:port" strings
> - only parse/display memory keys and iova if available
> - filter on "users" for cqs and pds
> - fixed memory leaks
> - removed PD_FLAGS attribute
> - filter on "mrlen" for mrs
> - filter on "poll-ctx" for cqs
> - don't require addrs or qp_type for parsing cm_ids
> - only filter optional attrs if they are present
> - remove PGSIZE MR attr to match kernel
> 
> [1] https://www.spinics.net/lists/linux-rdma/msg61400.html
> 
> Thanks,
> 
> Steve.
> ---
> 
> Steve Wise (6):
>   rdma: update rdma_netlink.h
>   rdma: initialize the rd struct
>   rdma: Add CM_ID resource tracking information
>   rdma: Add CQ resource tracking information
>   rdma: Add MR resource tracking information
>   rdma: Add PD resource tracking information
> 
>  include/json_writer.h            |   2 +
>  include/uapi/rdma/rdma_netlink.h |  44 ++-
>  lib/json_writer.c                |  11 +
>  rdma/rdma.c                      |   2 +-
>  rdma/rdma.h                      |   2 +
>  rdma/res.c                       | 611
++++++++++++++++++++++++++++++++++++++-
>  rdma/utils.c                     |  16 +
>  7 files changed, 683 insertions(+), 5 deletions(-)
> 
> --
> 1.8.3.1
> 
> --
> 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-next] net: Make RX-FCS and HW GRO mutually exclusive
From: David Miller @ 2018-03-12 15:15 UTC (permalink / raw)
  To: galp; +Cc: netdev
In-Reply-To: <1520848129-10572-1-git-send-email-galp@mellanox.com>

From: Gal Pressman <galp@mellanox.com>
Date: Mon, 12 Mar 2018 11:48:49 +0200

> Same as LRO, hardware GRO cannot be enabled with RX-FCS.
> When both are requested, hardware GRO will be dropped.
> 
> Suggested-by: David Miller <davem@davemloft.net>
> Signed-off-by: Gal Pressman <galp@mellanox.com>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH] net: llc: drop VLA in llc_sap_mcast()
From: David Miller @ 2018-03-12 15:14 UTC (permalink / raw)
  To: s.mesoraca16
  Cc: linux-kernel, kernel-hardening, netdev, paulmck, rientjes,
	elena.reshetova, ishkamiel, keescook
In-Reply-To: <1520802724-17509-1-git-send-email-s.mesoraca16@gmail.com>

From: Salvatore Mesoraca <s.mesoraca16@gmail.com>
Date: Sun, 11 Mar 2018 22:12:04 +0100

> Avoid a VLA[1] by using a real constant expression instead of a variable.
> The compiler should be able to optimize the original code and avoid using
> an actual VLA. Anyway this change is useful because it will avoid a false
> positive with -Wvla, it might also help the compiler generating better
> code.
> 
> [1] https://lkml.org/lkml/2018/3/7/621
> 
> Signed-off-by: Salvatore Mesoraca <s.mesoraca16@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH][next] lan743x: make functions lan743x_csr_read and lan743x_csr_read static
From: David Miller @ 2018-03-12 15:13 UTC (permalink / raw)
  To: colin.king
  Cc: bryan.whitehead, UNGLinuxDriver, netdev, kernel-janitors,
	linux-kernel
In-Reply-To: <20180311165547.27500-1-colin.king@canonical.com>

From: Colin King <colin.king@canonical.com>
Date: Sun, 11 Mar 2018 17:55:47 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> Functions lan743x_csr_read and lan743x_csr_read are local to the source
> and do not need to be in global scope, so make them static.
> 
> Cleans up sparse warning:
> drivers/net/ethernet/microchip/lan743x_main.c:56:5: warning: symbol
> lan743x_csr_read' was not declared. Should it be static?
> drivers/net/ethernet/microchip/lan743x_main.c:61:6: warning: symbol
> 'lan743x_csr_write' was not declared. Should it be static?
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

^ permalink raw reply

* Re: [PATCH][next] lan743x: remove some redundant variables and assignments
From: David Miller @ 2018-03-12 15:12 UTC (permalink / raw)
  To: colin.king
  Cc: bryan.whitehead, UNGLinuxDriver, netdev, kernel-janitors,
	linux-kernel
In-Reply-To: <20180311164233.27139-1-colin.king@canonical.com>

From: Colin King <colin.king@canonical.com>
Date: Sun, 11 Mar 2018 17:42:33 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> Function lan743x_phy_init assigns pointer 'netdev' but this is never read
> and hence it can be removed. The return error code handling can also be
> cleaned up to remove the variable 'ret'.
> 
> Function lan743x_phy_link_status_change assigns pointer 'phy' twice and
> this is never read, so it also can be removed.
> 
> Finally, function lan743x_tx_napi_poll initializes pointer 'adapter'
> and then re-assigns the same value into this pointer a little later on
> so this second assignment is redundant and can be also removed.
> 
> Cleans up clang warnings:
> drivers/net/ethernet/microchip/lan743x_main.c:951:2: warning: Value
> stored to 'netdev' is never read
> drivers/net/ethernet/microchip/lan743x_main.c:971:3: warning: Value
> stored to 'phy' is never read
> drivers/net/ethernet/microchip/lan743x_main.c:1583:26: warning: Value
> stored to 'adapter' during its initialization is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

^ permalink raw reply

* Re: [PATCH][rds-next] rds: remove redundant variable 'sg_off'
From: David Miller @ 2018-03-12 15:12 UTC (permalink / raw)
  To: colin.king
  Cc: santosh.shilimkar, netdev, linux-rdma, rds-devel, kernel-janitors,
	linux-kernel
In-Reply-To: <20180311162756.26950-1-colin.king@canonical.com>

From: Colin King <colin.king@canonical.com>
Date: Sun, 11 Mar 2018 17:27:56 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable sg_off is assigned a value but it is never read, hence it is
> redundant and can be removed.
> 
> Cleans up clang warning:
> net/rds/message.c:373:2: warning: Value stored to 'sg_off' is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

^ permalink raw reply

* [PATCH] ipv6: Use ip6_multipath_hash_policy() in rt6_multipath_hash().
From: David Miller @ 2018-03-12 15:10 UTC (permalink / raw)
  To: netdev; +Cc: dsahern


Make use of the new helper.

Suggested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/ipv6/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f0ae58424c45..81711e3e2604 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1846,7 +1846,7 @@ u32 rt6_multipath_hash(const struct net *net, const struct flowi6 *fl6,
 	struct flow_keys hash_keys;
 	u32 mhash;
 
-	switch (net->ipv6.sysctl.multipath_hash_policy) {
+	switch (ip6_multipath_hash_policy(net)) {
 	case 0:
 		memset(&hash_keys, 0, sizeof(hash_keys));
 		hash_keys.control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS;
-- 
2.14.3

^ permalink raw reply related

* Re: [PATCH net-next 0/3] mlxsw: Removing dependency of mlxsw on GRE
From: David Miller @ 2018-03-12 15:09 UTC (permalink / raw)
  To: idosch; +Cc: netdev, petrm, jiri, dsahern, mlxsw
In-Reply-To: <20180311074439.14018-1-idosch@mellanox.com>

From: Ido Schimmel <idosch@mellanox.com>
Date: Sun, 11 Mar 2018 09:44:39 +0200

> Petr says:
> 
> mlxsw_spectrum supports offloading of a tc action mirred egress mirror
> to a gretap or ip6gretap netdevice, which necessitates calls to
> functions defined in ip_gre, ip6_gre and ip6_tunnel modules. Previously
> this was enabled by introducing a hard dependency of MLXSW_SPECTRUM on
> NET_IPGRE and IPV6_GRE. However the rest of mlxsw is careful about
> picking which modules are absolutely required, and therefore the better
> approach is to make mlxsw_spectrum tolerant of absence of one or both of
> the GRE flavors.
> 
> One way this might be resolved is by keeping the code in mlxsw_spectrum
> intact, and defining defaults for functions that mlxsw_spectrum depends
> on. The downsides are that other modules end up littered with these
> do-nothing defaults; that the driver ends up carrying quite a bit of
> dead code; and that the driver ends up having to explicitly depend on
> IPV6_TUNNEL to prevent configurations where mlxsw_spectrum is compiled
> in and and ip6_tunnel is a module, something that it currently can treat
> as an implementation detail of the IPV6_GRE dependency.
> 
> Alternatively, the driver should just bite the bullet and ifdef-out the
> code that handles configurations that are not supported. Since that's
> what we are doing for IPv6 dependency, let's do the same for the GRE
> flavors.
> 
> Patch #1 introduces a wrapper function for determining the value of
> ipv6.sysctl.multipath_hash_policy, which defaults to 0 on non-IPv6
> builds. That function is then used from spectrum_router.c, instead of
> the direct variable reference that was introduced there during the short
> window when the Spectrum driver had a hard dependency on IPv6.
> 
> Patch #2 moves one function to keep together in one block all the
> callbacks for handling (IPv4) gretap mirroring.
> 
> Patch #3 then introduces the ifdefs to hide the irrelevant code.

Series applied.

^ permalink raw reply

* [PATCH] net: drivers/net: Remove unnecessary skb_copy_expand OOM messages
From: Joe Perches @ 2018-03-12 15:07 UTC (permalink / raw)
  To: Inaky Perez-Gonzalez, linux-wimax, Johannes Berg,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal
  Cc: Kalle Valo, Felipe Balbi, Greg Kroah-Hartman, David S. Miller,
	netdev, linux-kernel, linux-usb, linux-wireless, netfilter-devel,
	coreteam

skb_copy_expand without __GFP_NOWARN already does a dump_stack
on OOM so these messages are redundant.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/ethernet/qualcomm/qca_spi.c | 1 -
 drivers/net/usb/lg-vl600.c              | 6 +-----
 drivers/net/wimax/i2400m/usb-rx.c       | 3 ---
 drivers/net/wireless/ti/wl1251/tx.c     | 4 +---
 drivers/usb/gadget/function/f_eem.c     | 1 -
 net/mac80211/rx.c                       | 5 +----
 net/netfilter/nfnetlink_queue.c         | 5 +----
 7 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c
index 9c236298fe21..5803cd6db406 100644
--- a/drivers/net/ethernet/qualcomm/qca_spi.c
+++ b/drivers/net/ethernet/qualcomm/qca_spi.c
@@ -705,7 +705,6 @@ qcaspi_netdev_xmit(struct sk_buff *skb, struct net_device *dev)
 		tskb = skb_copy_expand(skb, QCAFRM_HEADER_LEN,
 				       QCAFRM_FOOTER_LEN + pad_len, GFP_ATOMIC);
 		if (!tskb) {
-			netdev_dbg(qca->net_dev, "could not allocate tx_buff\n");
 			qca->stats.out_of_mem++;
 			return NETDEV_TX_BUSY;
 		}
diff --git a/drivers/net/usb/lg-vl600.c b/drivers/net/usb/lg-vl600.c
index dbabd7ca5268..257916f172cd 100644
--- a/drivers/net/usb/lg-vl600.c
+++ b/drivers/net/usb/lg-vl600.c
@@ -157,12 +157,8 @@ static int vl600_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 
 		s->current_rx_buf = skb_copy_expand(skb, 0,
 				le32_to_cpup(&frame->len), GFP_ATOMIC);
-		if (!s->current_rx_buf) {
-			netif_err(dev, ifup, dev->net, "Reserving %i bytes "
-					"for packet assembly failed.\n",
-					le32_to_cpup(&frame->len));
+		if (!s->current_rx_buf)
 			dev->net->stats.rx_errors++;
-		}
 
 		return 0;
 	}
diff --git a/drivers/net/wimax/i2400m/usb-rx.c b/drivers/net/wimax/i2400m/usb-rx.c
index b78ee676e102..5b64bda7d9e7 100644
--- a/drivers/net/wimax/i2400m/usb-rx.c
+++ b/drivers/net/wimax/i2400m/usb-rx.c
@@ -263,9 +263,6 @@ struct sk_buff *i2400mu_rx(struct i2400mu *i2400mu, struct sk_buff *rx_skb)
 		new_skb = skb_copy_expand(rx_skb, 0, rx_size - rx_skb->len,
 					  GFP_KERNEL);
 		if (new_skb == NULL) {
-			if (printk_ratelimit())
-				dev_err(dev, "RX: Can't reallocate skb to %d; "
-					"RX dropped\n", rx_size);
 			kfree_skb(rx_skb);
 			rx_skb = NULL;
 			goto out;	/* drop it...*/
diff --git a/drivers/net/wireless/ti/wl1251/tx.c b/drivers/net/wireless/ti/wl1251/tx.c
index de2fa6705574..12ed14ebc307 100644
--- a/drivers/net/wireless/ti/wl1251/tx.c
+++ b/drivers/net/wireless/ti/wl1251/tx.c
@@ -221,10 +221,8 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb,
 			struct sk_buff *newskb = skb_copy_expand(skb, 0, 3,
 								 GFP_KERNEL);
 
-			if (unlikely(newskb == NULL)) {
-				wl1251_error("Can't allocate skb!");
+			if (unlikely(newskb == NULL))
 				return -EINVAL;
-			}
 
 			tx_hdr = (struct tx_double_buffer_desc *) newskb->data;
 
diff --git a/drivers/usb/gadget/function/f_eem.c b/drivers/usb/gadget/function/f_eem.c
index 37557651b600..c13befa31110 100644
--- a/drivers/usb/gadget/function/f_eem.c
+++ b/drivers/usb/gadget/function/f_eem.c
@@ -507,7 +507,6 @@ static int eem_unwrap(struct gether *port,
 						0,
 						GFP_ATOMIC);
 			if (unlikely(!skb3)) {
-				DBG(cdev, "unable to realign EEM packet\n");
 				dev_kfree_skb_any(skb2);
 				continue;
 			}
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index d01743234cf6..9c898a3688c6 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2549,11 +2549,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
 
 	fwd_skb = skb_copy_expand(skb, local->tx_headroom +
 				       sdata->encrypt_headroom, 0, GFP_ATOMIC);
-	if (!fwd_skb) {
-		net_info_ratelimited("%s: failed to clone mesh frame\n",
-				    sdata->name);
+	if (!fwd_skb)
 		goto out;
-	}
 
 	fwd_hdr =  (struct ieee80211_hdr *) fwd_skb->data;
 	fwd_hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_RETRY);
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 59e2833c17f1..9f572ed56208 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -833,11 +833,8 @@ nfqnl_mangle(void *data, int data_len, struct nf_queue_entry *e, int diff)
 		if (diff > skb_tailroom(e->skb)) {
 			nskb = skb_copy_expand(e->skb, skb_headroom(e->skb),
 					       diff, GFP_ATOMIC);
-			if (!nskb) {
-				printk(KERN_WARNING "nf_queue: OOM "
-				      "in mangle, dropping packet\n");
+			if (!nskb)
 				return -ENOMEM;
-			}
 			kfree_skb(e->skb);
 			e->skb = nskb;
 		}
-- 
2.15.0

^ permalink raw reply related

* Re: [PATCH net-next] cxgb4/cxgb4vf: check fw caps to set link mode mask
From: David Miller @ 2018-03-12 15:05 UTC (permalink / raw)
  To: ganeshgr; +Cc: netdev, nirranjan, indranil, venkatesh
In-Reply-To: <1520690272-7458-1-git-send-email-ganeshgr@chelsio.com>

From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Sat, 10 Mar 2018 19:27:52 +0530

> check firmware capabilities before setting ethtool
> link mode mask, also add few missing speeds.
> 
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] cxgb4: do not display 50Gbps as unsupported speed
From: David Miller @ 2018-03-12 15:05 UTC (permalink / raw)
  To: ganeshgr; +Cc: netdev, nirranjan, indranil, venkatesh
In-Reply-To: <1520683490-6225-1-git-send-email-ganeshgr@chelsio.com>

From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Sat, 10 Mar 2018 17:34:50 +0530

> 50Gbps is a supported speed, Stop reporting it as
> unsupported speed.
> 
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>

Applied.

^ permalink raw reply

* Re: [PATCHv3 net] sock_diag: request _diag module only when the family or proto has been registered
From: David Miller @ 2018-03-12 15:04 UTC (permalink / raw)
  To: lucien.xin; +Cc: netdev, edumazet, marcelo.leitner, phil, sd
In-Reply-To: <4e399f4124bdf8ac004235e685aa7677494d48e8.1520679470.git.lucien.xin@gmail.com>

From: Xin Long <lucien.xin@gmail.com>
Date: Sat, 10 Mar 2018 18:57:50 +0800

> Now when using 'ss' in iproute, kernel would try to load all _diag
> modules, which also causes corresponding family and proto modules
> to be loaded as well due to module dependencies.
> 
> Like after running 'ss', sctp, dccp, af_packet (if it works as a module)
> would be loaded.
> 
> For example:
> 
>   $ lsmod|grep sctp
>   $ ss
>   $ lsmod|grep sctp
>   sctp_diag              16384  0
>   sctp                  323584  5 sctp_diag
>   inet_diag              24576  4 raw_diag,tcp_diag,sctp_diag,udp_diag
>   libcrc32c              16384  3 nf_conntrack,nf_nat,sctp
> 
> As these family and proto modules are loaded unintentionally, it
> could cause some problems, like:
> 
> - Some debug tools use 'ss' to collect the socket info, which loads all
>   those diag and family and protocol modules. It's noisy for identifying
>   issues.
> 
> - Users usually expect to drop sctp init packet silently when they
>   have no sense of sctp protocol instead of sending abort back.
> 
> - It wastes resources (especially with multiple netns), and SCTP module
>   can't be unloaded once it's loaded.
> 
> ...
> 
> In short, it's really inappropriate to have these family and proto
> modules loaded unexpectedly when just doing debugging with inet_diag.
> 
> This patch is to introduce sock_load_diag_module() where it loads
> the _diag module only when it's corresponding family or proto has
> been already registered.
> 
> Note that we can't just load _diag module without the family or
> proto loaded, as some symbols used in _diag module are from the
> family or proto module.
> 
> v1->v2:
>   - move inet proto check to inet_diag to avoid a compiling err.
> v2->v3:
>   - define sock_load_diag_module in sock.c and export one symbol
>     only.
>   - improve the changelog.
> 
> Reported-by: Sabrina Dubroca <sd@queasysnail.net>
> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> Acked-by: Phil Sutter <phil@nwl.cc>
> Acked-by: Sabrina Dubroca <sd@queasysnail.net>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Ok, applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH V2 net-next] liquidio: fix ndo_change_mtu to always return correct status to the caller
From: David Miller @ 2018-03-12 15:01 UTC (permalink / raw)
  To: felix.manlunas
  Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla,
	veerasenareddy.burru
In-Reply-To: <20180310081735.GA6288@felix-thinkpad.cavium.com>

From: Felix Manlunas <felix.manlunas@cavium.com>
Date: Sat, 10 Mar 2018 00:17:35 -0800

> From: Veerasenareddy Burru <veerasenareddy.burru@cavium.com>
> 
> In a scenario where the command queued to firmware get dropped or times
> out, MTU change from host will not propagate to firmware. So, it is
> required for host driver to wait for response from firmware or timeout
> and then return correct status to caller of ndo_change_mtu.
> 
> Also moved the common code for MTU change from PF and VF driver files to
> common file lio_core.c
> 
> Signed-off-by: Veerasenareddy Burru <veerasenareddy.burru@cavium.com>
> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
> ---
> Patch Change Log:
>   V1 -> V2:
>     Remove unnecessary log message "MTU changed from %d to %d\n" as
>     suggested by David Miller

Applied, thank you.

^ permalink raw reply

* Re: [PATCH net 0/8] bnxt_en: Bug fixes.
From: David Miller @ 2018-03-12 14:58 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev
In-Reply-To: <1520657170-398-1-git-send-email-michael.chan@broadcom.com>

From: Michael Chan <michael.chan@broadcom.com>
Date: Fri,  9 Mar 2018 23:46:02 -0500

> There are 3 bug fixes in this series to fix regressions recently
> introduced when adding the new ring reservations scheme.  2 minor
> fixes in the TC Flower code to return standard errno values and
> to elide some unnecessary warning dmesg.  One Fixes the VLAN TCI
> value passed to the stack by including the entire 16-bit VLAN TCI,
> and the last fix is to check for valid VNIC ID before setting up or
> shutting down LRO/GRO.

Series applied, thanks Michael.

^ permalink raw reply

* Re: [PATCH net-next 1/1] tc-testing: updated gact tests with batch test cases
From: David Miller @ 2018-03-12 14:56 UTC (permalink / raw)
  To: mrv; +Cc: netdev, kernel, jhs, xiyou.wangcong, jiri
In-Reply-To: <1520633772-13149-1-git-send-email-mrv@mojatatu.com>

From: Roman Mashak <mrv@mojatatu.com>
Date: Fri,  9 Mar 2018 17:16:12 -0500

> Add test cases to exercise code paths responsible for adding or deleting
> batch of TC actions.
> 
> Signed-off-by: Roman Mashak <mrv@mojatatu.com>

You submitted this patch twice.

You didn't indicate if this is a new version of the patch or something
like this.

Please resubmit your tc-testing changes, all of them, with this
sorted out.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox