]> Git Repo - linux.git/log
linux.git
6 years agonet: switchdev: Add PORT_PRE_BRIDGE_FLAGS
Florian Fainelli [Thu, 21 Feb 2019 00:58:19 +0000 (16:58 -0800)]
net: switchdev: Add PORT_PRE_BRIDGE_FLAGS

In preparation for removing switchdev_port_attr_get(), introduce
PORT_PRE_BRIDGE_FLAGS which will be called through
switchdev_port_attr_set(), in the caller's context (possibly atomic) and
which must be checked by the switchdev driver in order to return whether
the operation is supported or not.

This is entirely analoguous to how the BRIDGE_FLAGS_SUPPORT works,
except it goes through a set() instead of get().

Signed-off-by: Florian Fainelli <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoMerge branch 'net-dsa-mv88e6xxx-fix-IPv6'
David S. Miller [Thu, 21 Feb 2019 22:53:07 +0000 (14:53 -0800)]
Merge branch 'net-dsa-mv88e6xxx-fix-IPv6'

Florian Fainelli says:

====================
net: dsa: mv88e6xxx: fix IPv6

We have had some emails in private over this issue, this is my current
patch set rebased on top of net-next which provides working IPv6 (and
probably other protocols as well) over mv88e6xxx DSA switches.

The problem comes down to mv88e6xxx defaulting to not flood unknown
unicast and multicast datagrams, as they would be by dumb switches,
and as the Linux bridge code does by default.

There is also the issue of IPv6 over a vlan that is transparent to the
bridge; the multicast querier will not reach inside the vlan, and so
the switch can not learn about multicast routing within the vlan.

These flood settings can be disabled via the Linux bridge code if it's
desired to make the switch behave more like a managed switch, eg, by
enabling the multicast querier.  However, the multicast querier
defaults to being disabled which effectively means that by default,
mv88e6xxx switches block all multicast traffic.  This is at odds with
the Linux bridge documentation, and the defaults that the Linux bridge
code adopts.

So, this patch set adds DSA support for Linux bridge flags, adds
mv88e6xxx support for the unicast and multicast flooding flags, and
lastly enables flooding of these frames by default to match the
Linux bridge defaults.
====================

Signed-off-by: David S. Miller <[email protected]>
6 years agonet: dsa: enable flooding for bridge ports
Russell King [Wed, 20 Feb 2019 23:35:06 +0000 (15:35 -0800)]
net: dsa: enable flooding for bridge ports

Switches work by learning the MAC address for each attached station by
monitoring traffic from each station.  When a station sends a packet,
the switch records which port the MAC address is connected to.

With IPv4 networking, before communication commences with a neighbour,
an ARP packet is broadcasted to all stations asking for the MAC address
corresponding with the IPv4.  The desired station responds with an ARP
reply, and the ARP reply causes the switch to learn which port the
station is connected to.

With IPv6 networking, the situation is rather different.  Rather than
broadcasting ARP packets, a "neighbour solicitation" is multicasted
rather than broadcasted.  This multicast needs to reach the intended
station in order for the neighbour to be discovered.

Once a neighbour has been discovered, and entered into the sending
stations neighbour cache, communication can restart at a point later
without sending a new neighbour solicitation, even if the entry in
the neighbour cache is marked as stale.  This can be after the MAC
address has expired from the forwarding cache of the DSA switch -
when that occurs, there is a long pause in communication.

Our DSA implementation for mv88e6xxx switches disables flooding of
multicast and unicast frames for bridged ports.  As per the above
description, this is fine for IPv4 networking, since the broadcasted
ARP queries will be sent to and received by all stations on the same
network.  However, this breaks IPv6 very badly - blocking neighbour
solicitations and later causing connections to stall.

The defaults that the Linux bridge code expect from bridges are for
unknown unicast and unknown multicast frames to be flooded to all ports
on the bridge, which is at odds to the defaults adopted by our DSA
implementation for mv88e6xxx switches.

This commit enables by default flooding of both unknown unicast and
unknown multicast frames whenever a port is added to a bridge, and
disables the flooding when a port leaves the bridge.  This means that
mv88e6xxx DSA switches now behave as per the bridge(8) man page, and
IPv6 works flawlessly through such a switch.

Reviewed-by: Florian Fainelli <[email protected]>
Reviewed-by: Vivien Didelot <[email protected]>
Signed-off-by: Russell King <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet: dsa: mv88e6xxx: add support for bridge flags
Russell King [Wed, 20 Feb 2019 23:35:05 +0000 (15:35 -0800)]
net: dsa: mv88e6xxx: add support for bridge flags

Add support for the bridge flags to Marvell 88e6xxx bridges, allowing
the multicast and unicast flood properties to be controlled.  These
can be controlled on a per-port basis via commands such as:

bridge link set dev lan1 flood on|off
bridge link set dev lan1 mcast_flood on|off

Reviewed-by: Florian Fainelli <[email protected]>
Reviewed-by: Vivien Didelot <[email protected]>
Signed-off-by: Russell King <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet: dsa: add support for bridge flags
Russell King [Wed, 20 Feb 2019 23:35:04 +0000 (15:35 -0800)]
net: dsa: add support for bridge flags

The Linux bridge implementation allows various properties of the bridge
to be controlled, such as flooding unknown unicast and multicast frames.
This patch adds the necessary DSA infrastructure to allow the Linux
bridge support to control these properties for DSA switches.

Reviewed-by: Vivien Didelot <[email protected]>
Signed-off-by: Russell King <[email protected]>
[florian: Add missing dp and ds variables declaration to fix build]
Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agobridge: remove redundant check on err in br_multicast_ipv4_rcv
Li RongQing [Tue, 19 Feb 2019 02:17:09 +0000 (10:17 +0800)]
bridge: remove redundant check on err in br_multicast_ipv4_rcv

br_ip4_multicast_mrd_rcv only return 0 and -ENOMSG,
no other negative value

Signed-off-by: Li RongQing <[email protected]>
Acked-by: Roopa Prabhu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet: remove unneeded switch fall-through
Li RongQing [Tue, 19 Feb 2019 02:15:56 +0000 (10:15 +0800)]
net: remove unneeded switch fall-through

This case block has been terminated by a return, so not need
a switch fall-through

Signed-off-by: Li RongQing <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet: sched: potential NULL dereference in tcf_block_find()
Dan Carpenter [Mon, 18 Feb 2019 09:26:32 +0000 (12:26 +0300)]
net: sched: potential NULL dereference in tcf_block_find()

The error code isn't set on this path so it would result in returning
ERR_PTR(0) and a NULL dereference in the caller.

Fixes: 18d3eefb17cf ("net: sched: refactor tcf_block_find() into standalone functions")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agolib/test_rhashtable: fix spelling mistake "existant" -> "existent"
Colin Ian King [Sun, 17 Feb 2019 22:52:09 +0000 (22:52 +0000)]
lib/test_rhashtable: fix spelling mistake "existant" -> "existent"

