]> Git Repo - linux.git/log
linux.git
4 years agodocs: networking: convert tproxy.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:32 +0000 (18:04 +0200)]
docs: networking: convert tproxy.txt to ReST

- add SPDX header;
- adjust title markup;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert timestamping.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:31 +0000 (18:04 +0200)]
docs: networking: convert timestamping.txt to ReST

- add SPDX header;
- add a document title;
- adjust titles and chapters, adding proper markups;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert team.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:30 +0000 (18:04 +0200)]
docs: networking: convert team.txt to ReST

Not much to be done here:
- add SPDX header;
- add a document title;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert tcp-thin.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:29 +0000 (18:04 +0200)]
docs: networking: convert tcp-thin.txt to ReST

Not much to be done here:

- add SPDX header;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert tc-actions-env-rules.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:28 +0000 (18:04 +0200)]
docs: networking: convert tc-actions-env-rules.txt to ReST

- add SPDX header;
- add a document title;
- use the right numbered list markup;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert switchdev.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:27 +0000 (18:04 +0200)]
docs: networking: convert switchdev.txt to ReST

- add SPDX header;
- use copyright symbol;
- adjust title markup;
- mark code blocks and literals as such;
- mark tables as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert strparser.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:26 +0000 (18:04 +0200)]
docs: networking: convert strparser.txt to ReST

- add SPDX header;
- adjust title markup;
- mark code blocks and literals as such;
- mark tables as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert skfp.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:25 +0000 (18:04 +0200)]
docs: networking: convert skfp.txt to ReST

- add SPDX header;
- use copyright symbol;
- add a document title;
- adjust titles and chapters, adding proper markups;
- comment out text-only TOC from html/pdf output;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert seg6-sysctl.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:24 +0000 (18:04 +0200)]
docs: networking: convert seg6-sysctl.txt to ReST

- add SPDX header;
- mark code blocks and literals as such;
- add a document title;
- adjust chapters, adding proper markups;
- mark lists as such;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert secid.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:23 +0000 (18:04 +0200)]
docs: networking: convert secid.txt to ReST

Not much to be done here:
- add SPDX header;
- add a document title;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert sctp.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:22 +0000 (18:04 +0200)]
docs: networking: convert sctp.txt to ReST

- add SPDX header;
- add a document title;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Acked-by: Marcelo Ricardo Leitner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert rxrpc.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:21 +0000 (18:04 +0200)]
docs: networking: convert rxrpc.txt to ReST

- add SPDX header;
- adjust title markup;
- use autonumbered list markups;
- mark code blocks and literals as such;
- mark tables as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert regulatory.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:20 +0000 (18:04 +0200)]
docs: networking: convert regulatory.txt to ReST

- add SPDX header;
- adjust title markup;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert rds.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:19 +0000 (18:04 +0200)]
docs: networking: convert rds.txt to ReST

- add SPDX header;
- add a document title;
- mark code blocks and literals as such;
- mark tables as such;
- mark lists as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert ray_cs.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:18 +0000 (18:04 +0200)]
docs: networking: convert ray_cs.txt to ReST

- add SPDX header;
- use copyright symbol;
- add a document title;
- mark code blocks and literals as such;
- mark tables as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert radiotap-headers.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:17 +0000 (18:04 +0200)]
docs: networking: convert radiotap-headers.txt to ReST

- add SPDX header;
- adjust title markup;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert proc_net_tcp.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:16 +0000 (18:04 +0200)]
docs: networking: convert proc_net_tcp.txt to ReST

- add SPDX header;
- add a document title;
- mark code blocks and literals as such;
- mark tables as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert ppp_generic.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:15 +0000 (18:04 +0200)]
docs: networking: convert ppp_generic.txt to ReST

- add SPDX header;
- adjust title markup;
- mark code blocks and literals as such;
- mark tables as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert PLIP.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:14 +0000 (18:04 +0200)]
docs: networking: convert PLIP.txt to ReST

- add SPDX header;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert pktgen.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:13 +0000 (18:04 +0200)]
docs: networking: convert pktgen.txt to ReST

- add SPDX header;
- adjust title markup;
- use bold markups on a few places;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert phonet.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:12 +0000 (18:04 +0200)]
docs: networking: convert phonet.txt to ReST

- add SPDX header;
- adjust title markup;
- use copyright symbol;
- add notes markups;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Acked-by: RĂ©mi Denis-Courmont <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert packet_mmap.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:11 +0000 (18:04 +0200)]
docs: networking: convert packet_mmap.txt to ReST

This patch has a big diff, but most are due to whitespaces.

Yet, the conversion is similar to other files under networking:

- add SPDX header;
- add a document title;
- adjust titles and chapters, adding proper markups;
- mark lists as such;
- mark tables as such;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert operstates.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:10 +0000 (18:04 +0200)]
docs: networking: convert operstates.txt to ReST

- add SPDX header;
- add a document title;
- adjust chapters, adding proper markups;
- mark lists as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert openvswitch.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:09 +0000 (18:04 +0200)]
docs: networking: convert openvswitch.txt to ReST

- add SPDX header;
- adjust title markup;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert nf_flowtable.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:08 +0000 (18:04 +0200)]
docs: networking: convert nf_flowtable.txt to ReST

