[PATCH net-next v3 0/2] net: stmmac: Coalesce and tail addr fixes

2018-09-13 Thread Jose Abreu
The fix for coalesce timer and a fix in tail address setting that impacts XGMAC2 operation. Cc: Florian Fainelli Cc: Neil Armstrong Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Jose Abreu (2): net: stmmac: Rewor

[PATCH net-next v3 1/2] net: stmmac: Rework coalesce timer and fix multi-queue races

2018-09-13 Thread Jose Abreu
This follows David Miller advice and tries to fix coalesce timer in multi-queue scenarios. We are now using per-queue coalesce values and per-queue TX timer. Coalesce timer default values was changed to 1ms and the coalesce frames to 25. Tested in B2B setup between XGMAC2 and GMAC5. Signed-off-

[PATCH net-next v3 2/2] net: stmmac: Fixup the tail addr setting in xmit path

2018-09-13 Thread Jose Abreu
Currently we are always setting the tail address of descriptor list to the end of the pre-allocated list. According to databook this is not correct. Tail address should point to the last available descriptor + 1, which means we have to update the tail address everytime we call the xmit function.

[RFC PATCH iproute2-next] man: Add devlink health man page

2018-09-13 Thread Eran Ben Elisha
Add devlink-health man page. Devlink-health tool will control device health attributes, sensors, actions and logging. Signed-off-by: Eran Ben Elisha --- Copy paste man output to here for easier review process of the RFC. DEVLINK-HEALTH(8)

[RFC PATCH iproute2-next] System specification health API

2018-09-13 Thread Eran Ben Elisha
The health spec is targeted for Real Time Alerting, in order to know when something bad had happened to a PCI device - Provide alert debug information - Self healing - If problem needs vendor support, provide a way to gather all needed debugging information. The health contains sensors which sen

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-13 Thread Jason Wang
On 2018年09月13日 07:27, Willem de Bruijn wrote: On Wed, Sep 12, 2018 at 3:11 PM Willem de Bruijn wrote: On Wed, Sep 12, 2018 at 2:16 PM Florian Fainelli wrote: On 9/12/2018 11:07 AM, Willem de Bruijn wrote: On Wed, Sep 12, 2018 at 1:42 PM Florian Fainelli wrote: On 9/9/2018 3:44 PM, W

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-13 Thread Jason Wang
On 2018年09月13日 03:11, Willem de Bruijn wrote: On Wed, Sep 12, 2018 at 2:16 PM Florian Fainelli wrote: On 9/12/2018 11:07 AM, Willem de Bruijn wrote: On Wed, Sep 12, 2018 at 1:42 PM Florian Fainelli wrote: On 9/9/2018 3:44 PM, Willem de Bruijn wrote: From: Willem de Bruijn Implement

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-13 Thread Jason Wang
On 2018年09月12日 21:43, Willem de Bruijn wrote: On Tue, Sep 11, 2018 at 11:35 PM Jason Wang wrote: On 2018年09月11日 09:14, Willem de Bruijn wrote: I cook a fixup, and it looks works in my setup: diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index b320b6b14749..9181c3f2f832

[PATCH 2/2] net: qcom/emac: add shared mdio bus support

2018-09-13 Thread Wang Dongsheng
Share the mii_bus for others MAC device because QDF2400 emac include MDIO, and the motherboard has more than one PHY connected to an MDIO bus. Tested: QDF2400 (ACPI), buildin/insmod/rmmod Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 211 ++ d

[PATCH 0/2] net: qcom/emac: add shared mdio bus support

2018-09-13 Thread Wang Dongsheng
Share the mii_bus for others MAC device because QDF2400 emac include MDIO, and the motherboard has more than one PHY connected to an MDIO bus. Tested: QDF2400 (ACPI), buildin/insmod/rmmod Wang Dongsheng (2): dt-bindings: net: qcom: Add binding for shared mdio bus net: qcom/emac: add shared md

Re: [PATCH net-next 1/8] devlink: Add generic parameter hw_tc_offload

2018-09-13 Thread Jiri Pirko
Wed, Sep 12, 2018 at 08:34:22AM CEST, jakub.kicin...@netronome.com wrote: >On Wed, 12 Sep 2018 11:47:59 +0530, Vasundhara Volam wrote: >> On Tue, Sep 11, 2018 at 3:25 PM Jiri Pirko wrote: >> > >> > Tue, Sep 11, 2018 at 10:44:58AM CEST, vasundhara-v.vo...@broadcom.com >> > wrote: >> > >hw_tc_off

Re: [PATCH net-next RFC] virtio_net: ethtool tx napi configuration

2018-09-13 Thread Jason Wang
On 2018年09月13日 07:29, Willem de Bruijn wrote: From: Willem de Bruijn Implement ethtool .set_priv_flags and .get_priv_flags handlers and use ethtool private flags to toggle transmit napi: ethtool --set-priv-flags eth0 tx-napi on ethtool --show-priv-flags eth0 Link: https://patchwork.o

pull request: bluetooth 2018-09-13

