[PATCH][net-next] tun: align write-heavy flow entry members to a cache line

2018-12-06 Thread Li RongQing
tun flow entry 'updated' fields are written when receive every packet. Thus if a flow is receiving packets from a particular flow entry, it'll cause false-sharing with all the other who has looked it up, so move it in its own cache line and update 'queue_index' and 'update' field only when they

Re: [PATCH net] sctp: fix pr_warn max_data argument type mismatch

2018-12-06 Thread Jakub Audykowicz
On 2018-12-06 09:03, David Miller wrote: > From: Jakub Audykowicz > Date: Thu, 6 Dec 2018 08:58:37 +0100 > >> My previous patch introduced a compilation warning regarding a type >> mismatch (int vs size_t). This is a one-letter fix for good housekeeping. >> >> Signed-off-by: Jakub Audykowicz >

Re: [PATCH net] sctp: fix pr_warn max_data argument type mismatch

2018-12-06 Thread David Miller
From: Jakub Audykowicz Date: Thu, 6 Dec 2018 08:58:37 +0100 > My previous patch introduced a compilation warning regarding a type > mismatch (int vs size_t). This is a one-letter fix for good housekeeping. > > Signed-off-by: Jakub Audykowicz Still wrong and I fixed it when I applied your

[PATCH][net-next] tun: remove unnecessary check in tun_flow_update

2018-12-06 Thread Li RongQing
caller has guaranted that rxhash is not zero Signed-off-by: Li RongQing --- drivers/net/tun.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index d0745dc81976..6760b86547df 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-06 Thread Jiri Pirko
Thu, Dec 06, 2018 at 09:57:05AM CET, michael.c...@broadcom.com wrote: >On Wed, Dec 5, 2018 at 11:11 PM Jakub Kicinski > wrote: >> >> On Wed, 5 Dec 2018 22:41:43 -0800, Michael Chan wrote: >> > >> > It will be in the BIOS only for a LOM, I think. For a NIC, it should >> > be in the NIC's NVRAM. >>

Re: [PATCH][net-next] tun: align write-heavy flow entry members to a cache line

2018-12-06 Thread Jason Wang
On 2018/12/6 下午4:08, Li RongQing wrote: tun flow entry 'updated' fields are written when receive every packet. Thus if a flow is receiving packets from a particular flow entry, it'll cause false-sharing with all the other who has looked it up, so move it in its own cache line and update

Re: [PATCH 1/2] net: linkwatch: send change uevent on link changes

2018-12-06 Thread Jouke Witteveen
On Thu, Dec 6, 2018 at 1:34 AM David Miller wrote: > > From: Jouke Witteveen > Date: Wed, 5 Dec 2018 23:38:17 +0100 > > > Can you elaborate a bit? I may not be aware of the policy you have in > > mind. > > When we have a user facing interface to do something, we don't create > another one unless

Re: [PATCH][net-next] tun: remove unnecessary check in tun_flow_update

2018-12-06 Thread Jason Wang
On 2018/12/6 下午4:28, Li RongQing wrote: caller has guaranted that rxhash is not zero Signed-off-by: Li RongQing --- drivers/net/tun.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index d0745dc81976..6760b86547df 100644 ---

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-06 Thread Michael Chan
On Wed, Dec 5, 2018 at 11:11 PM Jakub Kicinski wrote: > > On Wed, 5 Dec 2018 22:41:43 -0800, Michael Chan wrote: > > > > It will be in the BIOS only for a LOM, I think. For a NIC, it should > > be in the NIC's NVRAM. > > This is all vague. Could you please clearly state the use case. > Well,

[PATCH bpf] bpf: fix default unprivileged allocation limit

2018-12-06 Thread Sandipan Das
When using a large page size, the default value of the bpf_jit_limit knob becomes invalid and users are not able to run unprivileged bpf programs. The bpf_jit_limit knob is represented internally as a 32-bit signed integer because of which the default value, i.e. PAGE_SIZE * 4, overflows in

[PATCH net-next 1/2] net: dsa: Add overhead to tag protocol ops.

2018-12-06 Thread Andrew Lunn
Each DSA tag protocol needs to add additional headers to the Ethernet frame in order to direct it towards a specific switch egress port. It must also remove the head from a frame received from a switch. Indicate the maximum size of these headers in the tag protocol ops structure, so the core can

[PATCH net-next 0/2] Adjust MTU of DSA master interface

2018-12-06 Thread Andrew Lunn
DSA makes use of additional headers to direct a frame in/out of a specific port of the switch. When the slave interfaces uses an MTU of 1500, the master interface can be asked to handle frames with an MTU of 1504, or 1508 bytes. Some Ethernet interfaces won't transmit/receive frames which are

Re: KMSAN: kernel-infoleak in sctp_getsockopt

2018-12-06 Thread Alexander Potapenko
On Wed, Dec 5, 2018 at 8:31 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:fffec98ae2a6 net: proper support for CONFIG_GENERIC_CSUM o.. > git tree: https://github.com/google/kmsan.git/master > console output:

[PATCH net-next 2/2] net: dsa: Set the master device's MTU to account for DSA overheads

2018-12-06 Thread Andrew Lunn
DSA tagging of frames sent over the master interface to the switch increases the size of the frame. Such frames can then be bigger than the normal MTU of the master interface, and it may drop them. Use the overhead information from the tagger to set the MTU of the master device to include this

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-06 Thread Jakub Kicinski
On Thu, 6 Dec 2018 00:57:05 -0800, Michael Chan wrote: > On Wed, Dec 5, 2018 at 11:11 PM Jakub Kicinski wrote: > > > > On Wed, 5 Dec 2018 22:41:43 -0800, Michael Chan wrote: > > > > > > It will be in the BIOS only for a LOM, I think. For a NIC, it should > > > be in the NIC's NVRAM. > > > >

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-06 Thread Michael Chan
On Thu, Dec 6, 2018 at 2:37 AM Jakub Kicinski wrote: > > On Thu, 6 Dec 2018 00:57:05 -0800, Michael Chan wrote: > > On Wed, Dec 5, 2018 at 11:11 PM Jakub Kicinski wrote: > > > > > > On Wed, 5 Dec 2018 22:41:43 -0800, Michael Chan wrote: > > > > > > > > It will be in the BIOS only for a LOM, I

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-06 Thread Jiri Pirko
Thu, Dec 06, 2018 at 11:31:26AM CET, vasundhara-v.vo...@broadcom.com wrote: >On Thu, Dec 6, 2018 at 2:41 PM Jiri Pirko wrote: >> >> Thu, Dec 06, 2018 at 09:57:05AM CET, michael.c...@broadcom.com wrote: >> >On Wed, Dec 5, 2018 at 11:11 PM Jakub Kicinski >> > wrote: >> >> >> >> On Wed, 5 Dec 2018

Re: [PATCH net-next 2/2] net: dsa: Set the master device's MTU to account for DSA overheads

2018-12-06 Thread Florian Fainelli
On 12/6/18 2:36 AM, Andrew Lunn wrote: > DSA tagging of frames sent over the master interface to the switch > increases the size of the frame. Such frames can then be bigger than > the normal MTU of the master interface, and it may drop them. Use the > overhead information from the tagger to set

Re: [PATCH] mv88e6060: Warn about errors

2018-12-06 Thread Pavel Machek
On Thu 2018-12-06 12:21:59, David Miller wrote: > > Plain "printk" are never appropriate. > > Please explicitly use pr_warn() or similar. If there is a device context > available, either a generic device or a netdev, use one of the dev_*() > or netdev_*() variants. Can do, I guess is

Re: [PATCH net-next 4/4] net: aquantia: add support of RSS configuration

2018-12-06 Thread Jakub Kicinski
On Thu, 6 Dec 2018 15:02:52 +, Igor Russkikh wrote: > From: Dmitry Bogdanov > > Add support of configuration of RSS hash key and RSS indirection table. > > Signed-off-by: Dmitry Bogdanov > Signed-off-by: Igor Russkikh > --- > .../ethernet/aquantia/atlantic/aq_ethtool.c | 42

RE: [PATCH RFC 5/6] net: dsa: microchip: Update tag_ksz.c to access switch driver

2018-12-06 Thread Tristram.Ha
> >>> Update tag_ksz.c to access switch driver's tail tagging operations. > >> > >> Hi Tristram > >> > >> Humm, i'm not sure we want this, the tagging spit into two places. I > >> need to take a closer look at the previous patch, to see why it cannot > >> be done here. > > > > O.K, i think i get

RE: [PATCH RFC 1/6] net: dsa: microchip: Prepare PHY for proper advertisement