There are spelling mistakes in warning macro messages. Fix them.

Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoipmr: ip6mr: Create new sockopt to clear mfc cache or vifs
Callum Sinclair [Sun, 17 Feb 2019 21:07:52 +0000 (10:07 +1300)]
ipmr: ip6mr: Create new sockopt to clear mfc cache or vifs

Currently the only way to clear the forwarding cache was to delete the
entries one by one using the MRT_DEL_MFC socket option or to destroy and
recreate the socket.

Create a new socket option which with the use of optional flags can
clear any combination of multicast entries (static or not static) and
multicast vifs (static or not static).

Calling the new socket option MRT_FLUSH with the flags MRT_FLUSH_MFC and
MRT_FLUSH_VIFS will clear all entries and vifs on the socket except for
static entries.

Signed-off-by: Callum Sinclair <[email protected]>
Signed-off-by: Nikolay Aleksandrov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoMerge branch 'net-phy-improve-generic-clause-45-aneg-configuration'
David S. Miller [Thu, 21 Feb 2019 21:03:06 +0000 (13:03 -0800)]
Merge branch 'net-phy-improve-generic-clause-45-aneg-configuration'

Heiner Kallweit says:

====================
net: phy: improve generic clause 45 aneg configuration

Improve generic clause 45 aneg configuration.
====================

Signed-off-by: David S. Miller <[email protected]>
6 years agonet: phy: marvell10g: use genphy_c45_check_and_restart_aneg in mv3310_config_aneg
Heiner Kallweit [Mon, 18 Feb 2019 20:27:46 +0000 (21:27 +0100)]
net: phy: marvell10g: use genphy_c45_check_and_restart_aneg in mv3310_config_aneg

Use new function genphy_c45_check_and_restart_aneg() to reduce
boilerplate code.

Signed-off-by: Heiner Kallweit <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet: phy: add genphy_c45_check_and_restart_aneg
Heiner Kallweit [Mon, 18 Feb 2019 20:27:18 +0000 (21:27 +0100)]
net: phy: add genphy_c45_check_and_restart_aneg

This function will be used by config_aneg callback implementations of
PHY drivers and allows to reduce boilerplate code.

Signed-off-by: Heiner Kallweit <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet: phy: use genphy_config_eee_advert in genphy_c45_an_config_aneg
Heiner Kallweit [Mon, 18 Feb 2019 20:27:12 +0000 (21:27 +0100)]
net: phy: use genphy_config_eee_advert in genphy_c45_an_config_aneg

Like in genphy_config_aneg() for clause 22 PHY's, we should keep modes
from being advertised that are known to be broken with EEE.

Signed-off-by: Heiner Kallweit <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet: phy: export genphy_config_eee_advert
Heiner Kallweit [Mon, 18 Feb 2019 20:26:58 +0000 (21:26 +0100)]
net: phy: export genphy_config_eee_advert

We want to use this function in phy-c45.c too, therefore export it.

Signed-off-by: Heiner Kallweit <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoMerge branch 'net-phy-improve-genphy_read_status'
David S. Miller [Thu, 21 Feb 2019 20:57:25 +0000 (12:57 -0800)]
Merge branch 'net-phy-improve-genphy_read_status'

Heiner Kallweit says:

====================
net: phy: improve genphy_read_status

Series includes two smaller improvements to genphy_read_status.
====================

Signed-off-by: David S. Miller <[email protected]>
6 years agonet: phy: don't use 10BaseT/half as default in genphy_read_status
Heiner Kallweit [Mon, 18 Feb 2019 19:29:36 +0000 (20:29 +0100)]
net: phy: don't use 10BaseT/half as default in genphy_read_status

If link partner and we can't agree on any mode, then it doesn't make
sense to pretend we would have agreed on 10/half. Therefore set a
proper default.

Signed-off-by: Heiner Kallweit <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet: phy: remove orphaned register read in genphy_read_status
Heiner Kallweit [Mon, 18 Feb 2019 19:28:54 +0000 (20:28 +0100)]
net: phy: remove orphaned register read in genphy_read_status

After recent changes to genphy_read_status() this orphaned register
read remained as leftover. So remove it.

Signed-off-by: Heiner Kallweit <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoqed: Read device port count from the shmem
Sudarsana Reddy Kalluru [Thu, 21 Feb 2019 14:03:31 +0000 (06:03 -0800)]
qed: Read device port count from the shmem

Read port count from the shared memory instead of driver deriving this
value. This change simplifies the driver implementation and also avoids
any dependencies for finding the port-count.

Signed-off-by: Sudarsana Reddy Kalluru <[email protected]>
Signed-off-by: Michal Kalderon <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoMerge branch 'devlink-next'
David S. Miller [Thu, 21 Feb 2019 18:38:52 +0000 (10:38 -0800)]
Merge branch 'devlink-next'

Eran Ben Elisha says:

====================
Devlink health fixes series

This series includes two small fixes from Aya for the devlink health
infrastructure introduced earlier in this window.

First patch rename some UAPI attributes to better reflect their use.
Second patch reduces the amount of data passed from the devlink to the
netlink layer upon get reporter command, in case of no-recovery reporter.
====================

Signed-off-by: David S. Miller <[email protected]>
6 years agodevlink: Modify reply of DEVLINK_CMD_HEALTH_REPORTER_GET
Aya Levin [Thu, 21 Feb 2019 12:12:02 +0000 (14:12 +0200)]
devlink: Modify reply of DEVLINK_CMD_HEALTH_REPORTER_GET

Avoid sending attributes related to recovery:
DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD and
DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER in reply to
DEVLINK_CMD_HEALTH_REPORTER_GET for a reporter which didn't register a
recover operation.
These parameters can't be configured on a reporter that did not provide
a recover operation, thus not needed to return them.

Fixes: 7afe335a8bed ("devlink: Add health get command")
Signed-off-by: Aya Levin <[email protected]>
Signed-off-by: Eran Ben Elisha <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agodevlink: Rename devlink health attributes
Aya Levin [Thu, 21 Feb 2019 12:12:01 +0000 (14:12 +0200)]
devlink: Rename devlink health attributes

Rename devlink health attributes for better reflect the attributes use.
Add COUNT prefix on error counter attribute and recovery counter
attribute.

Fixes: 7afe335a8bed ("devlink: Add health get command")
Signed-off-by: Aya Levin <[email protected]>
Signed-off-by: Eran Ben Elisha <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoMerge branch 'smc-next'
David S. Miller [Thu, 21 Feb 2019 18:34:37 +0000 (10:34 -0800)]
Merge branch 'smc-next'

Ursula Braun says:

====================
net/smc: patches 2019-02-21

here are patches for SMC:
* patch 1 is a cleanup without functional change
* patches 2-6 enhance SMC pnetid support
====================