- add SPDX header;
- adjust title markup;
- mark code blocks and literals as such;
- add notes markups;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert nf_conntrack-sysctl.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:07 +0000 (18:04 +0200)]
docs: networking: convert nf_conntrack-sysctl.txt to ReST

- add SPDX header;
- add a document title;
- mark lists as such;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert netif-msg.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:06 +0000 (18:04 +0200)]
docs: networking: convert netif-msg.txt to ReST

- add SPDX header;
- adjust title and chapter markups;
- mark lists as such;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert netfilter-sysctl.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:05 +0000 (18:04 +0200)]
docs: networking: convert netfilter-sysctl.txt to ReST

Not much to be done here:

- add SPDX header;
- add a document title;
- add a chapter markup;
- mark tables as such;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert netdevices.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:04 +0000 (18:04 +0200)]
docs: networking: convert netdevices.txt to ReST

- add SPDX header;
- adjust title markup;
- mark lists as such;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert netdev-features.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:03 +0000 (18:04 +0200)]
docs: networking: convert netdev-features.txt to ReST

Not much to be done here:

- add SPDX header;
- adjust titles and chapters, adding proper markups;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert netconsole.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:02 +0000 (18:04 +0200)]
docs: networking: convert netconsole.txt to ReST

- add SPDX header;
- add a document title;
- mark code blocks and literals as such;
- mark tables as such;
- add notes markups;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert multiqueue.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:01 +0000 (18:04 +0200)]
docs: networking: convert multiqueue.txt to ReST

- add SPDX header;
- adjust titles and chapters, adding proper markups;
- mark code blocks and literals as such;
- use :field: markup;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert mpls-sysctl.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:04:00 +0000 (18:04 +0200)]
docs: networking: convert mpls-sysctl.txt to ReST

- add SPDX header;
- add a document title;
- mark lists as such;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert mac80211-injection.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:03:59 +0000 (18:03 +0200)]
docs: networking: convert mac80211-injection.txt to ReST

- add SPDX header;
- adjust title markup;
- mark code blocks and literals as such;
- mark tables as such;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert ltpc.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:03:58 +0000 (18:03 +0200)]
docs: networking: convert ltpc.txt to ReST

- add SPDX header;
- add a document title;
- mark code blocks and literals as such;
- mark tables as such;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert lapb-module.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:03:57 +0000 (18:03 +0200)]
docs: networking: convert lapb-module.txt to ReST

- add SPDX header;
- adjust title markup;
- mark code blocks and literals as such;
- mark tables as such;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodocs: networking: convert l2tp.txt to ReST
Mauro Carvalho Chehab [Thu, 30 Apr 2020 16:03:56 +0000 (18:03 +0200)]
docs: networking: convert l2tp.txt to ReST

- add SPDX header;
- add a document title;
- mark tables as such;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agoMerge branch 'inet_diag-add-cgroup-attribute-and-filter'
David S. Miller [Thu, 30 Apr 2020 19:54:02 +0000 (12:54 -0700)]
Merge branch 'inet_diag-add-cgroup-attribute-and-filter'

Dmitry Yakunin says:

====================
inet_diag: add cgroup attribute and filter

This patch series extends inet diag with cgroup v2 ID attribute and
filter. Which allows investigate sockets on per cgroup basis. Patch for
ss is already sent to iproute2-next mailing list.
====================

Signed-off-by: David S. Miller <[email protected]>
4 years agoinet_diag: add support for cgroup filter
Dmitry Yakunin [Thu, 30 Apr 2020 15:51:15 +0000 (18:51 +0300)]
inet_diag: add support for cgroup filter

This patch adds ability to filter sockets based on cgroup v2 ID.
Such filter is helpful in ss utility for filtering sockets by
cgroup pathname.

Signed-off-by: Dmitry Yakunin <[email protected]>
Reviewed-by: Konstantin Khlebnikov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agoinet_diag: add cgroup id attribute
Dmitry Yakunin [Thu, 30 Apr 2020 15:51:14 +0000 (18:51 +0300)]
inet_diag: add cgroup id attribute

This patch adds cgroup v2 ID to common inet diag message attributes.
Cgroup v2 ID is kernfs ID (ino or ino+gen). This attribute allows filter
inet diag output by cgroup ID obtained by name_to_handle_at() syscall.
When net_cls or net_prio cgroup is activated this ID is equal to 1 (root
cgroup ID) for newly created sockets.

Some notes about this ID:

1) gets initialized in socket() syscall
2) incoming socket gets ID from listening socket
   (not during accept() syscall)
3) not changed when process get moved to another cgroup
4) can point to deleted cgroup (refcounting)

v2:
  - use CONFIG_SOCK_CGROUP_DATA instead if CONFIG_CGROUPS

v3:
  - fix attr size by using nla_total_size_64bit() (Eric Dumazet)
  - more detailed commit message (Konstantin Khlebnikov)

Signed-off-by: Dmitry Yakunin <[email protected]>
Reviewed-by: Konstantin Khlebnikov <[email protected]>
Acked-By: Tejun Heo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agoMerge branch 'stmmac-intel-Fixes-and-cleanups-after-dwmac-intel-split'
David S. Miller [Thu, 30 Apr 2020 19:50:16 +0000 (12:50 -0700)]
Merge branch 'stmmac-intel-Fixes-and-cleanups-after-dwmac-intel-split'

Andy Shevchenko says:

====================
stmmac: intel: Fixes and cleanups after dwmac-intel split

Seems the split of dwmac-intel didn't go well and on top of that new
functionality in the driver has not been properly tested.

Patch 1 fixes a nasty kernel crash due to missed error handling.
Patches 2 and 3 fix the incorrect split (clock and PCI bar handling).

Patch 4 converts driver to use new PCI IRQ allocation API.

The rest is a set of clean ups that may have been done in the initial
submission.

Series has been tested on couple of Elkhart Lake platforms with different
behaviour of ethernet hardware.

Changelog v3:
- added the cover letter (David)
- appended separate fix as a first patch
- marked patches 2 and 3 with Fixes tag
====================

Signed-off-by: David S. Miller <[email protected]>
4 years agostmmac: intel: Place object in the Makefile according to the order
Andy Shevchenko [Thu, 30 Apr 2020 15:02:54 +0000 (18:02 +0300)]
stmmac: intel: Place object in the Makefile according to the order

Follow the order for the platform drivers, i.e. generic object are going first.

Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agostmmac: intel: Fix indentation to put on one line affected code
Andy Shevchenko [Thu, 30 Apr 2020 15:02:53 +0000 (18:02 +0300)]
stmmac: intel: Fix indentation to put on one line affected code

There is no competition to get more LOCs into the kernel, and driver can look
better and have improved readability without those additional line breaks.

While at it, shorten info structures that they are all PCI, at the end it's
a PCI driver for Intel hardware.

Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agostmmac: intel: Eliminate useless conditions and variables
Andy Shevchenko [Thu, 30 Apr 2020 15:02:52 +0000 (18:02 +0300)]
stmmac: intel: Eliminate useless conditions and variables

There are useless conditions like

func()
{
...
int ret;
...
ret = foo();
if (ret)
return ret;

return 0;
}

which may be replaced with direct return statement, what we have done here.

Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agostmmac: intel: Convert to use pci_alloc_irq_vectors() API
Andy Shevchenko [Thu, 30 Apr 2020 15:02:51 +0000 (18:02 +0300)]
stmmac: intel: Convert to use pci_alloc_irq_vectors() API

pci_enable_msi() is deprecated API, thus, switch to modern
pci_alloc_irq_vectors().

Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agostmmac: intel: Remove unnecessary loop for PCI BARs
Andy Shevchenko [Thu, 30 Apr 2020 15:02:50 +0000 (18:02 +0300)]
stmmac: intel: Remove unnecessary loop for PCI BARs

Copy'n'paste without thinking is not a good idea and in this case it brought
unnecessary loop over PCI BAR resources which was needed to workaround one of
STMicro RVP boards. Remove unnecessary loops from Intel driver.

Fixes: 58da0cfa6cf1 ("net: stmmac: create dwmac-intel.c to contain all Intel platform")
Cc: Voon Weifeng <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agostmmac: intel: Fix clock handling on error and remove paths
Andy Shevchenko [Thu, 30 Apr 2020 15:02:49 +0000 (18:02 +0300)]
stmmac: intel: Fix clock handling on error and remove paths

clk_prepare_enable() might fail, we have to check its returned value.
Besides that we have to call clk_disable_unprepare() on the error and
remove paths. Do above in the dwmac-intel driver.

While at it, remove leftover in stmmac_pci and remove unneeded condition
for NULL-aware clk_unregister_fixed_rate() call.

Fixes: 58da0cfa6cf1 ("net: stmmac: create dwmac-intel.c to contain all Intel platform")
Cc: Voon Weifeng <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agostmmac: intel: Fix kernel crash due to wrong error path
Andy Shevchenko [Thu, 30 Apr 2020 15:02:48 +0000 (18:02 +0300)]
stmmac: intel: Fix kernel crash due to wrong error path

Unfortunately sometimes ->probe() may fail. The commit b9663b7ca6ff
("net: stmmac: Enable SERDES power up/down sequence")
messed up with error handling and thus:

[   12.811311] ------------[ cut here ]------------
[   12.811993] kernel BUG at net/core/dev.c:9937!

Fix this by properly crafted error path.

Fixes: b9663b7ca6ff ("net: stmmac: Enable SERDES power up/down sequence")
Cc: Voon Weifeng <[email protected]>
Cc: Ong Boon Leong <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agoMerge branch 'net-smc-add-event-based-framework-for-LLC-msgs'
David S. Miller [Thu, 30 Apr 2020 19:44:34 +0000 (12:44 -0700)]
Merge branch 'net-smc-add-event-based-framework-for-LLC-msgs'

Karsten Graul says:

====================
net/smc: add event-based framework for LLC msgs

These patches are the next step towards SMC-R link failover support. They add
a new framework to handle Link Layer Control (LLC) messages and adapt the
existing code to use the new framework.
====================

Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: remove obsolete link state DELETING
Karsten Graul [Thu, 30 Apr 2020 13:55:51 +0000 (15:55 +0200)]
net/smc: remove obsolete link state DELETING

The connection layer in af_smc.c is now using the new LLC flow
framework, which made the link state DELETING obsolete. Remove the state
and the respective helpers.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: remove handling of CONFIRM_RKEY_CONTINUE
Karsten Graul [Thu, 30 Apr 2020 13:55:50 +0000 (15:55 +0200)]
net/smc: remove handling of CONFIRM_RKEY_CONTINUE