2018-12-06 Thread Tristram.Ha
> > +static void ksz9477_phy_setup(struct ksz_device *dev, int port, > > + struct phy_device *phy) > > +{ > > + if (port < dev->phy_port_cnt) { > > + /* SUPPORTED_Asym_Pause and SUPPORTED_Pause can be > removed to > > +* disable flow control when

Re: [PATCH net-next v2 0/8] Pass extack to NETDEV_PRE_UP

2018-12-06 Thread David Miller
From: Petr Machata Date: Thu, 6 Dec 2018 17:05:35 + > Drivers may need to validate configuration of a device that's about to > be upped. An example is mlxsw, which needs to check the configuration of > a VXLAN device attached to an offloaded bridge. Should the validation > fail, there's

Re: [PATCH net 0/4] mlxsw: Various fixes

2018-12-06 Thread David Miller
From: Ido Schimmel Date: Thu, 6 Dec 2018 17:44:48 + > Patches #1 and #2 fix two VxLAN related issues. The first patch removes > warnings that can currently be triggered from user space. Second patch > avoids leaking a FID in an error path. > > Patch #3 fixes a too strict check that causes

Re: [PATCH] gianfar: Add gfar_change_carrier()

2018-12-06 Thread Andrew Lunn
> I can have a look at using dormant, but what is change_carrier > supposed to do if not this? It is intended for interfaces which are stacked, like the team driver, and for devices which don't have a phy, e.g. tun, and dummy. > I didn't find a tool for DORMANT, I guess i will have to write one

Re: [PATCH net-next 0/2] Adjust MTU of DSA master interface

2018-12-06 Thread David Miller
From: Andrew Lunn Date: Thu, 6 Dec 2018 11:36:03 +0100 > DSA makes use of additional headers to direct a frame in/out of a > specific port of the switch. When the slave interfaces uses an MTU of > 1500, the master interface can be asked to handle frames with an MTU > of 1504, or 1508 bytes.

Re: [PATCH] mv88e6060: Warn about errors

2018-12-06 Thread David Miller
Plain "printk" are never appropriate. Please explicitly use pr_warn() or similar. If there is a device context available, either a generic device or a netdev, use one of the dev_*() or netdev_*() variants.

Re: mv88e6060: Turn e6060 driver into e6065 driver

2018-12-06 Thread David Miller
From: Pavel Machek Date: Thu, 6 Dec 2018 14:03:45 +0100 > @@ -79,7 +82,7 @@ static enum dsa_tag_protocol > mv88e6060_get_tag_protocol(struct dsa_switch *ds, > { >//return DSA_TAG_PROTO_QCA; >//return DSA_TAG_PROTO_TRAILER; These C++ style comments are not in any of my tree(s). Your

[PATCH] vhost/vsock: fix reset orphans race with close timeout

2018-12-06 Thread Stefan Hajnoczi
If a local process has closed a connected socket and hasn't received a RST packet yet, then the socket remains in the table until a timeout expires. When a vhost_vsock instance is released with the timeout still pending, the socket is never freed because vhost_vsock has already set the SOCK_DONE

Re: [PATCH bpf-next] tools: bpftool: add a command to dump the trace pipe

2018-12-06 Thread Alexei Starovoitov
On Thu, Dec 06, 2018 at 05:20:54PM +, Quentin Monnet wrote: > 2018-12-05 19:18 UTC-0800 ~ Alexei Starovoitov > > > On Wed, Dec 05, 2018 at 06:15:23PM +, Quentin Monnet wrote: > + > +/* Allow room for NULL terminating byte and pipe file name */ > +

Re: [PATCH net-next 0/2] platform data controls for mdio-gpio

2018-12-06 Thread Andrew Lunn
On Thu, Dec 06, 2018 at 09:22:27AM -0800, Florian Fainelli wrote: > Hi Andrew, > > On 12/6/18 5:58 AM, Andrew Lunn wrote: > > Soon to be mainlined is an x86 platform with a Marvell switch, and a > > bit-banging MDIO bus. In order to make this work, the phy_mask of the > > MDIO bus needs to be set

Re: [PATCH 1/2] net: linkwatch: send change uevent on link changes

2018-12-06 Thread David Miller
From: Jouke Witteveen Date: Thu, 6 Dec 2018 09:59:20 +0100 > On Thu, Dec 6, 2018 at 1:34 AM David Miller wrote: >> >> From: Jouke Witteveen >> Date: Wed, 5 Dec 2018 23:38:17 +0100 >> >> > Can you elaborate a bit? I may not be aware of the policy you have in >> > mind. >> >> When we have a user

RE: [PATCH RFC 2/6] net: dsa: microchip: Add MIB counter reading support

2018-12-06 Thread Tristram.Ha
> > +static void ksz9477_r_mib_cnt(struct ksz_device *dev, int port, u16 addr, > > + u64 *cnt) > > +{ > > + u32 data; > > + int timeout; > > + struct ksz_port *p = >ports[port]; > > + > > + /* retain the flush/freeze bit */ > > + data = p->freeze ?

Re: [PATCH][net-next] tun: align write-heavy flow entry members to a cache line

2018-12-06 Thread David Miller
From: Li RongQing Date: Thu, 6 Dec 2018 16:08:17 +0800 > tun flow entry 'updated' fields are written when receive > every packet. Thus if a flow is receiving packets from a > particular flow entry, it'll cause false-sharing with > all the other who has looked it up, so move it in its own >

Re: [PATCH][net-next] tun: remove unnecessary check in tun_flow_update

2018-12-06 Thread David Miller
From: Li RongQing Date: Thu, 6 Dec 2018 16:28:11 +0800 > caller has guaranted that rxhash is not zero > > Signed-off-by: Li RongQing Applied.

Re: [PATCH 1/2] net: linkwatch: send change uevent on link changes

2018-12-06 Thread Jouke Witteveen
On Thu, Dec 6, 2018 at 9:10 PM David Miller wrote: > > From: Jouke Witteveen > Date: Thu, 6 Dec 2018 09:59:20 +0100 > > > On Thu, Dec 6, 2018 at 1:34 AM David Miller wrote: > >> > >> From: Jouke Witteveen > >> Date: Wed, 5 Dec 2018 23:38:17 +0100 > >> > >> > Can you elaborate a bit? I may not

Re: [PATCH RFC 5/6] net: dsa: microchip: Update tag_ksz.c to access switch driver

2018-12-06 Thread Andrew Lunn
> I did try to implement this way. But the other switches do not have the same > format even though the length is the same. Then I need to change the > following > files for any new KSZ switch: include/linux/dsa.h, net/dsa/dsa.c, > net/dsa/dsa_priv.h, > and finally net/dsa/tag_ksz.c. You can

Re: [PATCH net-next 2/2] net: dsa: Set the master device's MTU to account for DSA overheads

2018-12-06 Thread David Miller
From: Andrew Lunn Date: Thu, 6 Dec 2018 21:48:46 +0100 > David has already accepted the patchset, so i will add a followup > patch. Yeah sorry for jumping the gun, the changes looked pretty straightforward to me. :-/

Re: [PATCH] tcp: fix code style in tcp_recvmsg()

2018-12-06 Thread David Miller
From: Pedro Tammela Date: Thu, 6 Dec 2018 10:45:28 -0200 > 2 goto labels are indented with a tab. remove the tabs and > keep the code style consistent. > > Signed-off-by: Pedro Tammela Applied to net-next.

Re: mv88e6060: Turn e6060 driver into e6065 driver

2018-12-06 Thread Pavel Machek
On Thu 2018-12-06 12:23:33, David Miller wrote: > From: Pavel Machek > Date: Thu, 6 Dec 2018 14:03:45 +0100 > > > @@ -79,7 +82,7 @@ static enum dsa_tag_protocol > > mv88e6060_get_tag_protocol(struct dsa_switch *ds, > > { > >//return DSA_TAG_PROTO_QCA; > >//return DSA_TAG_PROTO_TRAILER;

Re: [PATCH RFC 2/6] net: dsa: microchip: Add MIB counter reading support

2018-12-06 Thread Andrew Lunn
> I wonder what is the official way to clear the counters. I don't think there is one, other than unloading the driver and loading it again. Andrew

Re: [PATCH net-next 2/2] net: dsa: Set the master device's MTU to account for DSA overheads

2018-12-06 Thread Andrew Lunn
On Thu, Dec 06, 2018 at 12:21:31PM -0800, Florian Fainelli wrote: > On 12/6/18 2:36 AM, Andrew Lunn wrote: > > DSA tagging of frames sent over the master interface to the switch > > increases the size of the frame. Such frames can then be bigger than > > the normal MTU of the master interface, and

RE: [Intel-wired-lan] [PATCH v3 1/2] i40e: fix VLAN.TCI == 0 RX HW offload

2018-12-06 Thread Bowers, AndrewX
> -Original Message- > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Michal Miroslaw > Sent: Tuesday, December 4, 2018 9:31 AM > To: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org > Subject: [Intel-wired-lan] [PATCH v3 1/2] i40e: fix VLAN.TCI ==

[PATCH net-next] neighbour: Improve garbage collection

2018-12-06 Thread David Ahern
From: David Ahern The existing garbage collection algorithm has a number of problems: 1. The gc algorithm will not evict PERMANENT entries as those entries are managed by userspace, yet the existing algorithm walks the entire hash table which means it always considers PERMANENT entries

[PATCH net-next,v5 09/12] ethtool: add ethtool_rx_flow_spec to flow_rule structure translator

2018-12-06 Thread Pablo Neira Ayuso
This patch adds a function to translate the ethtool_rx_flow_spec structure to the flow_rule representation. This allows us to reuse code from the driver side given that both flower and ethtool_rx_flow interfaces use the same representation. This patch also includes support for the flow type

[PATCH net-next,v5 06/12] drivers: net: use flow action infrastructure

2018-12-06 Thread Pablo Neira Ayuso
This patch updates drivers to use the new flow action infrastructure. Signed-off-by: Pablo Neira Ayuso --- v5: rebase on top of net-next head. drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 74 +++--- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 250 +--

[PATCH net-next,v5 12/12] qede: use ethtool_rx_flow_rule() to remove duplicated parser code

2018-12-06 Thread Pablo Neira Ayuso
The qede driver supports for ethtool_rx_flow_spec and flower, both codebases look very similar. This patch uses the ethtool_rx_flow_rule() infrastructure to remove the duplicated ethtool_rx_flow_spec parser and consolidate ACL offload support around the flow_rule infrastructure. Furthermore,

[PATCH net-next,v5 04/12] cls_api: add translator to flow_action representation

2018-12-06 Thread Pablo Neira Ayuso
This patch implements a new function to translate from native TC action to the new flow_action representation. Moreover, this patch also updates cls_flower to use this new function. Signed-off-by: Pablo Neira Ayuso --- v5: rebase on top of net-next head. include/net/pkt_cls.h | 3 ++

[PATCH net-next,v5 07/12] cls_flower: don't expose TC actions to drivers anymore

2018-12-06 Thread Pablo Neira Ayuso
Now that drivers have been converted to use the flow action infrastructure, remove this field from the tc_cls_flower_offload structure. Signed-off-by: Pablo Neira Ayuso --- v5: rebase on top of net-next head. include/net/pkt_cls.h | 1 - net/sched/cls_flower.c | 5 - 2 files changed, 6

[PATCH net-next,v5 05/12] flow_offload: add statistics retrieval infrastructure and use it

2018-12-06 Thread Pablo Neira Ayuso
This patch provides the flow_stats structure that acts as container for tc_cls_flower_offload, then we can use to restore the statistics on the existing TC actions. Hence, tcf_exts_stats_update() is not used from drivers anymore. Signed-off-by: Pablo Neira Ayuso --- v5: Fix bytes and packet

[PATCH net-next,v5 02/12] net/mlx5e: support for two independent packet edit actions

2018-12-06 Thread Pablo Neira Ayuso
This patch adds pedit_headers_action structure to store the result of parsing tc pedit actions. Then, it calls alloc_tc_pedit_action() to populate the mlx5e hardware intermediate representation once all actions have been parsed. This patch comes in preparation for the new flow_action

[PATCH net-next,v5 03/12] flow_offload: add flow action infrastructure

2018-12-06 Thread Pablo Neira Ayuso
This new infrastructure defines the nic actions that you can perform from existing network drivers. This infrastructure allows us to avoid a direct dependency with the native software TC action representation. Signed-off-by: Pablo Neira Ayuso --- v5: rebase on top of net-next head.

[PATCH net-next,v5 00/12] add flow_rule infrastructure

2018-12-06 Thread Pablo Neira Ayuso
Hi, This is another iteration of the in-kernel intermediate representation (IR) that allows to express ACL hardware offloads using one unified representation from the driver side for the ethtool and the tc frontends [1] [2] [3]. In words of Michal Kubecek: "... the ethtool interface can apply

[PATCH net-next,v5 08/12] flow_offload: add wake-up-on-lan and queue to flow_action

2018-12-06 Thread Pablo Neira Ayuso
These actions need to be added to support the ethtool_rx_flow interface. The queue action includes a field to specify the RSS context, that is set via FLOW_RSS flow type flag and the rss_context field in struct ethtool_rxnfc, plus the corresponding queue index. FLOW_RSS implies that rss_context is

[PATCH net-next,v5 11/12] qede: place ethtool_rx_flow_spec after code after TC flower codebase

2018-12-06 Thread Pablo Neira Ayuso
This is a preparation patch to reuse the existing TC flower codebase from ethtool_rx_flow_spec. This patch is merely moving the core ethtool_rx_flow_spec parser after tc flower offload driver code so we can skip a few forward function declarations in the follow up patch. Signed-off-by: Pablo

[PATCH net-next,v5 01/12] flow_offload: add flow_rule and flow_match structures and use them

2018-12-06 Thread Pablo Neira Ayuso
This patch wraps the dissector key and mask - that flower uses to represent the matching side - around the flow_match structure. To avoid a follow up patch that would edit the same LoCs in the drivers, this patch also wraps this new flow match structure around the flow rule object. This new

[PATCH net-next,v5 10/12] dsa: bcm_sf2: use flow_rule infrastructure

2018-12-06 Thread Pablo Neira Ayuso
Update this driver to use the flow_rule infrastructure, hence we can use the same code to populate hardware IR from ethtool_rx_flow and the cls_flower interfaces. Signed-off-by: Pablo Neira Ayuso --- v5: rebase on top of net-next head. drivers/net/dsa/bcm_sf2_cfp.c | 102

[PATCH net-next 4/4] tc-testing: gitignore, ignore generated test results

2018-12-06 Thread Lucas Bates
Ignore any .tap or .xml test result files generated by tdc. Additionally, ignore plugin symlinks. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/tc-testing/.gitignore

[PATCH net-next 2/4] tc-testing: Add new TdcResults module

2018-12-06 Thread Lucas Bates
This module includes new classes for tdc to use in keeping track of test case results, instead of generating and tracking a lengthy string. The new module can be extended to support multiple formal test result formats to be friendlier to automation. Signed-off-by: Lucas Bates ---

[PATCH net-next 0/4] tc-testing: implement command timeouts and better results tracking

2018-12-06 Thread Lucas Bates
Patch 1 adds a timeout feature for any command tdc launches in a subshell. This prevents tdc from hanging indefinitely. Patches 2-4 introduce a new method for tracking and generating test case results, and implements it across the core script and all applicable plugins. Lucas Bates (4):

[PATCH net-next 1/4] tc-testing: Add command timeout feature to tdc

2018-12-06 Thread Lucas Bates
Using an attribute set in the tdc_config.py file, limit the amount of time tdc will wait for an executed command to complete and prevent the script from hanging entirely. This timeout will be applied to all executed commands. Signed-off-by: Lucas Bates ---

[PATCH net-next 3/4] tc-testing: Implement the TdcResults module in tdc

2018-12-06 Thread Lucas Bates
In tdc and the valgrind plugin, begin using the TdcResults module to track executed test cases. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/TdcPlugin.py| 3 +- .../tc-testing/plugin-lib/valgrindPlugin.py| 22 +++- tools/testing/selftests/tc-testing/tdc.py

[net-next PATCH RFC 5/8] net: mvneta: remove copybreak, prefetch and use build_skb

2018-12-06 Thread Jesper Dangaard Brouer
From: Ilias Apalodimas The driver memcpy for packets < 256b and it's recycle tricks are not needed anymore. As previous patch introduces buffer recycling using the page_pool API (although recycling doesn't get fully activated in this patch). After this switch to using build_skb(). This patch

[net-next PATCH RFC 8/8] veth: xdp_frames redirected into veth need to transfer xdp_mem_info

2018-12-06 Thread Jesper Dangaard Brouer
XDP frames redirected into a veth device, that choose XDP_PASS end-up creating an SKB from the xdp_frame. The xdp_frame mem info need to be transferred into the SKB. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Ilias Apalodimas --- drivers/net/veth.c |1 + 1 file changed, 1

[net-next PATCH RFC 4/8] net: core: add recycle capabilities on skbs via page_pool API

2018-12-06 Thread Jesper Dangaard Brouer
From: Ilias Apalodimas This patch is changing struct sk_buff, and is thus per-definition controversial. Place a new member 'mem_info' of type struct xdp_mem_info, just after members (flags) head_frag and pfmemalloc, And not in between headers_start/end to ensure skb_copy() and pskb_copy() work

[net-next PATCH RFC 7/8] xdp: bpf: cpumap redirect must update skb->mem_info

2018-12-06 Thread Jesper Dangaard Brouer
XDP-redirect to CPUMAP is about creating the SKB outside the driver (and on another CPU) via xdp_frame info. Transfer the xdp_frame mem info to the new SKB mem_info field. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Ilias Apalodimas --- kernel/bpf/cpumap.c |2 ++ 1 file changed, 2

[net-next PATCH RFC 0/8] page_pool DMA handling and allow to recycles frames via SKB

2018-12-06 Thread Jesper Dangaard Brouer
This RFC patchset shows the plans for allowing page_pool to handle and maintain DMA map/unmap of the pages it serves to the driver. For this to work a return hook in the network core is introduced, which also involves extending sk_buff with the necessary information. The overall purpose is to

[net-next PATCH RFC 2/8] net: mvneta: use page pool API for sw buffer manager

2018-12-06 Thread Jesper Dangaard Brouer
From: Ilias Apalodimas Use the page_pool api for allocations and DMA handling instead of __dev_alloc_page()/dma_map_page() and free_page()/dma_unmap_page(). The page_pool API offers buffer recycling capabilities for XDP but allocates one page per packet, unless the driver splits and manages the

[net-next PATCH RFC 1/8] page_pool: add helper functions for DMA

2018-12-06 Thread Jesper Dangaard Brouer
From: Ilias Apalodimas Add helper functions for retreiving dma_addr_t stored in page_private and unmapping dma addresses, mapped via the page_pool API. Signed-off-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer --- include/net/page_pool.h |6 ++ net/core/page_pool.c|

[net-next PATCH RFC 6/8] mvneta: activate page recycling via skb using page_pool

2018-12-06 Thread Jesper Dangaard Brouer
Previous mvneta patches have already started to use page_pool, but this was primarily for RX page alloc-side and for doing DMA map/unmap handling. Pages traveling through the netstack was unmapped and returned through the normal page allocator. It is now time to activate that pages are recycled

RE: [Intel-wired-lan] [PATCH v3 2/2] i40e: DRY rx_ptype handling code

2018-12-06 Thread Bowers, AndrewX
> -Original Message- > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Michal Miroslaw > Sent: Tuesday, December 4, 2018 9:31 AM > To: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org > Subject: [Intel-wired-lan] [PATCH v3 2/2] i40e: DRY rx_ptype

RE: [Intel-wired-lan] [PATCH] ixgbe: Fix race when the VF driver does a reset

2018-12-06 Thread Bowers, AndrewX
> -Original Message- > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Ross Lagerwall > Sent: Wednesday, December 5, 2018 5:54 AM > To: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org > Cc: Ross Lagerwall ; David S. Miller > > Subject:

[net-next PATCH RFC 3/8] xdp: reduce size of struct xdp_mem_info

2018-12-06 Thread Jesper Dangaard Brouer
It is possible to compress/reduce the size of struct xdp_mem_info. This change reduce struct xdp_mem_info from 8 bytes to 4 bytes. The member xdp_mem_info.id can be reduced to u16, as the mem_id_ht rhashtable in net/core/xdp.c is already limited by MEM_ID_MAX=0xFFFE which can safely fit in u16.

Re: OMAP4430 SDP with KS8851: very slow networking

2018-12-06 Thread Tony Lindgren
* Russell King - ARM Linux [181206 18:08]: > reverted, the problem is still there. Revert: > > ec0daae685b2 ("gpio: omap: Add level wakeup handling for omap4 based SoCs") > > on top, and networking returns to normal. So it appears to be this > last commit causing the issue. > > With that and

Re: [PATCH net-next 2/2] net: dsa: Set the master device's MTU to account for DSA overheads

2018-12-06 Thread Stephen Hemminger
On Thu, 6 Dec 2018 11:36:05 +0100 Andrew Lunn wrote: > +void dsa_master_set_mtu(struct net_device *dev, struct dsa_port *cpu_dp) > +{ > + unsigned int mtu = ETH_DATA_LEN + cpu_dp->tag_ops->overhead; > + int err; > + > + rtnl_lock(); > + if (mtu <= dev->max_mtu) { > +

[PATCH bpf] bpf: powerpc: fix broken uapi for BPF_PROG_TYPE_PERF_EVENT

2018-12-06 Thread Sandipan Das
Now that there are different variants of pt_regs for userspace and kernel, the uapi for the BPF_PROG_TYPE_PERF_EVENT program type must be changed by exporting the user_pt_regs structure instead of the pt_regs structure that is in-kernel only. Fixes: 002af9391bfb ("powerpc: Split user/kernel

Re: [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-06 Thread Vasundhara Volam
On Thu, Dec 6, 2018 at 2:41 PM Jiri Pirko wrote: > > Thu, Dec 06, 2018 at 09:57:05AM CET, michael.c...@broadcom.com wrote: > >On Wed, Dec 5, 2018 at 11:11 PM Jakub Kicinski > > wrote: > >> > >> On Wed, 5 Dec 2018 22:41:43 -0800, Michael Chan wrote: > >> > > >> > It will be in the BIOS only for a

Re: [PATCH 1/3] net: macb: fix random memory corruption on RX with 64-bit DMA

2018-12-06 Thread Claudiu.Beznea
On 05.12.2018 22:32, David Miller wrote: > From: Anssi Hannula > Date: Fri, 30 Nov 2018 20:21:35 +0200 > >> @@ -682,6 +682,11 @@ static void macb_set_addr(struct macb *bp, struct >> macb_dma_desc *desc, dma_addr_ >> if (bp->hw_dma_cap & HW_DMA_CAP_64B) { >> desc_64 =

[PATCH net-next 4/4] net: aquantia: add support of RSS configuration

2018-12-06 Thread Igor Russkikh
From: Dmitry Bogdanov Add support of configuration of RSS hash key and RSS indirection table. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh --- .../ethernet/aquantia/atlantic/aq_ethtool.c | 42 +++ 1 file changed, 42 insertions(+) diff --git

[PATCH net-next 1/4] net: aquantia: fix RSS table and key sizes

2018-12-06 Thread Igor Russkikh
From: Dmitry Bogdanov Set RSS indirection table and RSS hash key sizes to their real size. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 4 ++-- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 +- 2 files changed, 3

[PATCH net-next 3/4] net: aquantia: fix initialization of RSS table

2018-12-06 Thread Igor Russkikh
From: Dmitry Bogdanov Now RSS indirection table is initialized before setting up the number of hw queues, consequently the table may be filled by non existing queues. This patch moves the initialization when the number of hw queues is known. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor

[PATCH net-next 2/4] net: aquantia: increase max number of hw queues

2018-12-06 Thread Igor Russkikh
From: Dmitry Bogdanov Increase the upper limit of the hw queues up to 8. This makes RSS better on multiheaded cpus. This is a maximum AQC hardware supports in one traffic class. The actual value is still limited by a number of available cpu cores. Signed-off-by: Dmitry Bogdanov

[PATCH net-next 0/4] net: aquantia: add RSS configuration

2018-12-06 Thread Igor Russkikh
In this patchset few bugs related to RSS are fixed and RSS table and hash key configuration is added. We also do increase max number of HW rings upto 8. Dmitry Bogdanov (4): net: aquantia: fix RSS table and key sizes net: aquantia: increase max number of hw queues net: aquantia: fix

[RFD] mv88e6060: Allow the driver to be probed from device tree

2018-12-06 Thread Pavel Machek
mv88e6060: Allow the driver to be probed from device tree This is NOT ready for merge. Hardcoding an address is a bad idea, and obviously it would be good to allow module removal, too. Signed-off-by: Pavel Machek (not ready) diff --git a/drivers/net/dsa/mv88e6060.c

[PATCH net-next 1/2] net: phy: mdio-gpio: Add platform_data support for phy_mask

2018-12-06 Thread Andrew Lunn
It is sometimes necessary to instantiate a bit-banging MDIO bus as a platform device, without the aid of device tree. When device tree is being used, the bus is not scanned for devices, only those devices which are in device tree are probed. Without device tree, by default, all addresses on the

[PATCH net-next 0/2] platform data controls for mdio-gpio

2018-12-06 Thread Andrew Lunn
Soon to be mainlined is an x86 platform with a Marvell switch, and a bit-banging MDIO bus. In order to make this work, the phy_mask of the MDIO bus needs to be set to prevent scanning for PHYs, and the phy_ignore_ta_mask needs to be set because the switch has broken turnaround. Add a

[PATCH] dpaa_eth: Add dpaa_change_carrier()

2018-12-06 Thread Joakim Tjernlund
This allows to control carrier from /sys/class/net/ethX/carrier Signed-off-by: Joakim Tjernlund --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

[PATCH] gianfar: Add gfar_change_carrier()

2018-12-06 Thread Joakim Tjernlund
This allows to control carrier from /sys/class/net/ethX/carrier Signed-off-by: Joakim Tjernlund --- drivers/net/ethernet/freescale/gianfar.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c

[PATCH] ucc_geth: Add ucc_geth_change_carrier()

2018-12-06 Thread Joakim Tjernlund
This allows to control carrier from /sys/class/net/ethX/carrier Signed-off-by: Joakim Tjernlund --- drivers/net/ethernet/freescale/ucc_geth.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c

Re: [PATCH net-next 3/4] net: use indirect call wrapper at GRO transport layer

2018-12-06 Thread kbuild test robot
Hi Paolo, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Paolo-Abeni/net-mitigate-retpoline-overhead/20181206-183400 config: i386-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1

Re: [PATCH RFC 5/6] net: dsa: microchip: Update tag_ksz.c to access switch driver

2018-12-06 Thread Richard Cochran
On Thu, Dec 06, 2018 at 08:00:26PM +, tristram...@microchip.com wrote: > A customer has already inquired about implementing 1588 PTP in the DSA > driver. I hope > this mechanism is approved so that I can start doing that. If you need changes to the PTP core, you had better discuss this with

Re: [PATCH rdma-next 0/3] Packet based credit mode

2018-12-06 Thread Jason Gunthorpe
On Fri, Nov 30, 2018 at 01:22:03PM +0200, Leon Romanovsky wrote: > From: Leon Romanovsky > > >From Danit, > > Packet based credit mode is an alternative end-to-end credit mode for QPs > set during their creation. Credits are transported from the responder > to the requester to optimize the use

[PATCH] Revert "net/ibm/emac: wrong bit is used for STA control"

2018-12-06 Thread Benjamin Herrenschmidt

[PATCH bpf] selftests/bpf: skip sockmap tests on kernels without support

2018-12-06 Thread Stanislav Fomichev
Include "autoconf.h" header in the test_maps.c and selectively disable test_sockmap if CONFIG_BPF_STREAM_PARSER is not specified in the kernel config. When building out of tree/without autoconf.h, fall back to 'enabled'. Signed-off-by: Stanislav Fomichev ---

[PATCH] mv88e6060: Warn about errors

2018-12-06 Thread Pavel Machek
Errors communicating with the chip are not expected, warn about them. Signed-off-by: Pavel Machek diff --git a/drivers/net/dsa/mv88e6060.c b/drivers/net/dsa/mv88e6060.c index 65f10fec25b3..f43104f48dbb 100644 --- a/drivers/net/dsa/mv88e6060.c +++ b/drivers/net/dsa/mv88e6060.c @@ -30,8

Well supported DSA switches, support for Marvell 88e6065 switch

2018-12-06 Thread Pavel Machek
Hi! > I'm trying to create support for Marvell 88e6065 switch... and it > seems like drivers/net/dsa supports everything, but this model. I have something that works, but is far from suitable for mainline. Few parts are good, those will be marked PATCH, rest will be RFD. I'm not sure how much

[RFC] tag_daddr: add tagging scheme used by Marvel 88e6065 switch

2018-12-06 Thread Pavel Machek
Tagging scheme used by 88e6065 is "interesting" as it moves around ethernet addreses and forces us to use PROMISC mode on the ethernets. I'm not sure how to call it, so I selected tag_daddr ("tag where destination address should be"). Signed-off-by: Pavel Machek diff --git a/include/net/dsa.h

OMAP4430 SDP with KS8851: very slow networking

2018-12-06 Thread Russell King - ARM Linux
Hi, I'm experiencing very slow networking on my OMAP4430 SDP board, which uses the SPI ethernet chip KS8851. The initial symptom I noticed is that tftping the 3MB kernel image inside Linux takes more than 5 minutes. Running tcpdump on the tftp server shows: 13:13:29.018377 IP

[PATCH] tcp: fix code style in tcp_recvmsg()

2018-12-06 Thread Pedro Tammela
2 goto labels are indented with a tab. remove the tabs and keep the code style consistent. Signed-off-by: Pedro Tammela --- net/ipv4/tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 9e6bc4d6daa7..8b92d66a5f41 100644 ---

mv88e6060: Turn e6060 driver into e6065 driver

2018-12-06 Thread Pavel Machek
This is NOT ready for merge, as you lose support for 6060. Probably not what you want. Signed-off-by: Pavel Machek (not ready) diff --git a/drivers/net/dsa/mv88e6060.c b/drivers/net/dsa/mv88e6060.c index 9e3901f18518..9c9b4792bbad 100644 --- a/drivers/net/dsa/mv88e6060.c +++

  1   2   >