Signed-off-by: David S. Miller <[email protected]>
6 years agonet/smc: allow PCI IDs as ib device names in the pnet table
Hans Wippel [Thu, 21 Feb 2019 12:01:03 +0000 (13:01 +0100)]
net/smc: allow PCI IDs as ib device names in the pnet table

SMC-D devices are identified by their PCI IDs in the pnet table. In
order to make usage of the pnet table more consistent for users, this
patch adds this form of identification for ib devices as well.

Signed-off-by: Hans Wippel <[email protected]>
Signed-off-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet/smc: add pnet table namespace support
Hans Wippel [Thu, 21 Feb 2019 12:01:02 +0000 (13:01 +0100)]
net/smc: add pnet table namespace support

This patch adds namespace support to the pnet table code. Each network
namespace gets its own pnet table. Infiniband and smcd device pnetids
can only be modified in the initial namespace. In other namespaces they
can still be used as if they were set by the underlying hardware.

Signed-off-by: Hans Wippel <[email protected]>
Signed-off-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet/smc: add smcd support to the pnet table
Hans Wippel [Thu, 21 Feb 2019 12:01:01 +0000 (13:01 +0100)]
net/smc: add smcd support to the pnet table

Currently, users can only set pnetids for netdevs and ib devices in the
pnet table. This patch adds support for smcd devices to the pnet table.

Signed-off-by: Hans Wippel <[email protected]>
Signed-off-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet/smc: rework pnet table
Hans Wippel [Thu, 21 Feb 2019 12:01:00 +0000 (13:01 +0100)]
net/smc: rework pnet table

If a device does not have a pnetid, users can set a temporary pnetid for
said device in the pnet table. This patch reworks the pnet table to make
it more flexible. Multiple entries with the same pnetid but differing
devices are now allowed. Additionally, the netlink interface now sends
each mapping from pnetid to device separately to the user while
maintaining the message format existing applications might expect. Also,
the SMC data structure for ib devices already has a pnetid attribute.
So, it is used to store the user defined pnetids. As a result, the pnet
table entries are only used for netdevs.

Signed-off-by: Hans Wippel <[email protected]>
Signed-off-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agos390/net: convert pnetids to ascii
Hans Wippel [Thu, 21 Feb 2019 12:00:59 +0000 (13:00 +0100)]
s390/net: convert pnetids to ascii

Pnetids are retrieved from the underlying hardware as EBCDIC. This patch
converts pnetids to ASCII.

Signed-off-by: Hans Wippel <[email protected]>
Signed-off-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet/smc: cleanup for smcr_tx_sndbuf_nonempty
Ursula Braun [Thu, 21 Feb 2019 12:00:58 +0000 (13:00 +0100)]
net/smc: cleanup for smcr_tx_sndbuf_nonempty

Use local variable pflags from the beginning of function
smcr_tx_sndbuf_nonempty

Signed-off-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agocxgb4: Mask out interrupts that are not enabled.
Vishal Kulkarni [Sun, 17 Feb 2019 04:15:30 +0000 (09:45 +0530)]
cxgb4: Mask out interrupts that are not enabled.

There are rare cases where a PL_INT_CAUSE bit may end up getting
set when the corresponding PL_INT_ENABLE bit isn't set.

Signed-off-by: Vishal Kulkarni <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoMerge branch 'net-phy-disable-aneg-in-genphy_c45_pma_setup_forced'
David S. Miller [Thu, 21 Feb 2019 04:19:01 +0000 (20:19 -0800)]
Merge branch 'net-phy-disable-aneg-in-genphy_c45_pma_setup_forced'

Heiner Kallweit says:

====================
net: phy: disable aneg in genphy_c45_pma_setup_forced

When genphy_c45_pma_setup_forced() is called the "aneg enabled" bit
may still be set, therefore clear it. This is also in line with what
genphy_setup_forced() does for Clause 22.

v2:
- fix a typo in patch 1
====================

Signed-off-by: David S. Miller <[email protected]>
6 years agonet: phy: marvell10g: improve mv3310_config_aneg
Heiner Kallweit [Sat, 16 Feb 2019 19:44:59 +0000 (20:44 +0100)]
net: phy: marvell10g: improve mv3310_config_aneg

Now that genphy_c45_pma_setup_forced() makes sure the "aneg enabled"
bit is cleared, the call to genphy_c45_an_disable_aneg() isn't needed
any longer. And the code pattern is now the same as in
genphy_config_aneg().

Signed-off-by: Heiner Kallweit <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet: phy: disable aneg in genphy_c45_pma_setup_forced
Heiner Kallweit [Sat, 16 Feb 2019 19:44:16 +0000 (20:44 +0100)]
net: phy: disable aneg in genphy_c45_pma_setup_forced

When genphy_c45_pma_setup_forced() is called the "aneg enabled" bit may
still be set, therefore clear it. This is also in line with what
genphy_setup_forced() does for Clause 22.

v2:
- fix typo

Signed-off-by: Heiner Kallweit <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoMerge tag 'mlx5-updates-2019-02-19' of git://git.kernel.org/pub/scm/linux/kernel...
David S. Miller [Thu, 21 Feb 2019 04:13:58 +0000 (20:13 -0800)]
Merge tag 'mlx5-updates-2019-02-19' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5-updates-2019-02-19

This series includes misc updates to mlx5 drivers and one ethtool update.

1) From Aya Levin:
   - ethtool: Define 50Gbps per lane link modes
   - add support for 50Gbps per lane link modes in mlx5 driver

2) From Tariq Toukan,
   - Add a helper function to unify mlx5 resource reloading

3) From Vlad Buslov,
   - Remove wrong and superfluous tc pedit header type check

4) From Tonghao Zhang,
   - Some refactoring in en_tc.c to simplify the mlx5e_tc_add_fdb_flow

5) From Leon Romanovsky & Saeed,
   - Compilation warning fixes

6) From Bodong wang,
   - E-Switch fixes that are related to the SmarNIC series
====================

Signed-off-by: David S. Miller <[email protected]>
6 years agonet_sched: fix a memory leak in cls_tcindex
Cong Wang [Sat, 16 Feb 2019 18:58:27 +0000 (10:58 -0800)]
net_sched: fix a memory leak in cls_tcindex

(cherry picked from commit 033b228e7f26b29ae37f8bfa1bc6b209a5365e9f)

When tcindex_destroy() destroys all the filter results in
the perfect hash table, it invokes the walker to delete
each of them. However, results with class==0 are skipped
in either tcindex_walk() or tcindex_delete(), which causes
a memory leak reported by kmemleak.

This patch fixes it by skipping the walker and directly
deleting these filter results so we don't miss any filter
result.

As a result of this change, we have to initialize exts->net
properly in tcindex_alloc_perfect_hash(). For net-next, we
need to consider whether we should initialize ->net in
tcf_exts_init() instead, before that just directly test
CONFIG_NET_CLS_ACT=y.