The new SMC-R multiple link support will support a maximum of 3 links,
and one CONFIRM_RKEY LLC message can transport 3 rkeys of an rmb buffer.
There is no need for the LLC message type CONFIRM_RKEY_CONTINUE which is
needed when more than 3 rkeys per rmb buffer needs to be exchanged.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: adapt SMC remote DELETE_RKEY processing to use the LLC flow
Karsten Graul [Thu, 30 Apr 2020 13:55:49 +0000 (15:55 +0200)]
net/smc: adapt SMC remote DELETE_RKEY processing to use the LLC flow

Use the LLC flow framework for the processing of DELETE_RKEY messages
that were received from the peer.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: adapt SMC remote CONFIRM_RKEY processing to use the LLC flow
Karsten Graul [Thu, 30 Apr 2020 13:55:48 +0000 (15:55 +0200)]
net/smc: adapt SMC remote CONFIRM_RKEY processing to use the LLC flow

Use the LLC flow framework for the processing of CONFIRM_RKEY messages
that were received from the peer.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: new smc_rtoken_set functions for multiple link support
Karsten Graul [Thu, 30 Apr 2020 13:55:47 +0000 (15:55 +0200)]
net/smc: new smc_rtoken_set functions for multiple link support

Introduce smc_rtoken_set() to set the rtoken for a new link to an
existing rmb whose rtoken is given, and smc_rtoken_set2() to set an
rtoken for a new link whose link_id is given.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: move the TEST_LINK response processing into event handler
Karsten Graul [Thu, 30 Apr 2020 13:55:46 +0000 (15:55 +0200)]
net/smc: move the TEST_LINK response processing into event handler

Get rid of the extra function and move the two-liner for the TEST_LINK
response processing into the event handler function.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: multiple link support and LLC flow for smc_llc_do_delete_rkey
Karsten Graul [Thu, 30 Apr 2020 13:55:45 +0000 (15:55 +0200)]
net/smc: multiple link support and LLC flow for smc_llc_do_delete_rkey

Adapt smc_llc_do_delete_rkey() to use the LLC flow and support multiple
links when deleting the rkeys for rmb buffers at the peer.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: multiple link support and LLC flow for smc_llc_do_confirm_rkey
Karsten Graul [Thu, 30 Apr 2020 13:55:44 +0000 (15:55 +0200)]
net/smc: multiple link support and LLC flow for smc_llc_do_confirm_rkey

Adapt smc_llc_do_confirm_rkey() to use the LLC flow and support the
rkeys of multiple links when the CONFIRM_RKEY LLC message is build.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: adapt SMC client code to use the LLC flow
Karsten Graul [Thu, 30 Apr 2020 13:55:43 +0000 (15:55 +0200)]
net/smc: adapt SMC client code to use the LLC flow

Change the code that processes the SMC client part of connection
establishment to use the LLC flow framework (CONFIRM_LINK request
messages).

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: adapt SMC server code to use the LLC flow
Karsten Graul [Thu, 30 Apr 2020 13:55:42 +0000 (15:55 +0200)]
net/smc: adapt SMC server code to use the LLC flow

Change the code that processes the SMC server part of connection
establishment to use the LLC flow framework (CONFIRM_LINK response
messages).

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: add logic to evaluate CONFIRM_LINK messages to LLC layer
Karsten Graul [Thu, 30 Apr 2020 13:55:41 +0000 (15:55 +0200)]
net/smc: add logic to evaluate CONFIRM_LINK messages to LLC layer

Introduce smc_llc_eval_conf_link() to evaluate the CONFIRM_LINK message
contents. This implements this logic at the LLC layer. The function will
be used by af_smc.c to process the received LLC layer messages.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: introduce link group type
Karsten Graul [Thu, 30 Apr 2020 13:55:40 +0000 (15:55 +0200)]
net/smc: introduce link group type

Add a type field to the link group which reflects the current link group
redundancy state.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: enqueue all received LLC messages
Karsten Graul [Thu, 30 Apr 2020 13:55:39 +0000 (15:55 +0200)]
net/smc: enqueue all received LLC messages

Introduce smc_llc_enqueue() to enqueue LLC messages, and adapt
smc_llc_rx_handler() to enqueue all received LLC messages.
smc_llc_enqueue() also makes it possible to enqueue LLC messages from
local code.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: add event-based llc_flow framework
Karsten Graul [Thu, 30 Apr 2020 13:55:38 +0000 (15:55 +0200)]
net/smc: add event-based llc_flow framework

The new framework allows to start specific types of LLC control flows,
protects active flows and makes it possible to wait for flows to finish
before starting a new flow.
This mechanism is used for the LLC control layer to model flows like
'add link' or 'delete link' which need to send/receive several LLC
messages and are not allowed to get interrupted by the wrong type of
messages.
'Add link' or 'Delete link' messages arriving in the middle of a flow
are delayed and processed when the current flow finished.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/faraday: Fix unnecessary check in ftmac100_probe()
Tang Bin [Thu, 30 Apr 2020 12:15:31 +0000 (20:15 +0800)]
net/faraday: Fix unnecessary check in ftmac100_probe()

The function ftmac100_probe() is only called with an openfirmware
platform device. Therefore there is no need to check that the passed
in device is NULL.