2018-09-13 Thread Johan Hedberg
Hi Dave, A few Bluetooth fixes for the 4.19-rc series: - Fixed rw_semaphore leak in hci_ldisc - Fixed local Out-of-Band pairing data handling Let me know if there are any issues pulling. Thanks. Johan --- The following changes since commit 7c5cca3588545e7f255171e28e0dd6e384ebb91d: qmi_wwa

Re: [PATCH net-next RFC] virtio_net: ethtool tx napi configuration

2018-09-13 Thread Tobin C. Harding
On Wed, Sep 12, 2018 at 07:29:11PM -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > Implement ethtool .set_priv_flags and .get_priv_flags handlers > and use ethtool private flags to toggle transmit napi: > > ethtool --set-priv-flags eth0 tx-napi on > ethtool --show-priv-flags eth0

Re: [PATCH net-next 5/5] ebpf: Add sample ebpf program for SOCKET_SG_FILTER

2018-09-13 Thread Sowmini Varadhan
On (09/12/18 19:07), Alexei Starovoitov wrote: > > I didn't know that. The way I understand your statement that > this new program type, new sg logic, and all the complexity > are only applicable to RDMA capable hw and RDS. I dont know if you have been following the RFC series at all (and Daniel

Re: [RFC PATCH iproute2-next] man: Add devlink health man page

2018-09-13 Thread Tobin C. Harding
On Thu, Sep 13, 2018 at 11:18:16AM +0300, Eran Ben Elisha wrote: > Add devlink-health man page. Devlink-health tool will control device > health attributes, sensors, actions and logging. > > Signed-off-by: Eran Ben Elisha > > --- > Copy paste m

Re: [PATCH net-next v3 1/2] net: stmmac: Rework coalesce timer and fix multi-queue races

2018-09-13 Thread Neil Armstrong
Hi Jose, On 13/09/2018 10:02, Jose Abreu wrote: > This follows David Miller advice and tries to fix coalesce timer in > multi-queue scenarios. > > We are now using per-queue coalesce values and per-queue TX timer. > > Coalesce timer default values was changed to 1ms and the coalesce frames > to

[PATCH] socket: fix struct ifreq size in compat ioctl

2018-09-13 Thread Johannes Berg
From: Johannes Berg As reported by Reobert O'Callahan, since Viro's commit to kill dev_ifsioc() we attempt to copy too much data in compat mode, which may lead to EFAULT when the 32-bit version of struct ifreq sits at/near the end of a page boundary, and the next page isn't mapped. Fix this by p

Re: [RFC PATCH iproute2-next] man: Add devlink health man page

2018-09-13 Thread Eran Ben Elisha
On 9/13/2018 1:27 PM, Tobin C. Harding wrote: On Thu, Sep 13, 2018 at 11:18:16AM +0300, Eran Ben Elisha wrote: Add devlink-health man page. Devlink-health tool will control device health attributes, sensors, actions and logging. Signed-off-by: Eran Ben Elisha --

Re: [RFC PATCH iproute2-next] man: Add devlink health man page

2018-09-13 Thread Andrew Lunn
>devlink health sensor set pci/:01:00.0 name TX_COMP_ERROR action > reset off action dump on >Sets TX_COMP_ERROR sensor parameters for a specific device. I hope the real sensors have more understandable names. If i remember correctly, the same sort of comment was given for

Re: [PATCH] socket: fix struct ifreq size in compat ioctl

2018-09-13 Thread Al Viro
On Thu, Sep 13, 2018 at 01:49:09PM +0200, Johannes Berg wrote: > From: Johannes Berg > > As reported by Reobert O'Callahan, since Viro's commit to kill > dev_ifsioc() we attempt to copy too much data in compat mode, > which may lead to EFAULT when the 32-bit version of struct ifreq > sits at/near

Re: [PATCH] socket: fix struct ifreq size in compat ioctl

2018-09-13 Thread Johannes Berg
On Thu, 2018-09-13 at 13:13 +0100, Al Viro wrote: > On Thu, Sep 13, 2018 at 01:49:09PM +0200, Johannes Berg wrote: > > From: Johannes Berg > > > > As reported by Reobert O'Callahan, since Viro's commit to kill > > dev_ifsioc() we attempt to copy too much data in compat mode, > > which may lead to

Re: [PATCH 0/2] net: qcom/emac: add shared mdio bus support

2018-09-13 Thread Andrew Lunn
On Thu, Sep 13, 2018 at 05:04:51PM +0800, Wang Dongsheng wrote: > Share the mii_bus for others MAC device because QDF2400 emac > include MDIO, and the motherboard has more than one PHY connected > to an MDIO bus. > > Tested: QDF2400 (ACPI), buildin/insmod/rmmod > > Wang Dongsheng (2): > dt-bind

Re: [PATCH stable 4.4 0/9] fix SegmentSmack in stable branch (CVE-2018-5390)

2018-09-13 Thread Greg KH
On Thu, Aug 16, 2018 at 05:24:09PM +0200, Greg KH wrote: > On Thu, Aug 16, 2018 at 02:33:56PM +0200, Michal Kubecek wrote: > > On Thu, Aug 16, 2018 at 08:05:50PM +0800, maowenan wrote: > > > On 2018/8/16 19:39, Michal Kubecek wrote: > > > > > > > > I suspect you may be doing something wrong with y

[PATCH v2] socket: fix struct ifreq size in compat ioctl