Cc: Jamal Hadi Salim <[email protected]>
Cc: Jiri Pirko <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet_sched: fix a race condition in tcindex_destroy()
Cong Wang [Sat, 16 Feb 2019 18:58:26 +0000 (10:58 -0800)]
net_sched: fix a race condition in tcindex_destroy()

(cherry picked from commit 8015d93ebd27484418d4952284fd02172fa4b0b2)

tcindex_destroy() invokes tcindex_destroy_element() via
a walker to delete each filter result in its perfect hash
table, and tcindex_destroy_element() calls tcindex_delete()
which schedules tcf RCU works to do the final deletion work.
Unfortunately this races with the RCU callback
__tcindex_destroy(), which could lead to use-after-free as
reported by Adrian.

Fix this by migrating this RCU callback to tcf RCU work too,
as that workqueue is ordered, we will not have use-after-free.

Note, we don't need to hold netns refcnt because we don't call
tcf_exts_destroy() here.

Fixes: 27ce4f05e2ab ("net_sched: use tcf_queue_work() in tcindex filter")
Reported-by: Adrian <[email protected]>
Cc: Ben Hutchings <[email protected]>
Cc: Jamal Hadi Salim <[email protected]>
Cc: Jiri Pirko <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agogso: validate gso_type on ipip style tunnels
Willem de Bruijn [Wed, 20 Feb 2019 15:52:12 +0000 (10:52 -0500)]
gso: validate gso_type on ipip style tunnels

Commit 121d57af308d ("gso: validate gso_type in GSO handlers") added
gso_type validation to existing gso_segment callback functions, to
filter out illegal and potentially dangerous SKB_GSO_DODGY packets.

Convert tunnels that now call inet_gso_segment and ipv6_gso_segment
directly to have their own callbacks and extend validation to these.

Signed-off-by: Willem de Bruijn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoMerge tag 'iwlwifi-next-for-kalle-2019-02-20' of git://git.kernel.org/pub/scm/linux...
Kalle Valo [Wed, 20 Feb 2019 19:06:13 +0000 (21:06 +0200)]
Merge tag 'iwlwifi-next-for-kalle-2019-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

Fifth batch of iwlwifi patches intended for v5.1

* Some small fixes and continued work on the new debugging
  infrastructure;
* Greg's debugfs clean-ups;
* Some janitorial patches from the community;
* Fix to one false-positive compiler warning;
* VHT extended NSS support;
* New PCI IDs for 9260 and 22000 series;
* Other general bugfixes and cleanups;

6 years agoselftest/tls: Add test to verify received 'type' of non-data record
Vakul Garg [Wed, 20 Feb 2019 08:43:00 +0000 (08:43 +0000)]
selftest/tls: Add test to verify received 'type' of non-data record

Test case 'control_msg' has been updated to peek non-data record and
then verify the type of record received. Subsequently, the same record
is retrieved without MSG_PEEK flag in recvmsg().

Signed-off-by: Vakul Garg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoiwlwifi: add new cards for 22000 and killer series and change the market name
Ihab Zhaika [Sun, 3 Feb 2019 16:54:01 +0000 (18:54 +0200)]
iwlwifi: add new cards for 22000 and killer series and change the market name

Add a few PCI ID'S for 22000 and killer series in addition to
chainging the marketing name.

Signed-off-by: Ihab Zhaika <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: add new card for 9260 series
Ihab Zhaika [Mon, 4 Feb 2019 08:16:03 +0000 (10:16 +0200)]
iwlwifi: add new card for 9260 series

Add one PCI ID for 9260 series.

CC: <[email protected]> # 4.14+
Signed-off-by: Ihab Zhaika <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: dbg_ini: implement Rx fifos dump
Shahar S Matityahu [Sun, 27 Jan 2019 09:22:21 +0000 (11:22 +0200)]
iwlwifi: dbg_ini: implement Rx fifos dump

Implement Rx fifos dump in the new dump mechanism.

Signed-off-by: Shahar S Matityahu <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: dbg_ini: implement Tx fifos dump
Shahar S Matityahu [Thu, 20 Dec 2018 12:54:58 +0000 (14:54 +0200)]
iwlwifi: dbg_ini: implement Tx fifos dump

Implement Tx fifos dump in the new dump mechanism.

Signed-off-by: Shahar S Matityahu <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: dbg_ini: add region to fill_header handler
Shahar S Matityahu [Wed, 19 Dec 2018 12:47:36 +0000 (14:47 +0200)]
iwlwifi: dbg_ini: add region to fill_header handler

Add iwl_fw_ini_region_cfg region struct to fill_header handler of
iwl_dump_ini_mem_ops. it is needed for future support in fifos dumping.

Signed-off-by: Shahar S Matityahu <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: dbg_ini: make fill_range handler accept generic range pointer
Shahar S Matityahu [Mon, 28 Jan 2019 09:03:45 +0000 (11:03 +0200)]
iwlwifi: dbg_ini: make fill_range handler accept generic range pointer

Make fill_range handler of iwl_dump_ini_mem_ops accept a generic range
pointer. It is needed for future support in fifos dumping.

Signed-off-by: Shahar S Matityahu <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: dbg_ini: make memory dump get_size handler include headers
Shahar S Matityahu [Mon, 28 Jan 2019 09:02:30 +0000 (11:02 +0200)]
iwlwifi: dbg_ini: make memory dump get_size handler include headers

Make the get size handler of iwl_dump_ini_mem_ops include the total
size of the region. It is needed for fifos dumping.

Signed-off-by: Shahar S Matityahu <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: dbg_ini: add print to iwl_dump_ini_mem in case of invalid range
Shahar S Matityahu [Sun, 27 Jan 2019 09:34:05 +0000 (11:34 +0200)]
iwlwifi: dbg_ini: add print to iwl_dump_ini_mem in case of invalid range

Add informative print in case the range is not available.

Signed-off-by: Shahar S Matityahu <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: dbg_ini: fix infinite time ignore consecutive dumps
Shahar S Matityahu [Tue, 29 Jan 2019 07:51:44 +0000 (09:51 +0200)]
iwlwifi: dbg_ini: fix infinite time ignore consecutive dumps

The driver sets ignore_consec to -1 which is 0xffffffff in u32
so when iwl_fw_ini_trigger_on is called, it will always return false
and each trigger could be used only once.

Solve this by removing the assignment to -1.

Signed-off-by: Shahar S Matityahu <[email protected]>
Fixes: fe1b7d6c2888 ("iwlwifi: add support for triggering ini triggers")
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: mvm: add some debug data to TX path
Sara Sharon [Mon, 28 Jan 2019 13:12:08 +0000 (15:12 +0200)]
iwlwifi: mvm: add some debug data to TX path

This helps debugging when things go wrong.

Signed-off-by: Sara Sharon <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: remove redundant condition from prior alive dump flow
Shahar S Matityahu [Wed, 23 Jan 2019 09:31:58 +0000 (11:31 +0200)]
iwlwifi: remove redundant condition from prior alive dump flow