Signed-off-by: Zhang Shengju <[email protected]>
Signed-off-by: Tang Bin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agorionet: Fix use correct return type for ndo_start_xmit()
Yunjian Wang [Thu, 30 Apr 2020 11:26:40 +0000 (19:26 +0800)]
rionet: Fix use correct return type for ndo_start_xmit()

The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix
the ndo function to use the correct type.

Signed-off-by: Yunjian Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet: caif: Fix use correct return type for ndo_start_xmit()
Yunjian Wang [Thu, 30 Apr 2020 10:16:16 +0000 (18:16 +0800)]
net: caif: Fix use correct return type for ndo_start_xmit()

The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix
the ndo function to use the correct type.

Signed-off-by: Yunjian Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agoMerge branch 'net-phy-mdio-add-IPQ40xx-MDIO-support'
David S. Miller [Thu, 30 Apr 2020 19:11:14 +0000 (12:11 -0700)]
Merge branch 'net-phy-mdio-add-IPQ40xx-MDIO-support'

Robert Marko says:

====================
net: phy: mdio: add IPQ40xx MDIO support

This patch series provides support for the IPQ40xx built-in MDIO interface.
Included are driver, devicetree bindings for it and devicetree node.
====================

Signed-off-by: David S. Miller <[email protected]>
4 years agoARM: dts: qcom: ipq4019: add MDIO node
Robert Marko [Thu, 30 Apr 2020 09:07:07 +0000 (11:07 +0200)]
ARM: dts: qcom: ipq4019: add MDIO node

This patch adds the necessary MDIO interface node
to the Qualcomm IPQ4019 DTSI.

Built-in QCA8337N switch is managed using it,
and since we have a driver for it lets add it.

Signed-off-by: Christian Lamparter <[email protected]>
Signed-off-by: Robert Marko <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Cc: Luka Perkov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agodt-bindings: add Qualcomm IPQ4019 MDIO bindings
Robert Marko [Thu, 30 Apr 2020 09:07:06 +0000 (11:07 +0200)]
dt-bindings: add Qualcomm IPQ4019 MDIO bindings

This patch adds the binding document for the IPQ40xx MDIO driver.

Signed-off-by: Robert Marko <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Cc: Luka Perkov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet: phy: mdio: add IPQ4019 MDIO driver
Robert Marko [Thu, 30 Apr 2020 09:07:05 +0000 (11:07 +0200)]
net: phy: mdio: add IPQ4019 MDIO driver

This patch adds the driver for the MDIO interface
inside of Qualcomm IPQ40xx series SoC-s.

Signed-off-by: Christian Lamparter <[email protected]>
Signed-off-by: Robert Marko <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Cc: Luka Perkov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agohinic: Use ARRAY_SIZE for nic_vf_cmd_msg_handler
Zou Wei [Thu, 30 Apr 2020 01:51:31 +0000 (09:51 +0800)]
hinic: Use ARRAY_SIZE for nic_vf_cmd_msg_handler

fix coccinelle warning, use ARRAY_SIZE

drivers/net/ethernet/huawei/hinic/hinic_sriov.c:713:43-44: WARNING: Use ARRAY_SIZE

v1-->v2:
   remove cmd_number

v2-->v3:
   preserve the reverse christmas tree ordering of local variables

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zou Wei <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agohinic: make a bunch of functions static
YueHaibing [Thu, 30 Apr 2020 01:32:45 +0000 (09:32 +0800)]
hinic: make a bunch of functions static

These fucntions is used only in hinic_sriov.c,
so make them static to fix sparse warnings.

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/mlx5e: Unify reserving space for WQEs
Maxim Mikityanskiy [Thu, 16 Apr 2020 08:29:49 +0000 (11:29 +0300)]
net/mlx5e: Unify reserving space for WQEs

In our fast-path design, a WQE (Work Queue Element) must not cross the
page boundary. To enforce that, for WQEs consisting of more than one BB
(Basic Block), the driver checks the available contiguous space in the
WQ in advance, and if it's not enough, it pads it with NOPs.

This patch modifies the code that calculates the position of next WQE,
considering the padding, and prepares the WQE. This code is common for
all SQ types. In this patch it's reorganized in a way that makes the
usage pattern unified for all SQ types, and makes the implementations
self-contained and look almost the same, preparing the repeating code to
further attempts to deduplicate it.

One place is left as is: mlx5e_sq_xmit and mlx5e_fill_sq_frag_edge call
inside, because it is special in a way that it may also copy WQE's cseg
and eseg when reserving space. This will be eliminated in one of the
following patches, and this place will be converted to the new approach,
too.

Signed-off-by: Maxim Mikityanskiy <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5e: Rename ICOSQ WQE info struct and field
Maxim Mikityanskiy [Thu, 16 Apr 2020 08:32:42 +0000 (11:32 +0300)]
net/mlx5e: Rename ICOSQ WQE info struct and field

Structs mlx5e_txqsq and mlx5e_xdpsq contain wqe_info arrays to store
supplementary information corresponding to WQEs in the queue. Struct
mlx5e_icosq also has such an array, but it's called differently -
ico_wqe. This patch renames it to unify with the other SQs.

In addition, rename the struct to emphasize its specific usage.

Signed-off-by: Maxim Mikityanskiy <[email protected]>
Signed-off-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5e: Fetch WQE: reuse code and enforce typing
Maxim Mikityanskiy [Fri, 15 Nov 2019 11:48:38 +0000 (13:48 +0200)]
net/mlx5e: Fetch WQE: reuse code and enforce typing