2018-09-13 Thread Johannes Berg
From: Johannes Berg As reported by Reobert O'Callahan, since Viro's commit to kill dev_ifsioc() we attempt to copy too much data in compat mode, which may lead to EFAULT when the 32-bit version of struct ifreq sits at/near the end of a page boundary, and the next page isn't mapped. Fix this by p

Re: [PATCH 2/2] net: qcom/emac: add shared mdio bus support

2018-09-13 Thread Andrew Lunn
On Thu, Sep 13, 2018 at 05:04:53PM +0800, Wang Dongsheng wrote: > Share the mii_bus for others MAC device because QDF2400 emac > include MDIO, and the motherboard has more than one PHY connected > to an MDIO bus. > > Tested: QDF2400 (ACPI), buildin/insmod/rmmod > > Signed-off-by: Wang Dongsheng

Re: [PATCH stable 4.4 0/9] fix SegmentSmack in stable branch (CVE-2018-5390)

2018-09-13 Thread Eric Dumazet
On Thu, Sep 13, 2018 at 5:32 AM Greg KH wrote: > > On Thu, Aug 16, 2018 at 05:24:09PM +0200, Greg KH wrote: > > On Thu, Aug 16, 2018 at 02:33:56PM +0200, Michal Kubecek wrote: > > > On Thu, Aug 16, 2018 at 08:05:50PM +0800, maowenan wrote: > > > > On 2018/8/16 19:39, Michal Kubecek wrote: > > > >

Re: [RFC PATCH iproute2-next] man: Add devlink health man page

2018-09-13 Thread Eran Ben Elisha
On 9/13/2018 3:08 PM, Andrew Lunn wrote: devlink health sensor set pci/:01:00.0 name TX_COMP_ERROR action reset off action dump on Sets TX_COMP_ERROR sensor parameters for a specific device. I hope the real sensors have more understandable names. If i remember correc

Compliment of the day to you Dear Friend.

2018-09-13 Thread Mrs. Amina Kadi
Compliment of the day to you Dear Friend. Dear Friend. I am Mrs. Amina Kadi. am sending this brief letter to solicit your partnership to transfer $5.5 million US Dollars. I shall send you more information and procedures when I receive positive response from you. Mrs. Amina Kadi

Re: [RFC PATCH iproute2-next] man: Add devlink health man page

2018-09-13 Thread Andrew Lunn
On Thu, Sep 13, 2018 at 03:49:37PM +0300, Eran Ben Elisha wrote: > > > On 9/13/2018 3:08 PM, Andrew Lunn wrote: > >>devlink health sensor set pci/:01:00.0 name TX_COMP_ERROR > >> action reset off action dump on > >>Sets TX_COMP_ERROR sensor parameters for a specific devic

[PATCH net 2/2] udp6: add missing checks on edumux packet processing

2018-09-13 Thread Paolo Abeni
Currently the UDPv6 early demux rx code path lacks some mandatory checks, already implemented into the normal RX code path - namely the checksum conversion and no_check6_rx check. Similar to the previous commit, we move the common processing to an UDPv6 specific helper and call it from both edemux

[PATCH net 1/2] udp4: fix IP_CMSG_CHECKSUM for connected sockets

2018-09-13 Thread Paolo Abeni
commit 2abb7cdc0dc8 ("udp: Add support for doing checksum unnecessary conversion") left out the early demux path for connected sockets. As a result IP_CMSG_CHECKSUM gives wrong values for such socket when GRO is not enabled/available. This change addresses the issue by moving the csum conversion t

[PATCH net 0/2] udp: add missing check on edumx rx path

2018-09-13 Thread Paolo Abeni
The early demux RX path for the UDP protocol is currently missing some checks. Both ipv4 and ipv6 implementations lack checksum conversion and the ipv6 implementation additionally lack the zero checksum validation. The first patch takes care of UDPv4 and the second one of UDPv6 Paolo Abeni (2):

Re: [RFC PATCH iproute2-next] man: Add devlink health man page

2018-09-13 Thread Eran Ben Elisha
On 9/13/2018 4:24 PM, Andrew Lunn wrote: On Thu, Sep 13, 2018 at 03:49:37PM +0300, Eran Ben Elisha wrote: On 9/13/2018 3:08 PM, Andrew Lunn wrote: devlink health sensor set pci/:01:00.0 name TX_COMP_ERROR action reset off action dump on Sets TX_COMP_ERROR sensor pa