After the FW image was loaded for the first time,
fwrt->smem_cfg.num_lmacs value will no longer be zero since we don't
clean it when we stop the device. So if we load the image once and then
we fail on a consecutive attempt, the driver will abort any dumping.

Solve this by removing the condition. It is safe to remove since
when we do the actual dumping in iwl_fw_dbg_collect_sync we check
that STATUS_DEVICE_ENABLED bit is still active.

Signed-off-by: Shahar S Matityahu <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: mvm: implement VHT extended NSS support in rs.c
Johannes Berg [Thu, 24 Jan 2019 11:22:41 +0000 (12:22 +0100)]
iwlwifi: mvm: implement VHT extended NSS support in rs.c

For non-offloaded rate control, implement VHT extended NSS
support by just ignoring 160 MHz on transmit if the peer
doesn't support the full NSS (2). This is pretty unlikely
and gets us 160 MHz RX as well as TX in most cases, since
the typical case for this workaround is 4x4 AP only doing
2x2 on 160 MHz.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: mvm: Allow retries for probe responses
Ilan Peer [Mon, 28 Jan 2019 11:32:52 +0000 (13:32 +0200)]
iwlwifi: mvm: Allow retries for probe responses

When hostapd sends a probe response, it does not request an
acknowledgment on the probe response. This setting is propagated
to the driver and FW from mac80211, and as a result probe responses
are transmitted only once without retries. In congested
environments, this reduces the likelihood for finding the AP.

To overcome this, enable acknowledgment and retries for probe
responses, even in case no acknowledgment is requested. In such
a case the retry limit is set to 3.

Signed-off-by: Ilan Peer <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: mvm: remove IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE
Johannes Berg [Tue, 29 Jan 2019 12:23:05 +0000 (13:23 +0100)]
iwlwifi: mvm: remove IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE

There's no point in this, we already do everything in a nested
fashion, and if we didn't we'd already crash in iwl_mvm_leds_exit()
etc. Just remove the bit.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: mvm: Set TX_CMD_FLG_PROT_REQUIRE correctly
Andrei Otcheretianski [Tue, 29 Jan 2019 18:38:48 +0000 (20:38 +0200)]
iwlwifi: mvm: Set TX_CMD_FLG_PROT_REQUIRE correctly

Previously the protection flag wasn't set on multicast frames even if
the RA is unicast. Fix this by checking addr1 instead.

Signed-off-by: Andrei Otcheretianski <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: mvm: support non-transmitting AP
Sara Sharon [Tue, 29 Jan 2019 09:53:03 +0000 (11:53 +0200)]
iwlwifi: mvm: support non-transmitting AP

Add an option to not send beacons and probe responses. This is
used for testing multiple-bssid.

Signed-off-by: Sara Sharon <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: mvm: add read debugfs for he_sniffer_params
Liad Kaufman [Tue, 15 Jan 2019 11:38:30 +0000 (13:38 +0200)]
iwlwifi: mvm: add read debugfs for he_sniffer_params

Return the AID currently set when reading this debugfs entry.

Signed-off-by: Liad Kaufman <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: mvm: reject new beacons when in inject mode
Sara Sharon [Sun, 27 Jan 2019 09:24:30 +0000 (11:24 +0200)]
iwlwifi: mvm: reject new beacons when in inject mode

Verify we do not accept new beacon templates while beacon
injection is active.

Signed-off-by: Sara Sharon <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: iwl-drv: no need to check return value of debugfs_create functions
Greg Kroah-Hartman [Tue, 22 Jan 2019 15:21:22 +0000 (16:21 +0100)]
iwlwifi: iwl-drv: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Johannes Berg <[email protected]>
Cc: Emmanuel Grumbach <[email protected]>
Cc: Luca Coelho <[email protected]>
Cc: Intel Linux Wireless <[email protected]>
Cc: Kalle Valo <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: fw: no need to check return value of debugfs_create functions
Greg Kroah-Hartman [Tue, 22 Jan 2019 15:21:21 +0000 (16:21 +0100)]
iwlwifi: fw: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Johannes Berg <[email protected]>
Cc: Emmanuel Grumbach <[email protected]>
Cc: Luca Coelho <[email protected]>
Cc: Intel Linux Wireless <[email protected]>
Cc: Kalle Valo <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: dvm: no need to check return value of debugfs_create functions
Greg Kroah-Hartman [Tue, 22 Jan 2019 15:21:19 +0000 (16:21 +0100)]
iwlwifi: dvm: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Johannes Berg <[email protected]>
Cc: Emmanuel Grumbach <[email protected]>
Cc: Luca Coelho <[email protected]>
Cc: Intel Linux Wireless <[email protected]>
Cc: Kalle Valo <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: nvm-parse: advertise IEEE80211_VHT_EXT_NSS_BW_CAPABLE in VHT
Johannes Berg [Thu, 24 Jan 2019 10:14:13 +0000 (11:14 +0100)]
iwlwifi: nvm-parse: advertise IEEE80211_VHT_EXT_NSS_BW_CAPABLE in VHT

We support this, so we should advertise it. In fact, if we don't,
mac80211 will do it for us (as we advertise SUPPORTS_VHT_EXT_NSS_BW
to it), but that requires a memory reallocation which is wasteful:

  ieee80211 phy0: copying sband (band 1) due to VHT EXT NSS BW flag

Set the flag here to avoid that.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: mvm: fix error path in iwl_mvm_mac_setup_register()
Johannes Berg [Thu, 24 Jan 2019 12:26:28 +0000 (13:26 +0100)]
iwlwifi: mvm: fix error path in iwl_mvm_mac_setup_register()

The IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE bit shouldn't be set,
and realistically we should complete all setup before we call the
ieee80211_register_hw() function. Fix this.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: nvm-parse: use struct_size() in kzalloc()
Gustavo A. R. Silva [Tue, 8 Jan 2019 17:55:19 +0000 (11:55 -0600)]
iwlwifi: nvm-parse: use struct_size() in kzalloc()

One of the more common cases of allocation size calculations is finding the
size of a structure that has a zero-sized array at the end, along with memory
for some number of elements for that array. For example:

struct foo {
    int stuff;
    void *entry[];
};

instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);

Instead of leaving these open-coded and prone to type mistakes, we can now
use the new struct_size() helper:

instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: eeprom-parse: use struct_size() in kzalloc()
Gustavo A. R. Silva [Tue, 8 Jan 2019 17:17:38 +0000 (11:17 -0600)]
iwlwifi: eeprom-parse: use struct_size() in kzalloc()

One of the more common cases of allocation size calculations is finding the
size of a structure that has a zero-sized array at the end, along with memory
for some number of elements for that array. For example:

struct foo {
    int stuff;
    void *entry[];
};

instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);

Instead of leaving these open-coded and prone to type mistakes, we can now
use the new struct_size() helper:

instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: fix false-positive maybe-uninitialized warning
Arnd Bergmann [Mon, 10 Dec 2018 20:39:06 +0000 (21:39 +0100)]
iwlwifi: fix false-positive maybe-uninitialized warning

With CONFIG_NO_AUTO_INLINE, we run into a silly warning when
gcc fails to remember that n_profiles is constant across
the function call to iwl_mvm_sar_set_profile:

drivers/net/wireless/intel/iwlwifi/mvm/fw.c: In function 'iwl_mvm_sar_get_ewrd_table':
drivers/net/wireless/intel/iwlwifi/mvm/fw.c:746:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Marking that function 'inline' avoids the warning.

Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: mvm: Don't request HW restart if already requested
Ilan Peer [Sun, 20 Jan 2019 15:45:16 +0000 (17:45 +0200)]
iwlwifi: mvm: Don't request HW restart if already requested

In case mac80211 was requested to perform an HW restart, but the HW
restart has not started yet, there is no need to request another one.

Signed-off-by: Ilan Peer <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoiwlwifi: pcie: allocate rb_stts's for all queues in one place
Triebitz [Thu, 17 Jan 2019 12:27:20 +0000 (14:27 +0200)]
iwlwifi: pcie: allocate rb_stts's for all queues in one place

AX210 devices assume that the (DRAM) addresses of the rb_stts's for
the different queues are continuous.
So allocate the rb_stts's for all the Rx queues in one place.

Signed-off-by: Shaul Triebitz <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
6 years agoMerge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Kalle Valo [Wed, 20 Feb 2019 18:01:27 +0000 (20:01 +0200)]
Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git

ath.git patches for 5.1. Major changes:

ath10k

* support WPA3 with WCN3990

* support for mac80211 airtime fairness based on transmit rate
  estimation, the firmware needs to support WMI_SERVICE_PEER_STATS to
  enable this

* report transmit airtime to mac80211 with firmwares having
  WMI_SERVICE_REPORT_AIRTIME feature, this to have more accurate
  airtime fairness based on real transmit time (instead of just
  estimated from transmit rate)

* support Fine Timing Measurement (FTM) responder role

* add dynamic VLAN support with firmware having
  WMI_SERVICE_PER_PACKET_SW_ENCRYPT

* switch to use SPDX license identifiers

6 years agolibertas_tf: get the MAC address before registering the device
Lubomir Rintel [Wed, 20 Feb 2019 10:58:40 +0000 (11:58 +0100)]
libertas_tf: get the MAC address before registering the device

The start() callback is too late for this: NetworkManager would already
have seen the hardware, thinking 00:00:00:00:00:00 is its permanent
address.

Signed-off-by: Lubomir Rintel <[email protected]>
Reviewed-by: Steve deRosier <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
6 years agolibertas_tf: don't defer firmware loading until start()
Lubomir Rintel [Wed, 20 Feb 2019 10:58:39 +0000 (11:58 +0100)]
libertas_tf: don't defer firmware loading until start()

In order to be able to get a MAC address before we register the device
with ieee80211 we'll need to load the firmware way earlier.

There seems to be one problem with this: the device seems to start
with radio enabled and starts sending in frames right after the firmware
load finishes. Disable the radio as soon as possible.

Signed-off-by: Lubomir Rintel <[email protected]>
Reviewed-by: Steve deRosier <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
6 years agolibertas_tf: move hardware callbacks to a separate structure
Lubomir Rintel [Wed, 20 Feb 2019 10:58:38 +0000 (11:58 +0100)]
libertas_tf: move hardware callbacks to a separate structure

We'll need to talk to the firmware to get a hardware address before
device is registered with ieee80211 subsystem at the end of
lbtf_add_card(). Hooking the callbacks after that is too late.

Signed-off-by: Lubomir Rintel <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
6 years agobrcmfmac: add basic validation of shared RAM address
Rafał Miłecki [Wed, 20 Feb 2019 10:30:47 +0000 (11:30 +0100)]
brcmfmac: add basic validation of shared RAM address

While experimenting with firmware loading I ended up in a state of
firmware reporting shared RAM address 0x04000001. It was causing:
[   94.448015] Unable to handle kernel paging request at virtual address cd680001
due to reading out of the mapped memory.

This patch adds some basic validation to avoid kernel crashes due to the
unexpected firmware behavior.

Signed-off-by: Rafał Miłecki <[email protected]>
Acked-by: Arend van Spriel <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
6 years agortlwifi: rtl8192ce: fix typo, "PairwiseENcAlgorithm" -> "PairwiseEncAlgorithm"
Colin Ian King [Wed, 20 Feb 2019 09:27:27 +0000 (09:27 +0000)]
rtlwifi: rtl8192ce: fix typo, "PairwiseENcAlgorithm" -> "PairwiseEncAlgorithm"

There is an uppercase 'N' that should be a lowercase 'n', fix this.

Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
6 years agobrcmfmac: use bphy_err() in all wiphy-related code
Rafał Miłecki [Tue, 19 Feb 2019 22:42:19 +0000 (23:42 +0100)]
brcmfmac: use bphy_err() in all wiphy-related code

This recently added macro provides more meaningful error messages thanks
to identifying a specific wiphy. It's especially important on systems
with few cards supported by the same (brcmfmac) driver.

Signed-off-by: Rafał Miłecki <[email protected]>
Acked-by: Arend van Spriel <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
6 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Wed, 20 Feb 2019 08:34:07 +0000 (00:34 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Two easily resolvable overlapping change conflicts, one in
TCP and one in the eBPF verifier.

Signed-off-by: David S. Miller <[email protected]>
6 years agoath10k: switch to use SPDX license identifiers
Kalle Valo [Tue, 19 Feb 2019 17:45:26 +0000 (19:45 +0200)]
ath10k: switch to use SPDX license identifiers

Use SPDX identifiers everywhere in ath10k.

Makefile was incorrectly marked in commit b24413180f56 ("License cleanup: add
SPDX GPL-2.0 license identifier to files with no license"), fix that as well.

Signed-off-by: Kalle Valo <[email protected]>
6 years agoath10k: change 'unsigned long int' to 'unsigned long'
Kalle Valo [Tue, 19 Feb 2019 12:11:43 +0000 (14:11 +0200)]
ath10k: change 'unsigned long int' to 'unsigned long'

Fixes checkpatch warnings:

Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary

Signed-off-by: Kalle Valo <[email protected]>
6 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Wed, 20 Feb 2019 00:13:19 +0000 (16:13 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix suspend and resume in mt76x0u USB driver, from Stanislaw
    Gruszka.

 2) Missing memory barriers in xsk, from Magnus Karlsson.

 3) rhashtable fixes in mac80211 from Herbert Xu.

 4) 32-bit MIPS eBPF JIT fixes from Paul Burton.

 5) Fix for_each_netdev_feature() on big endian, from Hauke Mehrtens.

 6) GSO validation fixes from Willem de Bruijn.

 7) Endianness fix for dwmac4 timestamp handling, from Alexandre Torgue.

 8) More strict checks in tcp_v4_err(), from Eric Dumazet.

 9) af_alg_release should NULL out the sk after the sock_put(), from Mao
    Wenan.