There are multiple functions mlx5{e,i}_*_fetch_wqe that contain the same
code, that is repeated, because they operate on different SQ struct
types. mlx5e_sq_fetch_wqe also returns void *, instead of the concrete
WQE type.

This commit generalizes the fetch WQE operation by putting this code
into a single function. To simplify calls of the generic function in
concrete use cases, macros are provided that substitute the right WQE
size and cast the return type.

Before this patch, fetch_wqe used to calculate pi itself, but the value
was often known to the caller. This calculation is moved outside to
eliminate this unnecessary step and prepare for the fill_frag_edge
refactoring in the next patch.

Signed-off-by: Maxim Mikityanskiy <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5e: XDP, Print the offending TX descriptor on error completion
Tariq Toukan [Sun, 9 Feb 2020 15:13:23 +0000 (17:13 +0200)]
net/mlx5e: XDP, Print the offending TX descriptor on error completion

Upon an error completion on an XDP SQ, print the offending WQE
to ease the debug process.

Signed-off-by: Tariq Toukan <[email protected]>
Reviewed-by: Aya Levin <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5e: TX, Generalise code and usage of error CQE dump
Tariq Toukan [Sun, 9 Feb 2020 15:06:49 +0000 (17:06 +0200)]
net/mlx5e: TX, Generalise code and usage of error CQE dump

Error CQE was dumped only for TXQ SQs.
Generalise the function, and add usage for error completions
on ICO SQs and XDP SQs.

Signed-off-by: Tariq Toukan <[email protected]>
Reviewed-by: Aya Levin <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5e: Use proper name field for the UMR key
Tariq Toukan [Thu, 8 Aug 2019 09:32:17 +0000 (12:32 +0300)]
net/mlx5e: Use proper name field for the UMR key

Even though some of the WQE control segment's field share
the same memory bits (a union of fields), prefer having the
right field name for every different usage.

Signed-off-by: Tariq Toukan <[email protected]>
Reviewed-by: Maxim Mikityanskiy <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5: Add support for release all pages event
Eran Ben Elisha [Wed, 1 Apr 2020 07:30:32 +0000 (10:30 +0300)]
net/mlx5: Add support for release all pages event

If FW sets release_all_pages bit in MLX5_EVENT_TYPE_PAGE_REQUEST,
driver shall release all pages of a given function id, with no further
pages reclaim negotiation with FW nor MANAGE_PAGES commands from driver
towards FW.

Upon receiving this bit as part of pages reclaim event, driver will
initiate release all flow, in which it will iterate and release all
function's pages.

As part of driver <-> FW capabilities handshake, FW will report
release_all_pages max HCA cap bit, and driver will set the
release_all_pages bit in HCA cap.

NIC: ConnectX-4 Lx
CPU: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
Test case: Simulataniously FLR 4 VFs, and measure FW release pages by
driver.
Before: 3.18 Sec
After:  0.31 Sec

Signed-off-by: Eran Ben Elisha <[email protected]>
Reviewed-by: Moshe Shemesh <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5: Rate limit page not found error messages
Eran Ben Elisha [Sun, 19 Apr 2020 07:20:40 +0000 (10:20 +0300)]
net/mlx5: Rate limit page not found error messages

Thousands of pages are released with free_addr() function. In case of
buggy sync between FW and driver on released address, the log will be
flooded with error messages. Use mlx5_core_warn_rl() to limit it.

Signed-off-by: Eran Ben Elisha <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5: Add helper function to release fw page
Eran Ben Elisha [Mon, 30 Mar 2020 11:27:08 +0000 (14:27 +0300)]
net/mlx5: Add helper function to release fw page

Factor out the fwp address release page to an helper function, will be
used in the downstream patch.

Signed-off-by: Eran Ben Elisha <[email protected]>
Reviewed-by: Moshe Shemesh <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5: Remove unused field in EQ
Tariq Toukan [Wed, 15 Apr 2020 16:34:03 +0000 (19:34 +0300)]
net/mlx5: Remove unused field in EQ

The size field in EQ is not in use.
Remove it.

Signed-off-by: Tariq Toukan <[email protected]>
Reviewed-by: Tal Gilboa <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5: CT: Remove unused variables
Paul Blakey [Tue, 14 Apr 2020 08:30:39 +0000 (11:30 +0300)]
net/mlx5: CT: Remove unused variables

Signed-off-by: Paul Blakey <[email protected]>
Reviewed-by: Oz Shlomo <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5e: CT: Avoid false warning about rule may be used uninitialized
Roi Dayan [Sun, 26 Apr 2020 06:52:02 +0000 (09:52 +0300)]
net/mlx5e: CT: Avoid false warning about rule may be used uninitialized

Avoid gcc warning by preset rule to invalid ptr.

Fixes: 4c3844d9e97e ("net/mlx5e: CT: Introduce connection tracking")
Signed-off-by: Roi Dayan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5e: Remove unneeded semicolon
Zheng Bin [Fri, 24 Apr 2020 08:43:57 +0000 (16:43 +0800)]
net/mlx5e: Remove unneeded semicolon

Fixes coccicheck warning:

drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c:690:2-3: Unneeded semicolon

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zheng Bin <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5e: Use helper API to get devlink port index for all port flavours
Parav Pandit [Fri, 3 Apr 2020 10:49:02 +0000 (05:49 -0500)]
net/mlx5e: Use helper API to get devlink port index for all port flavours