Re: [net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-13 Thread Jesper Dangaard Brouer
On Wed, 12 Sep 2018 12:29:15 +0300 Ilias Apalodimas wrote: > On Wed, Sep 12, 2018 at 11:25:24AM +0200, Jesper Dangaard Brouer wrote: > > On Wed, 12 Sep 2018 12:02:38 +0300 > > Ilias Apalodimas wrote: > > > > > static const struct net_device_ops netsec_netdev_ops = { > > > .ndo_init

Re: [PATCH net-next] virtio_net: ethtool tx napi configuration

2018-09-13 Thread Willem de Bruijn
On Thu, Sep 13, 2018 at 5:02 AM Jason Wang wrote: > > > > On 2018年09月13日 07:27, Willem de Bruijn wrote: > > On Wed, Sep 12, 2018 at 3:11 PM Willem de Bruijn > > wrote: > >> On Wed, Sep 12, 2018 at 2:16 PM Florian Fainelli > >> wrote: > >>> > >>> > >>> On 9/12/2018 11:07 AM, Willem de Bruijn wro

[PATCH v3 01/30] inet: frags: change inet_frags_init_net() return value

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet We will soon initialize one rhashtable per struct netns_frags in inet_frags_init_net(). This patch changes the return value to eventually propagate an error. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 787bea7748a76130566f881c2342a0

[PATCH v3 00/30] backport of IP fragmentation fixes

2018-09-13 Thread Stephen Hemminger
Took the set of patches from 4.19 to handle IP fragmentation DoS and applied them against 4.14.69. Most of these are from Eric. In a couple case, it required some manual merge conflict resolution. Tested normal IP fragmentation with iperf3 and malicious IP fragments with fragmentsmack. Under frag

[PATCH v3 05/30] inet: frags: refactor ipv6_frag_init()

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet We want to call inet_frags_init() earlier. This is a prereq to "inet: frags: use rhashtables for reassembly units" Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 5b975bab23615cd0fdf67af6c9298eb01c4b9f61) --- net/ipv6/reassembly.c | 25

[PATCH v3 03/30] inet: frags: refactor ipfrag_init()

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet We need to call inet_frags_init() before register_pernet_subsys(), as a prereq for following patch ("inet: frags: use rhashtables for reassembly units") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 483a6e4fa055123142d8956866fe2aa9c98

[PATCH v3 06/30] inet: frags: refactor lowpan_net_frag_init()

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet We want to call lowpan_net_frag_init() earlier. Similar to commit "inet: frags: refactor ipv6_frag_init()" This is a prereq to "inet: frags: use rhashtables for reassembly units" Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 807f1844d

[PATCH v3 07/30] ipv6: export ip6 fragments sysctl to unprivileged users

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet IPv4 was changed in commit 52a773d645e9 ("net: Export ip fragment sysctl to unprivileged users") The only sysctl that is not per-netns is not used : ip6frag_secret_interval Signed-off-by: Eric Dumazet Cc: Nikolay Borisov Signed-off-by: David S. Miller (cherry picked from c

[PATCH v3 10/30] inet: frags: remove some helpers

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Remove sum_frag_mem_limit(), ip_frag_mem() & ip6_frag_mem() Also since we use rhashtable we can bring back the number of fragments in "grep FRAG /proc/net/sockstat /proc/net/sockstat6" that was removed in commit 434d305405ab ("inet: frag: don't account number of fragment queue

[PATCH v3 11/30] inet: frags: get rif of inet_frag_evicting()

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet This refactors ip_expire() since one indentation level is removed. Note: in the future, we should try hard to avoid the skb_clone() since this is a serious performance cost. Under DDOS, the ICMP message wont be sent because of rate limits. Fact that ip6_expire_frag_queue() do

[PATCH v3 13/30] inet: frags: break the 2GB limit for frags storage

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Some users are willing to provision huge amounts of memory to be able to perform reassembly reasonnably well under pressure. Current memory tracking is using one atomic_t and integers. Switch to atomic_long_t so that 64bit arches can use more than 2GB, without any cost for 32

[PATCH v3 15/30] ipv6: frags: rewrite ip6_expire_frag_queue()

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Make it similar to IPv4 ip_expire(), and release the lock before calling icmp functions. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 05c0b86b9696802fd0ce5676a92a63f1b455bdf3) --- net/ipv6/reassembly.c | 24

[PATCH v3 16/30] rhashtable: reorganize struct rhashtable layout

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet While under frags DDOS I noticed unfortunate false sharing between @nelems and @params.automatic_shrinking Move @nelems at the end of struct rhashtable so that first cache line is shared between all cpus, because almost never dirtied. Signed-off-by: Eric Dumazet Signed-off-b

[PATCH v3 17/30] inet: frags: reorganize struct netns_frags

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Put the read-mostly fields in a separate cache line at the beginning of struct netns_frags, to reduce false sharing noticed in inet_frag_kill() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit c2615cf5a761b32bf74e85bddc223dfff3d9b9f0) ---

[PATCH v3 20/30] ip: discard IPv4 datagrams with overlapping segments.

2018-09-13 Thread Stephen Hemminger
From: Peter Oskolkov This behavior is required in IPv6, and there is little need to tolerate overlapping fragments in IPv4. This change simplifies the code and eliminates potential DDoS attack vectors. Tested: ran ip_defrag selftest (not yet available uptream). Suggested-by: David S. Miller Si

[PATCH v3 21/30] net: speed up skb_rbtree_purge()

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet As measured in my prior patch ("sch_netem: faster rb tree removal"), rbtree_postorder_for_each_entry_safe() is nice looking but much slower than using rb_next() directly, except when tree is small enough to fit in CPU caches (then the cost is the same) Also note that there is

[PATCH v3 24/30] net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet After working on IP defragmentation lately, I found that some large packets defeat CHECKSUM_COMPLETE optimization because of NIC adding zero paddings on the last (small) fragment. While removing the padding with pskb_trim_rcsum(), we set skb->ip_summed to CHECKSUM_NONE, forcin

[PATCH v3 28/30] ip: add helpers to process in-order fragments faster.

2018-09-13 Thread Stephen Hemminger
From: Peter Oskolkov This patch introduces several helper functions/macros that will be used in the follow-up patch. No runtime changes yet. The new logic (fully implemented in the second patch) is as follows: * Nodes in the rb-tree will now contain not single fragments, but lists of consecut

[PATCH v3 29/30] ip: process in-order fragments efficiently

2018-09-13 Thread Stephen Hemminger
From: Peter Oskolkov This patch changes the runtime behavior of IP defrag queue: incoming in-order fragments are added to the end of the current list/"run" of in-order fragments at the tail. On some workloads, UDP stream performance is substantially improved: RX: ./udp_stream -F 10 -T 2 -l 60 T

[PATCH v3 27/30] ipv4: frags: precedence bug in ip_expire()

2018-09-13 Thread Stephen Hemminger
From: Dan Carpenter We accidentally removed the parentheses here, but they are required because '!' has higher precedence than '&'. Fixes: fa0f527358bd ("ip: use rb trees for IP frag queue.") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller (cherry picked from commit 70837ffe3085c9a

[PATCH v3 30/30] ip: frags: fix crash in ip_do_fragment()

2018-09-13 Thread Stephen Hemminger
From: Taehee Yoo commit 5d407b071dc369c26a38398326ee2be53651cfe4 upstream A kernel crash occurrs when defragmented packet is fragmented in ip_do_fragment(). In defragment routine, skb_orphan() is called and skb->ip_defrag_offset is set. but skb->sk and skb->ip_defrag_offset are same union member

[PATCH v3 26/30] net: sk_buff rbnode reorg

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet commit bffa72cf7f9df842f0016ba03586039296b4caaf upstream skb->rbnode shares space with skb->next, skb->prev and skb->tstamp Current uses (TCP receive ofo queue and netem) need to save/restore tstamp, while skb->dev is either NULL (TCP) or a constant for a given queue (netem).

[PATCH v3 23/30] ipv6: defrag: drop non-last frags smaller than min mtu

2018-09-13 Thread Stephen Hemminger
From: Florian Westphal don't bother with pathological cases, they only waste cycles. IPv6 requires a minimum MTU of 1280 so we should never see fragments smaller than this (except last frag). v3: don't use awkward "-offset + len" v2: drop IPv4 part, which added same check w. IPV4_MIN_MTU (68).

[PATCH v3 25/30] net: add rb_to_skb() and other rb tree helpers

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Geeralize private netem_rb_to_skb() TCP rtx queue will soon be converted to rb-tree, so we will need skb_rbtree_walk() helpers. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 18a4c0eab2623cc95be98a1e6af1ad18e7695977) --- include/linux

[PATCH v3 22/30] net: modify skb_rbtree_purge to return the truesize of all purged skbs.

2018-09-13 Thread Stephen Hemminger
From: Peter Oskolkov Tested: see the next patch is the series. Suggested-by: Eric Dumazet Signed-off-by: Peter Oskolkov Signed-off-by: Eric Dumazet Cc: Florian Westphal Signed-off-by: David S. Miller (cherry picked from commit 385114dec8a49b5e5945e77ba7de6356106713f4) --- include/linux/skb

[PATCH v3 19/30] inet: frags: fix ip6frag_low_thresh boundary

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Giving an integer to proc_doulongvec_minmax() is dangerous on 64bit arches, since linker might place next to it a non zero value preventing a change to ip6frag_low_thresh. ip6frag_low_thresh is not used anymore in the kernel, but we do not want to prematuraly break user script

[PATCH v3 09/30] inet: frags: use rhashtables for reassembly units

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Some applications still rely on IP fragmentation, and to be fair linux reassembly unit is not working under any serious load. It uses static hash tables of 1024 buckets, and up to 128 items per bucket (!!!) A work queue is supposed to garbage collect items when host is under

[PATCH v3 08/30] rhashtable: add schedule points

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet Rehashing and destroying large hash table takes a lot of time, and happens in process context. It is safe to add cond_resched() in rhashtable_rehash_table() and rhashtable_free_and_destroy() Signed-off-by: Eric Dumazet Acked-by: Herbert Xu Signed-off-by: David S. Miller (ch

[PATCH v3 18/30] inet: frags: get rid of ipfrag_skb_cb/FRAG_CB

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet ip_defrag uses skb->cb[] to store the fragment offset, and unfortunately this integer is currently in a different cache line than skb->next, meaning that we use two cache lines per skb when finding the insertion point. By aliasing skb->ip_defrag_offset and skb->dev, we pack al

[PATCH v3 14/30] inet: frags: do not clone skb in ip_expire()

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet An skb_clone() was added in commit ec4fbd64751d ("inet: frag: release spinlock before calling icmp_send()") While fixing the bug at that time, it also added a very high cost for DDOS frags, as the ICMP rate limit is applied after this expensive operation (skb_clone() + consume

[PATCH v3 12/30] inet: frags: remove inet_frag_maybe_warn_overflow()

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet This function is obsolete, after rhashtable addition to inet defrag. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 2d44ed22e607f9a285b049de2263e3840673a260) --- include/net/inet_frag.h | 2 -- net/ieee802154/6lowpan/r

[PATCH v3 04/30] inet: frags: Convert timers to use timer_setup()

2018-09-13 Thread Stephen Hemminger
From: Kees Cook In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Alexander Aring Cc: Stefan Schmidt Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc:

[PATCH v3 02/30] inet: frags: add a pointer to struct netns_frags

2018-09-13 Thread Stephen Hemminger
From: Eric Dumazet In order to simplify the API, add a pointer to struct inet_frags. This will allow us to make things less complex. These functions no longer have a struct inet_frags parameter : inet_frag_destroy(struct inet_frag_queue *q /*, struct inet_frags *f */) inet_frag_put(struct inet

Re: [PATCH net-next RFC] virtio_net: ethtool tx napi configuration

2018-09-13 Thread Willem de Bruijn
> > +static u32 virtnet_get_priv_flags(struct net_device *dev) > > +{ > > + struct virtnet_info *vi = netdev_priv(dev); > > + int priv_flags = 0; > > + > > + if (vi->sq[0].napi.weight) > > + priv_flags |= 0x1; > > + > > + return priv_flags; > > +} > > Why the use of priv

Re: [PATCH 2/2] net: qcom/emac: add shared mdio bus support

2018-09-13 Thread Timur Tabi
On 9/13/18 7:42 AM, Andrew Lunn wrote: This is a pretty big patch, and is hard to review. Could you try to break it up into a number of smaller patches. You could for example first refactor emacs_phy_config(), without making any functional changes. Then add the sharing. Maybe do OF an ACPI in dif

[PATCH] hv_netvsc: fix schedule in RCU context

2018-09-13 Thread Stephen Hemminger
When netvsc device is removed it can call reschedule in RCU context. This happens because canceling the subchannel setup work could (in theory) cause a reschedule when manipulating the timer. To reproduce, run with lockdep enabled kernel and unbind a network device from hv_netvsc (via sysfs). [

Re: [RFC PATCH iproute2-next] man: Add devlink health man page

2018-09-13 Thread Andrew Lunn
> devlink health sensor set pci/:01:00.0 name TX_COMP_ERROR > action reset off action dump on > Sets TX_COMP_ERROR sensor parameters for a specific device. > >>This is what I had in mind: > >>1. command interface error > >>2. command interface timeout > >>3. s

Re: [PATCH v3 net-next 0/6] Add support for Lantiq / Intel vrx200 network

2018-09-13 Thread David Miller
From: Hauke Mehrtens Date: Sun, 9 Sep 2018 22:16:41 +0200 > This adds basic support for the GSWIP (Gigabit Switch) found in the > VRX200 SoC. > There are different versions of this IP core used in different SoCs, but > this driver was currently only tested on the VRX200 SoC line, for other > SoC

Re: [PATCH iproute2] iproute2: fix use-after-free

2018-09-13 Thread Stephen Hemminger
On Wed, 12 Sep 2018 23:07:20 -0700 Mahesh Bandewar (महेश बंडेवार) wrote: > On Wed, Sep 12, 2018 at 5:33 PM, Stephen Hemminger > wrote: > > > > On Wed, 12 Sep 2018 16:29:28 -0700 > > Mahesh Bandewar wrote: > > > > > From: Mahesh Bandewar > > > > > > A local program using iproute2 lib pointed

Re: [PATCH 2/2] net: qcom/emac: add shared mdio bus support

2018-09-13 Thread Wang, Dongsheng
On 9/13/2018 8:42 PM, Andrew Lunn wrote: > On Thu, Sep 13, 2018 at 05:04:53PM +0800, Wang Dongsheng wrote: >> Share the mii_bus for others MAC device because QDF2400 emac >> include MDIO, and the motherboard has more than one PHY connected >> to an MDIO bus. >> >> Tested: QDF2400 (ACPI), buildin/in

Re: [PATCHv2 net] ipv6: use rt6_info members when dst is set in rt6_fill_node

2018-09-13 Thread David Miller
From: Xin Long Date: Tue, 11 Sep 2018 14:33:58 +0800 > In inet6_rtm_getroute, since Commit 93531c674315 ("net/ipv6: separate > handling of FIB entries from dst based routes"), it has used rt->from > to dump route info instead of rt. > > However for some route like cache, some of its information

RE: [PATCH] hv_netvsc: fix schedule in RCU context

2018-09-13 Thread Haiyang Zhang
> -Original Message- > From: Stephen Hemminger > Sent: Thursday, September 13, 2018 11:04 AM > To: KY Srinivasan ; Haiyang Zhang > > Cc: netdev@vger.kernel.org; Stephen Hemminger > Subject: [PATCH] hv_netvsc: fix schedule in RCU context > > When netvsc device is removed it can call r

Re: [net-next, PATCH 2/2, v2] net: socionext: add XDP support

2018-09-13 Thread Ilias Apalodimas
On Thu, Sep 13, 2018 at 04:32:06PM +0200, Jesper Dangaard Brouer wrote: > On Wed, 12 Sep 2018 12:29:15 +0300 > Ilias Apalodimas wrote: > > > On Wed, Sep 12, 2018 at 11:25:24AM +0200, Jesper Dangaard Brouer wrote: > > > On Wed, 12 Sep 2018 12:02:38 +0300 > > > Ilias Apalodimas wrote: > > > > >

Re: [PATCH v4 3/3] IB/ipoib: Log sysfs 'dev_id' accesses from userspace

2018-09-13 Thread Doug Ledford
On Sun, 2018-09-09 at 23:55 +0300, Arseny Maslennikov wrote: > On Sun, Sep 09, 2018 at 09:11:46PM +0300, Arseny Maslennikov wrote: > > On Fri, Sep 07, 2018 at 09:43:59AM -0600, Jason Gunthorpe wrote: > > > On Thu, Sep 06, 2018 at 05:51:12PM +0300, Arseny Maslennikov wrote: > > > > Some tools may cu

Re: [Patch net-next] llc: avoid blocking in llc_sap_close()

2018-09-13 Thread David Miller
From: Cong Wang Date: Tue, 11 Sep 2018 11:42:06 -0700 > llc_sap_close() is called by llc_sap_put() which > could be called in BH context in llc_rcv(). We can't > block in BH. > > There is no reason to block it here, kfree_rcu() should > be sufficient. > > Signed-off-by: Cong Wang Applied, tha

Re: [Patch net] net_sched: notify filter deletion when deleting a chain

2018-09-13 Thread David Miller
From: Cong Wang Date: Tue, 11 Sep 2018 14:22:23 -0700 > When we delete a chain of filters, we need to notify > user-space we are deleting each filters in this chain > too. > > Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi") > Cc: Jiri Pirko > Signed-off-by: Cong Wang Applie

What is the best forum (mailing list, irc etc) to ask questions about the usage of AF_XDP sockets.

2018-09-13 Thread Konrad Djimeli
Hello, I have been working on trying to make use of AF_XDP sockets as part of a project I working on, and I have been facing some issues but I am not sure where to ask questions related to the usage of AF_XDP, since this is a development mailing list. Thanks Konrad www.djimeli.me

Re: [PATCH v4 0/3] IB/ipoib: Use dev_port to disambiguate port numbers

2018-09-13 Thread Doug Ledford
On Thu, 2018-09-06 at 17:51 +0300, Arseny Maslennikov wrote: > Pre-3.15 userspace had trouble distinguishing different ports > of a NIC on a single PCI bus/device/function. To solve this, > a sysfs field `dev_port' was introduced quite a while ago > (commit v3.14-rc3-739-g3f85944fe207), and some re

Re: What is the best forum (mailing list, irc etc) to ask questions about the usage of AF_XDP sockets.

2018-09-13 Thread Jakub Kicinski
On Thu, 13 Sep 2018 18:31:55 +0200, Konrad Djimeli wrote: > Hello, > > I have been working on trying to make use of AF_XDP sockets as part of a > project I working on, and I have been facing some issues but I am not > sure where to ask questions related to the usage of AF_XDP, since this > is a de

Re: [PATCH net-next v3 1/2] netlink: ipv4 igmp join notifications

2018-09-13 Thread Roopa Prabhu
On Thu, Sep 6, 2018 at 8:40 PM, Roopa Prabhu wrote: > On Thu, Sep 6, 2018 at 2:10 AM, Patrick Ruddy > wrote: >> Some userspace applications need to know about IGMP joins from the >> kernel for 2 reasons: >> 1. To allow the programming of multicast MAC filters in hardware >> 2. To form a multicast

Re: [PATCH net-next v2] net: sched: change tcf_del_walker() to take idrinfo->lock

2018-09-13 Thread Cong Wang
On Wed, Sep 12, 2018 at 1:51 AM Vlad Buslov wrote: > > > On Fri 07 Sep 2018 at 19:12, Cong Wang wrote: > > On Fri, Sep 7, 2018 at 6:52 AM Vlad Buslov wrote: > >> > >> Action API was changed to work with actions and action_idr in concurrency > >> safe manner, however tcf_del_walker() still uses a

Re: [PATCH net-next 08/13] net: sched: rename tcf_block_get{_ext}() and tcf_block_put{_ext}()

2018-09-13 Thread Cong Wang
On Wed, Sep 12, 2018 at 1:24 AM Vlad Buslov wrote: > > > On Fri 07 Sep 2018 at 20:09, Cong Wang wrote: > > On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote: > >> > >> Functions tcf_block_get{_ext}() and tcf_block_put{_ext}() actually > >> attach/detach block to specific Qdisc besides just takin

[PATCH net-next 2/2] net/sched: act_police: don't use spinlock in the data path

2018-09-13 Thread Davide Caratti
use RCU instead of spinlocks, to protect concurrent read/write on act_police configuration. This reduces the effects of contention in the data path, in case multiple readers are present. Signed-off-by: Davide Caratti --- net/sched/act_police.c | 156 - 1 f

[PATCH net-next 0/2] net/sched: act_police: lockless data path

2018-09-13 Thread Davide Caratti
the data path of 'police' action can be faster if we avoid using spinlocks: - patch 1 converts act_police to use per-cpu counters - patch 2 lets act_police use RCU to access its configuration data. test procedure (using pktgen from https://github.com/netoptimizer): # ip link add name eth1 type

[PATCH net-next 1/2] net/sched: act_police: use per-cpu counters

2018-09-13 Thread Davide Caratti
use per-CPU counters, instead of sharing a single set of stats with all cores. This removes the need of using spinlock when statistics are read or updated. Signed-off-by: Davide Caratti --- net/sched/act_police.c | 46 -- 1 file changed, 22 insertions(+),

Re: [PATCH] hv_netvsc: fix schedule in RCU context

2018-09-13 Thread David Miller
From: Stephen Hemminger Date: Thu, 13 Sep 2018 08:03:43 -0700 > When netvsc device is removed it can call reschedule in RCU context. > This happens because canceling the subchannel setup work could (in theory) > cause a reschedule when manipulating the timer. > > To reproduce, run with lockdep e

Re: [RFC PATCH iproute2-next] System specification health API

2018-09-13 Thread Jakub Kicinski
On Thu, 13 Sep 2018 11:18:15 +0300, Eran Ben Elisha wrote: > The health spec is targeted for Real Time Alerting, in order to know when > something bad had happened to a PCI device By spec you mean some standards body spec you implement or this proposal is a spec? > - Provide alert debug informati

[bpf-next, v3 1/5] flow_dissector: implements flow dissector BPF hook

2018-09-13 Thread Petar Penkov
From: Petar Penkov Adds a hook for programs of type BPF_PROG_TYPE_FLOW_DISSECTOR and attach type BPF_FLOW_DISSECTOR that is executed in the flow dissector path. The BPF program is per-network namespace. Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn --- include/linux/bpf.h

[bpf-next, v3 0/5] Introduce eBPF flow dissector

2018-09-13 Thread Petar Penkov
From: Petar Penkov This patch series hardens the RX stack by allowing flow dissection in BPF, as previously discussed [1]. Because of the rigorous checks of the BPF verifier, this provides significant security guarantees. In particular, the BPF flow dissector cannot get inside of an infinite loop

[bpf-next, v3 2/5] bpf: sync bpf.h uapi with tools/

2018-09-13 Thread Petar Penkov
From: Petar Penkov This patch syncs tools/include/uapi/linux/bpf.h with the flow dissector definitions from include/uapi/linux/bpf.h Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn --- tools/include/uapi/linux/bpf.h | 26 ++ 1 file changed, 26 insertions(+)

[bpf-next, v3 3/5] bpf: support flow dissector in libbpf and bpftool

2018-09-13 Thread Petar Penkov
From: Petar Penkov This patch extends libbpf and bpftool to work with programs of type BPF_PROG_TYPE_FLOW_DISSECTOR. Signed-off-by: Petar Penkov Signed-off-by: Willem de Bruijn --- tools/bpf/bpftool/prog.c | 1 + tools/lib/bpf/libbpf.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/

[bpf-next, v3 5/5] selftests/bpf: test bpf flow dissection

2018-09-13 Thread Petar Penkov
From: Petar Penkov Adds a test that sends different types of packets over multiple tunnels and verifies that valid packets are dissected correctly. To do so, a tc-flower rule is added to drop packets on UDP src port 9, and packets are sent from ports 8, 9, and 10. Only the packets on port 9 shou

[bpf-next, v3 4/5] flow_dissector: implements eBPF parser

2018-09-13 Thread Petar Penkov
From: Petar Penkov This eBPF program extracts basic/control/ip address/ports keys from incoming packets. It supports recursive parsing for IP encapsulation, and VLAN, along with IPv4/IPv6 and extension headers. This program is meant to show how flow dissection and key extraction can be done in e

Re: [PATCH net-next v3 1/2] netlink: ipv4 igmp join notifications

2018-09-13 Thread Patrick Ruddy
On Thu, 2018-09-13 at 10:03 -0700, Roopa Prabhu wrote: > On Thu, Sep 6, 2018 at 8:40 PM, Roopa Prabhu > wrote: > > On Thu, Sep 6, 2018 at 2:10 AM, Patrick Ruddy > > wrote: > > > Some userspace applications need to know about IGMP joins from the > > > kernel for 2 reasons: > > > 1. To allow the p

Re: [PATCH iproute2] iproute2: fix use-after-free

2018-09-13 Thread महेश बंडेवार
On Thu, Sep 13, 2018 at 8:19 AM, Stephen Hemminger wrote: > > On Wed, 12 Sep 2018 23:07:20 -0700 > Mahesh Bandewar (महेश बंडेवार) wrote: > > > On Wed, Sep 12, 2018 at 5:33 PM, Stephen Hemminger > > wrote: > > > > > > On Wed, 12 Sep 2018 16:29:28 -0700 > > > Mahesh Bandewar wrote: > > > > > > >

Re: [PATCH net] net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags

2018-09-13 Thread David Miller
From: Roopa Prabhu Date: Wed, 12 Sep 2018 13:21:48 -0700 > From: Roopa Prabhu > > This fix addresses https://bugzilla.kernel.org/show_bug.cgi?id=201071 > > Commit 5025f7f7d506 wrongly relied on __dev_change_flags to notify users of > dev flag changes in the case when dev->rtnl_link_state = >

  1   2   >