10) Missing unlock in mac80211 mesh error path, from Wei Yongjun.

11) Missing device put in hns driver, from Salil Mehta.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (44 commits)
  sky2: Increase D3 delay again
  vhost: correctly check the return value of translate_desc() in log_used()
  net: netcp: Fix ethss driver probe issue
  net: hns: Fixes the missing put_device in positive leg for roce reset
  net: stmmac: Fix a race in EEE enable callback
  qed: Fix iWARP syn packet mac address validation.
  qed: Fix iWARP buffer size provided for syn packet processing.
  r8152: Add support for MAC address pass through on RTL8153-BD
  mac80211: mesh: fix missing unlock on error in table_path_del()
  net/mlx4_en: fix spelling mistake: "quiting" -> "quitting"
  net: crypto set sk to NULL when af_alg_release.
  net: Do not allocate page fragments that are not skb aligned
  mm: Use fixed constant in page_frag_alloc instead of size + 1
  tcp: tcp_v4_err() should be more careful
  tcp: clear icsk_backoff in tcp_write_queue_purge()
  net: mv643xx_eth: disable clk on error path in mv643xx_eth_shared_probe()
  qmi_wwan: apply SET_DTR quirk to Sierra WP7607
  net: stmmac: handle endianness in dwmac4_get_timestamp
  doc: Mention MSG_ZEROCOPY implementation for UDP
  mlxsw: __mlxsw_sp_port_headroom_set(): Fix a use of local variable
  ...

6 years agosky2: Increase D3 delay again
Kai-Heng Feng [Tue, 19 Feb 2019 15:45:29 +0000 (23:45 +0800)]
sky2: Increase D3 delay again

Another platform requires even longer delay to make the device work
correctly after S3.

So increase the delay to 300ms.

BugLink: https://bugs.launchpad.net/bugs/1798921
Signed-off-by: Kai-Heng Feng <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoptp_qoriq: don't pass a large struct by value but instead pass it by reference
Colin Ian King [Tue, 19 Feb 2019 14:21:20 +0000 (14:21 +0000)]
ptp_qoriq: don't pass a large struct by value but instead pass it by reference

Passing the struct ptp_clock_info caps by parameter is passing over 130 bytes
of data by value on the stack. Optimize this by passing it by reference instead.
Also shinks the object code size:

Before:
   text    data     bss     dec     hex filename
  12596    2160      64   14820    39e4 drivers/ptp/ptp_qoriq.o

After:
   text    data     bss     dec     hex filename
  12567    2160      64   14791    39c7 drivers/ptp/ptp_qoriq.o

Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet/mlx5: E-Switch, Disable esw manager vport correctly
Bodong Wang [Mon, 18 Feb 2019 03:04:42 +0000 (21:04 -0600)]
net/mlx5: E-Switch, Disable esw manager vport correctly

When disabling vport, relevant vport configurations will be cleaned
up. These cleanups should be done to the vports which had these configs
applied at vport enablement. As esw manager vport didn't have such
vport config applied, cleanup should not touch it.

Fixes: de9e6a8136c5 ("net/mlx5: E-Switch, Properly refer to host PF vport as other vport")
Signed-off-by: Bodong Wang <[email protected]>
Reported-by: Eli Britstein <[email protected]>
Reviewed-by: Or Gerlitz <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
6 years agonet/mlx5: E-Switch, Fix the warning on vport index out of range
Bodong Wang [Mon, 18 Feb 2019 04:23:16 +0000 (22:23 -0600)]
net/mlx5: E-Switch, Fix the warning on vport index out of range

When eswitch gets vport data structure, the index should not be out
of the range of the vport array. Driver mistakenly used vport number
to check the range.

Fixes: 22b8ddc86bf4 ("net/mlx5: E-Switch, Assign a different position for uplink rep and vport")
Signed-off-by: Bodong Wang <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
6 years agonet/mlx5e: Remove unused variable ‘esw’
Saeed Mahameed [Tue, 19 Feb 2019 20:32:53 +0000 (12:32 -0800)]
net/mlx5e: Remove unused variable ‘esw’

Fix the following compiler warning:

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:2770:
warning: unused variable ‘esw’ [-Wunused-variable]

Fixes: 1cd3ab86b713 ("net/mlx5e: Introduce mlx5e_flow_esw_attr_init() helper")
Signed-off-by: Saeed Mahameed <[email protected]>
6 years agonet/mlx5: Delete unused FPGA QPN variable
Leon Romanovsky [Sun, 17 Feb 2019 13:21:28 +0000 (15:21 +0200)]
net/mlx5: Delete unused FPGA QPN variable

fpga_qpn was assigned but never used and compilation with W=1
produced the following warning:

drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c: In function _mlx5_fpga_event_:
drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c:320:6: warning:
variable _fpga_qpn_ set but not used [-Wunused-but-set-variable]
  u32 fpga_qpn;
      ^~~~~~~~

Fixes: 98db16bab59f ("net/mlx5: FPGA, Handle QP error event")
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
6 years agonet/mlx5e: Add missing static function annotation
Leon Romanovsky [Sun, 17 Feb 2019 13:21:27 +0000 (15:21 +0200)]
net/mlx5e: Add missing static function annotation

Compilation with W=1 produces following warning:

drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c:69:6:
warning: no previous prototype for _mlx5e_monitor_counter_start_ [-Wmissing-prototypes]
 void mlx5e_monitor_counter_start(struct mlx5e_priv *priv)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Avoid it by declaring mlx5e_monitor_counter_start() as a static function.

Fixes: 5c7e8bbb0257 ("net/mlx5e: Use monitor counters for update stats")
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
6 years agonet/mlx5e: Remove 'parse_attr' argument in mlx5e_tc_add_fdb_flow()
Tonghao Zhang [Tue, 12 Feb 2019 03:39:43 +0000 (19:39 -0800)]
net/mlx5e: Remove 'parse_attr' argument in mlx5e_tc_add_fdb_flow()

This patch is a little improvement. Simplify the mlx5e_tc_add_fdb_flow().

Signed-off-by: Tonghao Zhang <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
6 years agonet/mlx5e: Introduce mlx5e_flow_esw_attr_init() helper
Tonghao Zhang [Tue, 12 Feb 2019 03:39:42 +0000 (19:39 -0800)]
net/mlx5e: Introduce mlx5e_flow_esw_attr_init() helper

Introduce the mlx5e_flow_esw_attr_init() helper
for simplifying codes.

Signed-off-by: Tonghao Zhang <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
6 years agonet/mlx5e: Remove wrong and superfluous tc pedit header type check
Vlad Buslov [Tue, 12 Feb 2019 17:45:16 +0000 (19:45 +0200)]
net/mlx5e: Remove wrong and superfluous tc pedit header type check