Use existing helper API to get unique devlink port index for all
devlink port flavours.

Reviewed-by: Jiri Pirko <[email protected]>
Signed-off-by: Parav Pandit <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agonet/mlx5: IPsec, Fix coverity issue
Raed Salem [Wed, 22 Apr 2020 06:19:08 +0000 (09:19 +0300)]
net/mlx5: IPsec, Fix coverity issue

The cited commit introduced the following coverity issue at functions
mlx5_fpga_is_ipsec_device() and mlx5_fpga_ipsec_release_sa_ctx():
- bit_and_with_zero:
  accel_xfrm->attrs.action & MLX5_ACCEL_ESP_ACTION_DECRYPT is always 0.

As MLX5_ACCEL_ESP_ACTION_DECRYPT is not a bitwise flag and was wrongly
used with bitwise operation, the above expression is always zero value
as MLX5_ACCEL_ESP_ACTION_DECRYPT is zero.

Fix by using "==" comparison operator instead.

Fixes: 7dfee4b1d79e ("net/mlx5: IPsec, Refactor SA handle creation and destruction")
Signed-off-by: Raed Salem <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
4 years agoMerge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox...
Saeed Mahameed [Thu, 30 Apr 2020 16:46:19 +0000 (09:46 -0700)]
Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux

mlx5 updates for both net-next and rdma-next:

1) HW bits and definitions for TLS and IPsec offlaods
2) Release all pages capability bits
3) New command interface helpers and some code cleanup as a result
4) Move qp.c out of mlx5 core driver into mlx5_ib rdma driver

Signed-off-by: Saeed Mahameed <[email protected]>
4 years agoMerge branch 'net-bcmgenet-add-support-for-Wake-on-Filter'
David S. Miller [Wed, 29 Apr 2020 23:55:22 +0000 (16:55 -0700)]
Merge branch 'net-bcmgenet-add-support-for-Wake-on-Filter'

Doug Berger says:

====================
net: bcmgenet: add support for Wake on Filter

Changes in v2:
Corrected Signed-off-by for commit 3/7.

This commit set adds support for waking from 'standby' using a
Rx Network Flow Classification filter specified with ethtool.

The first two commits are bug fixes that should be applied to the
stable branches, but are included in this patch set to reduce merge
conflicts that might occur if not applied before the other commits
in this set.

The next commit consolidates WoL clock managment as a part of the
overall WoL configuration.

The next commit restores a set of functions that were removed from
the driver just prior to the 4.9 kernel release.

The following commit relocates the functions in the file to prevent
the need for additional forward declarations.

Next, support for the Rx Network Flow Classification interface of
ethtool is added.

Finally, support for the WAKE_FILTER wol method is added.
====================

Signed-off-by: David S. Miller <[email protected]>
4 years agonet: bcmgenet: add WAKE_FILTER support
Doug Berger [Wed, 29 Apr 2020 20:02:06 +0000 (13:02 -0700)]
net: bcmgenet: add WAKE_FILTER support

This commit enables support for the WAKE_FILTER method of Wake on
LAN for the GENET driver. The method can be enabled by adding 'f'
to the interface 'wol' setting specified by ethtool.

Rx network flow rules can be specified using ethtool. Rules that
define a flow-type with the RX_CLS_FLOW_WAKE action (i.e. -2) can
wake the system from the 'standby' power state when the WAKE_FILTER
WoL method is enabled.

Signed-off-by: Doug Berger <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet: bcmgenet: add support for ethtool rxnfc flows
Doug Berger [Wed, 29 Apr 2020 20:02:05 +0000 (13:02 -0700)]
net: bcmgenet: add support for ethtool rxnfc flows

This commit enables driver support for ethtool commands of this form:
ethtool -N|-U|--config-nfc|--config-ntuple devname
    flow-type ether|ip4
    [src xx:yy:zz:aa:bb:cc [m xx:yy:zz:aa:bb:cc]]
    [dst xx:yy:zz:aa:bb:cc [m xx:yy:zz:aa:bb:cc]] [proto N [m N]]
    [src-ip x.x.x.x [m x.x.x.x]] [dst-ip x.x.x.x [m x.x.x.x]] [tos N [m N]]
    [l4proto N [m N]] [src-port N [m N]] [dst-port N [m N]] [spi N [m N]]
    [l4data N [m N]] [vlan-etype N [m N]] [vlan N [m N]]
    [dst-mac xx:yy:zz:aa:bb:cc [m xx:yy:zz:aa:bb:cc]] [action 0] [loc N] |
    delete N

Since there is only one Rx Ring in this implementation action 0 behaves no
differently from not specifying a rule.

The rules can be seen with ethtool commands of this form:
ethtool -n|-u|--show-nfc|--show-ntuple devname [rule N]

Signed-off-by: Doug Berger <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet: bcmgenet: code movement
Doug Berger [Wed, 29 Apr 2020 20:02:04 +0000 (13:02 -0700)]
net: bcmgenet: code movement

The Hardware Filter Block code will be used by ethtool functions
when defining flow types so this commit moves the functions in the
file to prevent the need for prototype declarations.

This is broken out to facilitate review.

Signed-off-by: Doug Berger <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agoRevert "net: bcmgenet: remove unused function in bcmgenet.c"
Doug Berger [Wed, 29 Apr 2020 20:02:03 +0000 (13:02 -0700)]
Revert "net: bcmgenet: remove unused function in bcmgenet.c"