With recent introduction of flow_rule infrastructure drivers no longer
directly include action headers, so it is no longer possible to use
constants defined in them. Instead, one of flow_rule patches substituted
pedit action header constant with hardcoded value '2' in mlx5
set_pedit_val() function conditional which verifies that header type is in
range of values allowed by pedit action. That conditional is now both
wrong (hardcoded value is '2' but __PEDIT_HDR_TYPE_MAX is 6 in current
version) and superfluous (pedit action already verifies that header type is
in allowed range during init). Remove the described check from mlx5 code.

Fixes: 738678817573 ("drivers: net: use flow action infrastructure")
Signed-off-by: Vlad Buslov <[email protected]>
Reviewed-by: Roi Dayan <[email protected]>
Reviewed-by: Dmytro Linkin <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
6 years agonet/mlx5e: Wrap the open and apply of channels in one fail-safe function
Tariq Toukan [Mon, 26 Nov 2018 15:22:16 +0000 (17:22 +0200)]
net/mlx5e: Wrap the open and apply of channels in one fail-safe function

Take into a function the common code structure of opening
a side set of channels followed by a call to apply them.

Signed-off-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
6 years agonet/mlx5: ethtool, Add ethtool support for 50Gbps per lane link modes
Aya Levin [Tue, 22 Jan 2019 08:29:57 +0000 (10:29 +0200)]
net/mlx5: ethtool, Add ethtool support for 50Gbps per lane link modes

In previous patch, driver added new speed modes: 50Gbps per lane support
for 50G/100G/200G.  This patch modifies mlx5e_get_link_ksettings and
mlx5e_set_link_ksettings to set and get these link modes via ethtool.
In order to do so, added mapping of new HW bits to ethtool bitmap and
enforce mutual exclusion between extended link modes and previously
defined link modes.

Signed-off-by: Aya Levin <[email protected]>
Reviewed-by: Eran Ben Elisha <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
6 years agoethtool: Added support for 50Gbps per lane link modes
Aya Levin [Tue, 22 Jan 2019 08:50:10 +0000 (10:50 +0200)]
ethtool: Added support for 50Gbps per lane link modes

Added support for 50Gbps per lane link modes. Define various 50G, 100G
and 200G link modes using it.

Signed-off-by: Aya Levin <[email protected]>
Reviewed-by: Eran Ben Elisha <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
6 years agoMerge branch 'ieee802154-for-davem-2019-02-19' of git://git.kernel.org/pub/scm/linux...
David S. Miller [Tue, 19 Feb 2019 22:10:11 +0000 (14:10 -0800)]
Merge branch 'ieee802154-for-davem-2019-02-19' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next

Stefan Schmidt says:

====================
pull-request: ieee802154-next 2019-02-19

An update from ieee802154 for *net-next*

Another quite quite cycle in the ieee802154 subsystem.
Peter did a rework of the IP frag queue handling to make it use rbtree and get
in line with the core IPv4 and IPv6 implementatiosn in the kernel.
====================

Signed-off-by: David S. Miller <[email protected]>
6 years agonet: ns83820: code cleanup for ns83820_probe_phy()
Mao Wenan [Tue, 19 Feb 2019 13:45:10 +0000 (21:45 +0800)]
net: ns83820: code cleanup for ns83820_probe_phy()

This patch is to do code cleanup for ns83820_probe_phy().
It deletes unused variable 'first', commented out code,
and the pointless 'for' loop.

Signed-off-by: Mao Wenan <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet: rose: add missing dev_put() on error in rose_bind
YueHaibing [Tue, 19 Feb 2019 08:06:22 +0000 (16:06 +0800)]
net: rose: add missing dev_put() on error in rose_bind

when capable check failed, dev_put should
be call before return -EACCES.

Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agonet: dsa: qca8k: Enable delay for RGMII_ID mode
Vinod Koul [Tue, 19 Feb 2019 06:59:43 +0000 (12:29 +0530)]
net: dsa: qca8k: Enable delay for RGMII_ID mode

RGMII_ID specifies that we should have internal delay, so resurrect the
delay addition routine but under the RGMII_ID mode.

Fixes: 40269aa9f40a ("net: dsa: qca8k: disable delay for RGMII mode")
Tested-by: Michal Vokáč <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agovhost: correctly check the return value of translate_desc() in log_used()
Jason Wang [Tue, 19 Feb 2019 06:53:44 +0000 (14:53 +0800)]
vhost: correctly check the return value of translate_desc() in log_used()

When fail, translate_desc() returns negative value, otherwise the
number of iovs. So we should fail when the return value is negative
instead of a blindly check against zero.

Detected by CoverityScan, CID# 1442593:  Control flow issues  (DEADCODE)

Fixes: cc5e71075947 ("vhost: log dirty page correctly")
Acked-by: Michael S. Tsirkin <[email protected]>
Reported-by: Stephen Hemminger <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agoMerge branch 'bnxt_en-Update-for-net-next'
David S. Miller [Tue, 19 Feb 2019 18:45:14 +0000 (10:45 -0800)]
Merge branch 'bnxt_en-Update-for-net-next'

Michael Chan says:

====================
bnxt_en: Update for net-next.

This series includes the usual firmware spec. update, a PCI ID addition,
enhancements for VF trust, MDIO read/write for external PHY, and
fixing the return code when TC flow offload fails.
====================

Signed-off-by: David S. Miller <[email protected]>
6 years agobnxt_en: Return relevant error code when offload fails
Sriharsha Basavapatna [Tue, 19 Feb 2019 10:31:16 +0000 (05:31 -0500)]
bnxt_en: Return relevant error code when offload fails

The driver returns -ENOSPC when tc_can_offload() check fails. Since that
routine checks for flow parameters that are not supported by the driver,
we should return the more appropriate -EOPNOTSUPP.

Signed-off-by: Sriharsha Basavapatna <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agobnxt_en: Add support for mdio read/write to external PHY
Vasundhara Volam [Tue, 19 Feb 2019 10:31:15 +0000 (05:31 -0500)]
bnxt_en: Add support for mdio read/write to external PHY

Add support for SIOCGMIIREG and SIOCSMIIREG ioctls to
mdio read/write to external PHY.

Signed-off-by: Vasundhara Volam <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
6 years agobnxt_en: Propagate trusted VF attribute to firmware.
Michael Chan [Tue, 19 Feb 2019 10:31:14 +0000 (05:31 -0500)]
bnxt_en: Propagate trusted VF attribute to firmware.

Newer firmware understands the concept of a trusted VF, so propagate the
trusted VF attribute set by the PF admin. to the firmware.  Also, check
the firmware trusted setting when considering the VF MAC address change
and reporting the trusted setting to the user.

Signed-off-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This page took 0.110333 seconds and 4 git commands to generate.