This reverts commit e2072600a24161b7ddcfb26814f69f5fbc8ef85a.

This commit restores the previous implementation of Hardware Filter
Block functions to the file for use in subsequent commits.

Signed-off-by: Doug Berger <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet: bcmgenet: move clk_wol management to bcmgenet_wol
Doug Berger [Wed, 29 Apr 2020 20:02:02 +0000 (13:02 -0700)]
net: bcmgenet: move clk_wol management to bcmgenet_wol

The GENET_POWER_WOL_MAGIC power up and power down code configures
the device for WoL when suspending and disables the WoL logic when
resuming. It makes sense that this code should also manage the WoL
clocking.

This commit consolidates the logic and moves it earlier in the
resume sequence.

Since the clock is now only enabled if WoL is successfully entered
the wol_active flag is introduced to track that state to keep the
clock enables and disables balanced in case a suspend is aborted.
The MPD_EN hardware bit can't be used because it can be cleared
when the MAC is reset by a deep sleep.

Signed-off-by: Doug Berger <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet: bcmgenet: Fix WoL with password after deep sleep
Doug Berger [Wed, 29 Apr 2020 20:02:01 +0000 (13:02 -0700)]
net: bcmgenet: Fix WoL with password after deep sleep

Broadcom STB chips support a deep sleep mode where all register contents
are lost. Because we were stashing the MagicPacket password into some of
these registers a suspend into that deep sleep then a resumption would
not lead to being able to wake-up from MagicPacket with password again.

Fix this by keeping a software copy of the password and program it
during suspend.

Fixes: c51de7f3976b ("net: bcmgenet: add Wake-on-LAN support code")
Suggested-by: Florian Fainelli <[email protected]>
Signed-off-by: Doug Berger <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet: bcmgenet: set Rx mode before starting netif
Doug Berger [Wed, 29 Apr 2020 20:02:00 +0000 (13:02 -0700)]
net: bcmgenet: set Rx mode before starting netif

This commit explicitly calls the bcmgenet_set_rx_mode() function when
the network interface is started. This function is normally called by
ndo_set_rx_mode when the flags are changed, but apparently not when
the driver is suspended and resumed.

This change ensures that address filtering or promiscuous mode are
properly restored by the driver after the MAC may have been reset.

Fixes: b6e978e50444 ("net: bcmgenet: add suspend/resume callbacks")
Signed-off-by: Doug Berger <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
David S. Miller [Wed, 29 Apr 2020 21:14:44 +0000 (14:14 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next

Pablo Neira Ayuso says:

====================
Netfilter updates for net-next

The following patchset contains Netfilter updates for nf-next:

1) Add IPS_HW_OFFLOAD status bit, from Bodong Wang.

2) Remove 128-bit limit on the set element data area, rise it
   to 64 bytes.

3) Report EOPNOTSUPP for unsupported NAT types and flags.

4) Set up nft_nat flags from the control plane path.

5) Add helper functions to set up the nf_nat_range2 structure.

6) Add netmap support for nft_nat.
====================

Signed-off-by: David S. Miller <[email protected]>
4 years agoMerge branch 'net-smc-preparations-for-SMC-R-link-failover'
David S. Miller [Wed, 29 Apr 2020 19:26:33 +0000 (12:26 -0700)]
Merge branch 'net-smc-preparations-for-SMC-R-link-failover'

Karsten Graul says:

====================
net/smc: preparations for SMC-R link failover

This patch series prepares the SMC code for the implementation of SMC-R link
failover capabilities which are still missing to reach full compliance with
RFC 7609.
The code changes are separated into 65 patches which together form the new
functionality. I tried to create meaningful patches which allow to follow the
implementation.

Question: how to handle the remaining 52 patches? All of them are needed for
link failover to work and should make it into the same merge window.
Can I send them all together?

The SMC-R implementation will transparently make use of the link failover
feature when matching RoCE devices are available, no special setup is required.
All RoCE devices with the same PNET ID as the TCP device (hardware-defined or
user-defined via the smc_pnet tool) are candidates to get used to form a link
in a link group. When at least 2 RoCE devices are available on both
communication endpoints then a symmetric link group is formed, meaning the link
group has 2 independent links. If one RoCE device goes down then all connections
on this link are moved to the surviving link. Upon recovery of the failing
device or availability of a new one, the symmetric link group will be restored.
====================

Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: move llc layer related init and clear into smc_llc.c
Karsten Graul [Wed, 29 Apr 2020 15:10:49 +0000 (17:10 +0200)]
net/smc: move llc layer related init and clear into smc_llc.c

Introduce smc_llc_lgr_init() and smc_llc_lgr_clear() to implement all
llc layer specific initialization and cleanup in module smc_llc.c.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
4 years agonet/smc: use mutex instead of rwlock_t to protect buffers
Karsten Graul [Wed, 29 Apr 2020 15:10:48 +0000 (17:10 +0200)]
net/smc: use mutex instead of rwlock_t to protect buffers

The locks for sndbufs and rmbs are never used from atomic context. Using
a mutex for these locks will allow to nest locks with other mutexes.

Signed-off-by: Karsten Graul <[email protected]>
Reviewed-by: Ursula Braun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This page took 0.110728 seconds and 4 git commands to generate.