[net-next PATCH] mlx4: add missed recycle opportunity for XDP_TX on TX failure

2016-09-19 Thread Jesper Dangaard Brouer
Correct drop handling for XDP_TX on TX failure, were recently added in commit 95357907ae73 ("mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full"). The change missed an opportunity for recycling the RX page, instead of going through the page allocator, like the regular XDP_DROP action does. T

Re: [net PATCH V3] mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full

2016-09-19 Thread Jesper Dangaard Brouer
On Mon, 19 Sep 2016 01:39:25 -0400 (EDT) David Miller wrote: > From: Jesper Dangaard Brouer > Date: Sat, 17 Sep 2016 17:48:00 +0200 > > > The XDP_TX action can fail transmitting the frame in case the TX ring > > is full or port is down. In case of TX failure it should drop the > > frame, and n

[PATCH net] cxgb4/cxgb4vf: Allocate more queues for 100G adapter

2016-09-19 Thread Hariprasad Shenai
We were missing check for 100G while checking port speed, which lead to less number of queues getting allocated for 100G and leading to low throughput. Adding the missing check for both NIC and vNIC driver. Signed-off-by: Hariprasad Shenai --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c|

[PATCH net-next 00/10] bnxt: update for net-next.

2016-09-19 Thread Michael Chan
Misc. changes and minor bug fixes for net-next. Please review. Deepak Khungar (1): bnxt_en: Support for "ethtool -r" command Eddie Wai (1): bnxt_en: Fixed the VF link status after a link state change Michael Chan (7): bnxt_en: Use RSS flags defined in the bnxt_hsi.h file. bnxt_en: Simpl

[PATCH net-next 02/10] bnxt_en: Simplify PCI device names and add additinal PCI IDs.

2016-09-19 Thread Michael Chan
Remove "Single-port/Dual-port" from the device names. Dual-port devices will appear as 2 separate devices, so no need to call each a dual-port device. Use a more generic name for VF devices belonging to the same chip fanmily. Add some remaining NPAR device IDs. Signed-off-by: David Christensen

[PATCH net-next 01/10] bnxt_en: Use RSS flags defined in the bnxt_hsi.h file.

2016-09-19 Thread Michael Chan
And remove redundant definitions of the same flags. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 - 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.

[PATCH net-next 04/10] bnxt_en: Added support for Secure Firmware Update

2016-09-19 Thread Michael Chan
From: Rob Swindell Using Ethtool flashdev command, entire NVM package (*.pkg) files may now be staged into the "update" area of the NVM and subsequently verified and installed by the firmware using the newly introduced command: NVM_INSTALL_UPDATE. We also introduce use of the new firmware comman

[PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

2016-09-19 Thread Michael Chan
The existing code is inconsistent in reporting and accepting the combined channel count. bnxt_get_channels() reports maximum combined as the maximum rx count. bnxt_set_channels() accepts combined count that cannot be bigger than max rx or max tx. For example, if max rx = 2 and max tx = 1, we rep

[PATCH net-next 09/10] bnxt_en: Support for "ethtool -r" command

2016-09-19 Thread Michael Chan
From: Deepak Khungar Restart autoneg if autoneg is enabled. Signed-off-by: Deepak Khungar Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool

[PATCH net-next 10/10] bnxt_en: Fixed the VF link status after a link state change

2016-09-19 Thread Michael Chan
From: Eddie Wai The VF link state can be changed via the 'ip link set' cmd. Currently, the new link state does not take effect immediately. The fix is for the PF to send a link change async event to the designated VF after a VF link state change. This async event will trigger the VF to update t

[PATCH net-next 07/10] bnxt_en: Call firmware to approve the random VF MAC address.

2016-09-19 Thread Michael Chan
After generating the random MAC address for VF, call the firmware to approve it. This step serves 2 purposes. Some hypervisor (e.g. ESX) wants to approve the MAC address. 2nd, the call will setup the proper forwarding database in the internal switch. We need to unlock the hwrm_cmd_lock mutex be

[PATCH net-next 08/10] bnxt_en: Pad TX packets below 52 bytes.

2016-09-19 Thread Michael Chan
The hardware has a limitation that it won't pass host to BMC loopback packets below 52-bytes. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/eth

[PATCH net-next 06/10] bnxt_en: Re-arrange bnxt_hwrm_func_qcaps().

2016-09-19 Thread Michael Chan
Re-arrange the code so that the generation of the random MAC address for the VF is at the end of the function. The next patch will add one more step to call bnxt_approve_mac() to get the firmware to approve the random MAC address. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bn

[PATCH net-next 03/10] bnxt_en: Update to firmware interface spec 1.5.1.

2016-09-19 Thread Michael Chan
Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c |3 + drivers/net/ethernet/broadcom/bnxt/bnxt.h | 14 +- drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 1251 +++-- 3 files changed, 760 insertions(+), 508 deletions(-) diff --git a/drive

Re: [PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
> OK, it's finally ready now. > > This series contains one two patches.  The first adds the rhlist > interface and the second converts mac80211 to use it.  If this works > out I'll then proceed to convert the other insecure_elasticity > users over to this. Thanks a lot Herbert! > I've tested th

Re: [PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
> Yes, it's passing all the wpa_supplicant tests, so > > Acked-by: Johannes Berg > I take that back. I think it's leaking memory - my tests never used to run out of memory, but now they eventually do. I'll try to figure out more. johannes

RE: [PATCH net-next 09/10] bnxt_en: Support for "ethtool -r" command

2016-09-19 Thread Mintz, Yuval
> Restart autoneg if autoneg is enabled. > + if (!(link_info->autoneg & BNXT_AUTONEG_SPEED)) > + return -EINVAL; Looks like a lot of the of implementations of this ethtool are unconditionally doing the reset. Perhaps the right thing to do is check for autoneg availability at the e

RE: [PATCH net-next 04/10] bnxt_en: Added support for Secure Firmware Update

2016-09-19 Thread Mintz, Yuval
> + if (bp->hwrm_spec_code < 0x10400) > + return -EOPNOTSUPP; Don't you use defines for these kind of version values? > static int bnxt_flash_package_from_file(struct net_device *dev, ... > + rc = request_firmware(&fw, filename, &dev->dev); > + if (rc != 0) { If (rc) > +

RE: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

2016-09-19 Thread Mintz, Yuval
> The existing code is inconsistent in reporting and accepting the combined > channel count. bnxt_get_channels() reports maximum combined as the > maximum rx count. bnxt_set_channels() accepts combined count that cannot be > bigger than max rx or max tx. > > For example, if max rx = 2 and max tx

Re: [PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Herbert Xu
On Mon, Sep 19, 2016 at 10:25:18AM +0200, Johannes Berg wrote: > > > Yes, it's passing all the wpa_supplicant tests, so > > > > Acked-by: Johannes Berg > > > > I take that back. I think it's leaking memory - my tests never used to > run out of memory, but now they eventually do. > > I'll try

[v2 PATCH 2/2] mac80211: Use rhltable instead of rhashtable

2016-09-19 Thread Herbert Xu
mac80211 currently uses rhashtable with insecure_elasticity set to true. The latter is because of duplicate objects. What's more, mac80211 walks the rhashtable chains by hand which is broken as rhashtable may contain multiple tables due to resizing or rehashing. This patch fixes it by converting

[v2 PATCH 1/2] rhashtable: Add rhlist interface

2016-09-19 Thread Herbert Xu
The insecure_elasticity setting is an ugly wart brought out by users who need to insert duplicate objects (that is, distinct objects with identical keys) into the same table. In fact, those users have a much bigger problem. Once those duplicate objects are inserted, they don't have an interface t

[v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Herbert Xu
v2 contains a reworked insertion slowpath to ensure that the spinlock for the table we're inserting into is taken. This series contains one two patches. The first adds the rhlist interface and the second converts mac80211 to use it. If this works out I'll then proceed to convert the other insecu

Re: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

2016-09-19 Thread Michael Chan
On Mon, Sep 19, 2016 at 1:33 AM, Mintz, Yuval wrote: >> The existing code is inconsistent in reporting and accepting the combined >> channel count. bnxt_get_channels() reports maximum combined as the >> maximum rx count. bnxt_set_channels() accepts combined count that cannot be >> bigger than ma

Re: [PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
> > I take that back. I think it's leaking memory - my tests never used > > to run out of memory, but now they eventually do. > > > I'll try to figure out more. > > Interesting.  The kernel test robot found a bug in the insertion > slowpath where we end up inserting without taking the inner spin

RE: [RFC 06/11] Add support for QP verbs

2016-09-19 Thread Amrani, Ram
> > + > > + rc = ib_get_cached_gid(ibqp->device, attr->ah_attr.port_num, > > + attr->ah_attr.grh.sgid_index, &gid, &gid_attr); > > + if (!rc && !memcmp(&gid, &zgid, sizeof(gid))) > > + rc = -ENOENT; > > + > > + if (!rc && gid_attr.ndev) { > > +

RE: [RFC 03/11] Add support for RoCE HW init

2016-09-19 Thread Amrani, Ram
> > > + dev->max_sge = min_t(u32, RDMA_MAX_SGE_PER_SQ_WQE, > > > + RDMA_MAX_SGE_PER_RQ_WQE); > > > > Our kernel target mode consumers sort of rely on max_sge_rd, you need > > to make sure to set it too. > Good catch. Thanks! Actually, as I come to code this, I just realized th

Re: [PATCH net-next 04/10] bnxt_en: Added support for Secure Firmware Update

2016-09-19 Thread Michael Chan
On Mon, Sep 19, 2016 at 1:16 AM, Mintz, Yuval wrote: >> + if (bp->hwrm_spec_code < 0x10400) >> + return -EOPNOTSUPP; > Don't you use defines for these kind of version values? No we don't. In this case, firmware spec version 1.4.0 has added this new feature. So we use this featur

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
On Mon, 2016-09-19 at 16:40 +0800, Herbert Xu wrote: > I've tested the rhlist code with test_rhashtable but I haven't > tested the mac80211 conversion.  So please give it a go and see > if it still works. This is still running out of memory on my test suite. Somehow I don't see kmemleak kicking

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Herbert Xu
On Mon, Sep 19, 2016 at 11:15:30AM +0200, Johannes Berg wrote: > On Mon, 2016-09-19 at 16:40 +0800, Herbert Xu wrote: > > > I've tested the rhlist code with test_rhashtable but I haven't > > tested the mac80211 conversion.  So please give it a go and see > > if it still works. > > This is still r

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
> What does your test suite actually do? Is it something that I > can run without special hardware? Yes, it's pretty simple - it spins up a number of VMs with hwsim and just runs a lot of tests: https://w1.fi/cgit/hostap/tree/tests/hwsim I've attached a kernel .config you can use for it. I'm r

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
On Mon, 2016-09-19 at 11:27 +0200, Johannes Berg wrote: > >  > I have a feeling there's a bug with ht->nelems, since the crash is > always in the grow worker, but I haven't quite put my finger on it > yet. > Btw, I should not actually get into the duplicate case here. johannes

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Herbert Xu
On Mon, Sep 19, 2016 at 11:27:24AM +0200, Johannes Berg wrote: > > I have a feeling there's a bug with ht->nelems, since the crash is > always in the grow worker, but I haven't quite put my finger on it yet. Can you show me a stack trace? Thanks, -- Email: Herbert Xu Home Page: http://gondor.a

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
On Mon, 2016-09-19 at 17:34 +0800, Herbert Xu wrote: > On Mon, Sep 19, 2016 at 11:27:24AM +0200, Johannes Berg wrote: > > > > > > I have a feeling there's a bug with ht->nelems, since the crash is > > always in the grow worker, but I haven't quite put my finger on it > > yet. > > Can you show me

Re: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

2016-09-19 Thread Michael Chan
On Mon, Sep 19, 2016 at 2:21 AM, Mintz, Yuval wrote: >> >> The existing code is inconsistent in reporting and accepting the >> >> combined channel count. bnxt_get_channels() reports maximum combined >> >> as the maximum rx count. bnxt_set_channels() accepts combined count >> >> that cannot be bi

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
On Mon, 2016-09-19 at 17:34 +0800, Herbert Xu wrote: > On Mon, Sep 19, 2016 at 11:27:24AM +0200, Johannes Berg wrote: > > > > > > I have a feeling there's a bug with ht->nelems, since the crash is > > always in the grow worker, but I haven't quite put my finger on it > > yet. > > Can you show me

RE: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

2016-09-19 Thread Mintz, Yuval
> >> >> The existing code is inconsistent in reporting and accepting the > >> >> combined channel count. bnxt_get_channels() reports maximum > >> >> combined as the maximum rx count. bnxt_set_channels() accepts > >> >> combined count that cannot be bigger than max rx or max tx. > >> >> > >> >> Fo

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
> The stack trace is useless, but my other annotation showed that the > table's nelems *underflowed* to -1, so now the worker will continue > to try to grow it forever. > And this *was* actually a case of duplication, afaict, since it was multiple virtual interfaces on the same device all connec

RE: [PATCH net-next 05/10] bnxt_en: Fix ethtool -l|-L inconsistent channel counts.

2016-09-19 Thread Mintz, Yuval
> >> The existing code is inconsistent in reporting and accepting the > >> combined channel count. bnxt_get_channels() reports maximum combined > >> as the maximum rx count. bnxt_set_channels() accepts combined count > >> that cannot be bigger than max rx or max tx. > >> > >> For example, if max

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
On Mon, 2016-09-19 at 11:54 +0200, Johannes Berg wrote: > > > > The stack trace is useless, but my other annotation showed that the > > table's nelems *underflowed* to -1, so now the worker will continue > > to try to grow it forever. > > > > And this *was* actually a case of duplication, afaict

[PATCH v3 net-next] net: phy: Add MAC-IF driver for Microsemi PHYs.

2016-09-19 Thread Raju Lakkaraju
From: Raju Lakkaraju All the review comments updated and resending for review. This is MAC interface feature. Microsemi PHY can support RGMII, RMII or GMII/MII interface between MAC and PHY. MAC-IF function program the right value based on Device tree configuration. Tested on Beaglebone Black w

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
On Mon, 2016-09-19 at 12:02 +0200, Johannes Berg wrote: > On Mon, 2016-09-19 at 11:54 +0200, Johannes Berg wrote: > > > > > > > > > > > The stack trace is useless, but my other annotation showed that > > > the > > > table's nelems *underflowed* to -1, so now the worker will > > > continue > > >

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
Btw, for debug I put BUG_ON(atomic_read(&ht->nelems) < 0); after the atomic_dec() in __rhashtable_remove_fast_one(). That makes the kernel crash instantly on the buggy code, and I just have to run a single test ("wpas_ctrl_interface_add_many") to get there. johannes

Re: [PATCH net-next RESEND] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-09-19 Thread Vitaly Kuznetsov
David Miller writes: > From: Vitaly Kuznetsov > Date: Fri, 16 Sep 2016 12:59:14 +0200 > >> @@ -595,6 +596,19 @@ static int xennet_start_xmit(struct sk_buff *skb, >> struct net_device *dev) >> offset = offset_in_page(skb->data); >> len = skb_headlen(skb); >> >> +/* The first req

Re: [PATCH net-next RESEND] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-09-19 Thread David Vrabel
On 19/09/16 11:22, Vitaly Kuznetsov wrote: > David Miller writes: > >> From: Vitaly Kuznetsov >> Date: Fri, 16 Sep 2016 12:59:14 +0200 >> >>> @@ -595,6 +596,19 @@ static int xennet_start_xmit(struct sk_buff *skb, >>> struct net_device *dev) >>> offset = offset_in_page(skb->data); >>> le

[PATCH net-next v2] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-09-19 Thread Vitaly Kuznetsov
Small packet loss is reported on complex multi host network configurations including tunnels, NAT, ... My investigation led me to the following check in netback which drops packets: if (unlikely(txreq.size < ETH_HLEN)) { netdev_err(queue->vif->dev,

Re: [PATCH net-next RESEND] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-09-19 Thread Vitaly Kuznetsov
David Vrabel writes: > On 19/09/16 11:22, Vitaly Kuznetsov wrote: >> David Miller writes: >> >>> From: Vitaly Kuznetsov >>> Date: Fri, 16 Sep 2016 12:59:14 +0200 >>> @@ -595,6 +596,19 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) offset = offse

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Herbert Xu
On Mon, Sep 19, 2016 at 12:10:27PM +0200, Johannes Berg wrote: > Btw, for debug I put > > BUG_ON(atomic_read(&ht->nelems) < 0); > > after the atomic_dec() in __rhashtable_remove_fast_one(). That makes > the kernel crash instantly on the buggy code, and I just have to run a > single test ("wpas_ct

Re: [net-next PATCH] mlx4: add missed recycle opportunity for XDP_TX on TX failure

2016-09-19 Thread Tariq Toukan
On 19/09/2016 10:40 AM, Jesper Dangaard Brouer wrote: Correct drop handling for XDP_TX on TX failure, were recently added in commit 95357907ae73 ("mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full"). The change missed an opportunity for recycling the RX page, instead of going through the

[PATCH net-next v3] xen-netfront: avoid packet loss when ethernet header crosses page boundary

2016-09-19 Thread Vitaly Kuznetsov
Small packet loss is reported on complex multi host network configurations including tunnels, NAT, ... My investigation led me to the following check in netback which drops packets: if (unlikely(txreq.size < ETH_HLEN)) { netdev_err(queue->vif->dev,

[PATCH net-next v6] gso: Support partial splitting at the frag_list pointer

2016-09-19 Thread Steffen Klassert
Since commit 8a29111c7 ("net: gro: allow to build full sized skb") gro may build buffers with a frag_list. This can hurt forwarding because most NICs can't offload such packets, they need to be segmented in software. This patch splits buffers with a frag_list at the frag_list pointer into buffers t

Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
On Mon, 2016-09-19 at 18:48 +0800, Herbert Xu wrote: > On Mon, Sep 19, 2016 at 12:10:27PM +0200, Johannes Berg wrote: > > > > Btw, for debug I put > > > > BUG_ON(atomic_read(&ht->nelems) < 0); > > > > after the atomic_dec() in __rhashtable_remove_fast_one(). That > > makes > > the kernel crash i

[v3 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Herbert Xu
v3 fixes a bug in the remove path that causes the element count to decrease when it shouldn't, leading to a gigantic hash table when it underflows. v2 contains a reworked insertion slowpath to ensure that the spinlock for the table we're inserting into is taken. This series contains two patches.

[v3 PATCH 2/2] mac80211: Use rhltable instead of rhashtable

2016-09-19 Thread Herbert Xu
mac80211 currently uses rhashtable with insecure_elasticity set to true. The latter is because of duplicate objects. What's more, mac80211 walks the rhashtable chains by hand which is broken as rhashtable may contain multiple tables due to resizing or rehashing. This patch fixes it by converting

[v3 PATCH 1/2] rhashtable: Add rhlist interface

2016-09-19 Thread Herbert Xu
The insecure_elasticity setting is an ugly wart brought out by users who need to insert duplicate objects (that is, distinct objects with identical keys) into the same table. In fact, those users have a much bigger problem. Once those duplicate objects are inserted, they don't have an interface t

Re: [v3 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
On Mon, 2016-09-19 at 18:58 +0800, Herbert Xu wrote: > v3 fixes a bug in the remove path that causes the element count > to decrease when it shouldn't, leading to a gigantic hash table > when it underflows. > Ok, with the BUG_ON() thrown in, this works in the test that was failing before. I'll run

Re: [PATCH net] xfrm: Fix memory leak of aead algorithm name

2016-09-19 Thread Steffen Klassert
On Sun, Sep 18, 2016 at 07:42:53AM +, Ilan Tayari wrote: > commit 1a6509d99122 ("[IPSEC]: Add support for combined mode algorithms") > introduced aead. The function attach_aead kmemdup()s the algorithm > name during xfrm_state_construct(). > However this memory is never freed. > Implementation

Re: [v3 PATCH 0/2] rhashtable: rhashtable with duplicate objects

2016-09-19 Thread Johannes Berg
On Mon, 2016-09-19 at 13:03 +0200, Johannes Berg wrote: > On Mon, 2016-09-19 at 18:58 +0800, Herbert Xu wrote: > > > > v3 fixes a bug in the remove path that causes the element count > > to decrease when it shouldn't, leading to a gigantic hash table > > when it underflows. > > > Ok, with the BUG

[PATCH net-next 0/3] i40e: fix MSI-X vector allocation for > 128 CPU threads

2016-09-19 Thread Stefan Assmann
Stefan Assmann (3): i40e: check if vectors are already depleted when doing VMDq allocation i40e: fix MSI-X vector redistribution if hw limit is reached i40e: fix sideband flow director vector allocation drivers/net/ethernet/intel/i40e/i40e_main.c | 76 ++--- 1 file c

[PATCH net-next 3/3] i40e: fix sideband flow director vector allocation

2016-09-19 Thread Stefan Assmann
Currently if the MSI-X vector limit is reached the sideband flow director gets disabled. A bit too early to make that decision, as vectors may get re-distributed. So move the check further back. Signed-off-by: Stefan Assmann --- drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +-- 1 fil

[PATCH net-next 2/3] i40e: fix MSI-X vector redistribution if hw limit is reached

2016-09-19 Thread Stefan Assmann
The driver allocates 1 vector per CPU thread and the current hardware limit for vectors is 129 per PF. On systems with 128 or more threads this currently means all vectors are used by the PF leaving no room for additional features like VMDq, iWARP, etc... The code that should redistribute the vecto

[PATCH net-next 1/3] i40e: check if vectors are already depleted when doing VMDq allocation

2016-09-19 Thread Stefan Assmann
During MSI-X vector allocation for VMDq, a check for "no vectors left" was missing, add it. This prevents more vectors to be allocated than available. Signed-off-by: Stefan Assmann --- drivers/net/ethernet/intel/i40e/i40e_main.c | 27 --- 1 file changed, 16 insertions(+),

Re: [PATCH 1/3] mm: memcontrol: make per-cpu charge cache IRQ-safe for socket accounting

2016-09-19 Thread Michal Hocko
[Fixup Vladimir's email] On Wed 14-09-16 15:48:44, Johannes Weiner wrote: > From: Johannes Weiner > > During cgroup2 rollout into production, we started encountering css > refcount underflows and css access crashes in the memory controller. > Splitting the heavily shared css reference counter in

Re: [PATCH 2/3] cgroup: duplicate cgroup reference when cloning sockets

2016-09-19 Thread Michal Hocko
[Fixup Vladimir's email] I am not familiar with this code path to give my ack, unfortunatelly. On Wed 14-09-16 15:48:45, Johannes Weiner wrote: > From: Johannes Weiner > > When a socket is cloned, the associated sock_cgroup_data is duplicated > but not its reference on the cgroup. As a result,

Re: [PATCH 3/3] mm: memcontrol: consolidate cgroup socket tracking

2016-09-19 Thread Michal Hocko
[Fixup Vladimir's email] same here I do not feel familiar with the code enough to give my ack but Vladimir might be in a better position On Wed 14-09-16 15:48:46, Johannes Weiner wrote: > The cgroup core and the memory controller need to track socket > ownership for different purposes, but the tr

Re: [PATCH] net: skbuff: Fix length validation in skb_vlan_pop()

2016-09-19 Thread Daniel Borkmann
On 09/19/2016 08:15 AM, Shmulik Ladkani wrote: On Sun, 18 Sep 2016 13:26:30 -0700, pshe...@ovn.org wrote: On Sun, Sep 18, 2016 at 3:09 AM, Shmulik Ladkani wrote: diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 1e329d4112..cc2c004838 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff

Re: [PATCH 1/2] ptp_clock: allow for it to be optional

2016-09-19 Thread Jiri Benc
On Sun, 18 Sep 2016 23:51:09 -0400, Nicolas Pitre wrote: > And to make it possible for PTP to be configured out, the select statement > in the Kconfig entry for those ethernet drivers is changed from selecting > PTP_1588_CLOCK to PTP_1588_CLOCK_SELECTED whose purpose is to indicate the > default Kc

Re: [PATCH 1/2] ptp_clock: allow for it to be optional

2016-09-19 Thread Eugenia Emantayev
Reviewed-by: Eugenia Emantayev

[PATCHv2] sunrpc: fix write space race causing stalls

2016-09-19 Thread David Vrabel
Write space becoming available may race with putting the task to sleep in xprt_wait_for_buffer_space(). The existing mechanism to avoid the race does not work. This (edited) partial trace illustrates the problem: [1] rpc_task_run_action: task:43546@5 ... action=call_transmit [2] xs_write_s

Re: [PATCH] net: skbuff: Fix length validation in skb_vlan_pop()

2016-09-19 Thread Shmulik Ladkani
On Mon, 19 Sep 2016 14:22:57 +0200, dan...@iogearbox.net wrote: > On 09/19/2016 08:15 AM, Shmulik Ladkani wrote: > > On Sun, 18 Sep 2016 13:26:30 -0700, pshe...@ovn.org wrote: > >> On Sun, Sep 18, 2016 at 3:09 AM, Shmulik Ladkani > >> wrote: > >>> diff --git a/net/core/skbuff.c b/net/core/skbuff.c

Re: [PATCH] net: phy: Ensure the state machine is called when phy is UP

2016-09-19 Thread Nicolas Ferre
Hi all, I come back to this thread to re-start the conversation as I still have the issue... Le 16/04/2016 à 00:45, Alexandre Belloni a écrit : > On 16/04/2016 at 00:30:26 +0200, Andrew Lunn wrote : >> On Sat, Apr 16, 2016 at 12:17:11AM +0200, Alexandre Belloni wrote: >>> On 16/04/2016 at 00:05:

RE: [PATCH net] qed: Fix stack corruption on probe

2016-09-19 Thread David Laight
From: Yuval Mintz > Sent: 18 September 2016 09:15 > Commit fe56b9e6a8d95 ("qed: Add module with basic common support") > has introduced a stack corruption during probe, where filling a > local struct with data to be sent to management firmware is incorrectly > filled; The data is written outside of

[PATCH 4/4] net-next: dsa: qca8k: remove empty set_addr() stub

2016-09-19 Thread John Crispin
The set_addr() callback is now optional. Remove the empty stub that qca8k has. Signed-off-by: John Crispin --- drivers/net/dsa/qca8k.c |8 1 file changed, 8 deletions(-) diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index 7f3f178..4788a89 100644 --- a/drivers/net/d

[PATCH 0/4] net-next: dsa: set_addr should be optional

2016-09-19 Thread John Crispin
The Marvell driver is the only one that actually sets the switches HW address. All other drivers have an empty stub. fix this by making the callback optional. John Crispin (4): net-next: dsa: fix duplicate invocation of set_addr() net-next: dsa: make the set_addr() operation optional net-nex

[PATCH 2/4] net-next: dsa: make the set_addr() operation optional

2016-09-19 Thread John Crispin
Only 1 of the 3 drivers currently has a set_addr() operation. Make the set_addr() callback optional to reduce the amount of empty stubs inside the drivers. Signed-off-by: John Crispin --- net/dsa/dsa.c |8 +--- net/dsa/dsa2.c |8 +--- 2 files changed, 10 insertions(+), 6 deletio

[PATCH 1/4] net-next: dsa: fix duplicate invocation of set_addr()

2016-09-19 Thread John Crispin
commit 83c0afaec7b730b ("net: dsa: Add new binding implementation") has a duplicate invocation of the set_addr() operation callback. Remove one of them. Signed-off-by: John Crispin --- net/dsa/dsa2.c |4 1 file changed, 4 deletions(-) diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index

[PATCH 3/4] net-next: dsa: b53: remove empty set_addr() stub

2016-09-19 Thread John Crispin
The set_addr() callback is now optional. Remove the empty stub that b53 has. Signed-off-by: John Crispin --- drivers/net/dsa/b53/b53_common.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 0afc2e5..1a492c0 100

RE: [PATCH net] qed: Fix stack corruption on probe

2016-09-19 Thread Mintz, Yuval
> > - for (i = 0; i < MCP_DRV_VER_STR_SIZE - 1; i += 4) { > > - val = cpu_to_be32(p_ver->name[i]); > > + for (i = 0; i < (MCP_DRV_VER_STR_SIZE - 4) / sizeof(u32); i++) { > > + val = cpu_to_be32(p_ver->name[i * sizeof(u32)]); > > *(__be32 *)&p_drv_version->name[i

Re: [PATCH 1/4] net-next: dsa: fix duplicate invocation of set_addr()

2016-09-19 Thread Andrew Lunn
On Mon, Sep 19, 2016 at 03:28:00PM +0200, John Crispin wrote: > commit 83c0afaec7b730b ("net: dsa: Add new binding implementation") > has a duplicate invocation of the set_addr() operation callback. Remove one > of them. Upps. My error... > > Signed-off-by: John Crispin Reviewed-by: Andrew Lun

Re: [PATCH 0/4] net-next: dsa: set_addr should be optional

2016-09-19 Thread Andrew Lunn
On Mon, Sep 19, 2016 at 03:27:59PM +0200, John Crispin wrote: > The Marvell driver is the only one that actually sets the switches HW > address. All other drivers have an empty stub. fix this by making the > callback optional. Hi John Thanks for doing this, Reviewed-by: Andrew Lunn Andrew

[PATCH net-next 0/8] mlx5e XDP support

2016-09-19 Thread Tariq Toukan
This series adds XDP support in mlx5e driver. This includes the use cases: XDP_DROP, XDP_PASS, and XDP_TX. Single stream performance tests show 16.5 Mpps for XDP_DROP, and 12.4 Mpps for XDP_TX, with nice scalability for multiple streams/rings. This rate of XDP_DROP is lower than the 32 Mpps we go

[PATCH net-next 1/8] net/mlx5e: Build RX SKB on demand

2016-09-19 Thread Tariq Toukan
From: Saeed Mahameed For non-striding RQ configuration before this patch we had a ring with pre-allocated SKBs and mapped the SKB->data buffers for device. For robustness and better RX data buffers management, we allocate a page per packet and build_skb around it. This patch (which is a prerequ

[PATCH net-next 2/8] net/mlx5e: Union RQ RX info per RQ type

2016-09-19 Thread Tariq Toukan
From: Saeed Mahameed We have two types of RX RQs, and they use two separate sets of info arrays and structures in RX data path function. Today those structures are mutually exclusive per RQ type, hence one kind is allocated on RQ creation according to the RQ type. For better cache locality and

[PATCH net-next 4/8] net/mlx5e: Dynamic RQ type infrastructure

2016-09-19 Thread Tariq Toukan
From: Saeed Mahameed Add two helper functions to allow dynamic changes of RQ type. mlx5e_set_rq_priv_params and mlx5e_set_rq_type_params will be used on netdev creation to determine the default RQ type. This will be needed later for downstream patches of XDP support. When enabling XDP we will d

[PATCH net-next 7/8] net/mlx5e: XDP TX forwarding support

2016-09-19 Thread Tariq Toukan
From: Saeed Mahameed Adding support for XDP_TX forwarding from xdp program. Using XDP, now user can loop packets out of the same port. We create a dedicated TX SQ for each channel that will serve XDP programs that return XDP_TX action to loop packets back to the wire directly from the channel RQ

[PATCH net-next 6/8] net/mlx5e: Have a clear separation between different SQ types

2016-09-19 Thread Tariq Toukan
From: Saeed Mahameed Make a clear separate between Regular SQ (TXQ) and ICO SQ creation, destruction and union their mutual information structures. Don't allocate redundant TXQ skb/wqe_info/dma_fifo arrays for ICO SQ. And have a different SQ edge for ICO SQ than TXQ SQ, to be more accurate. In

[PATCH net-next 3/8] net/mlx5e: Slightly reduce hardware LRO size

2016-09-19 Thread Tariq Toukan
From: Saeed Mahameed Before this patch LRO size was 64K, now with build_skb requires extra room, headroom + sizeof(skb_shared_info) added to the data buffer will make wqe size or page_frag_size slightly larger than 64K which will demand order 5 page instead of order 4 in 4K page systems. We tak

[PATCH net-next 5/8] net/mlx5e: XDP fast RX drop bpf programs support

2016-09-19 Thread Tariq Toukan
From: Rana Shahout Add support for the BPF_PROG_TYPE_PHYS_DEV hook in mlx5e driver. When XDP is on we make sure to change channels RQs type to MLX5_WQ_TYPE_LINKED_LIST rather than "striding RQ" type to ensure "page per packet". On XDP set, we fail if HW LRO is set and request from user to turn

[PATCH net-next 8/8] net/mlx5e: XDP TX xmit more

2016-09-19 Thread Tariq Toukan
From: Saeed Mahameed Previously we rang XDP SQ doorbell on every forwarded XDP packet. Here we introduce a xmit more like mechanism that will queue up more than one packet into SQ (up to RX napi budget) w/o notifying the hardware. Once RX napi budget is consumed and we exit napi RX loop, we wil

Re: [PATCH 1/2] ptp_clock: allow for it to be optional

2016-09-19 Thread Nicolas Pitre
On Mon, 19 Sep 2016, Jiri Benc wrote: > On Sun, 18 Sep 2016 23:51:09 -0400, Nicolas Pitre wrote: > > And to make it possible for PTP to be configured out, the select statement > > in the Kconfig entry for those ethernet drivers is changed from selecting > > PTP_1588_CLOCK to PTP_1588_CLOCK_SELECTE

RE: [PATCH 0/2] cxgb4 FR_NSMR_TPTE_WR support

2016-09-19 Thread Steve Wise
> > From: Steve Wise > Date: Fri, 16 Sep 2016 07:54:55 -0700 > > > This series enables a new work request to optimize small REG_MR > > operations. This is intended for 4.9. If everyone agrees, I suggest > > Doug take both the cxgb4 and iw_cxgb4 patches through his tree. > > I'm assuming this

pull-request: can 2016-09-19

2016-09-19 Thread Marc Kleine-Budde
-2016-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 (2016-09-18 22:26:49 -0400) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git tags/linux-can-fixes-for-4.8-20160919 for you to fetch cha

[PATCH] can: flexcan: fix resume function

2016-09-19 Thread Marc Kleine-Budde
From: Fabio Estevam On a imx6ul-pico board the following error is seen during system suspend: dpm_run_callback(): platform_pm_resume+0x0/0x54 returns -110 PM: Device 209.flexcan failed to resume: error -110 The reason for this suspend error is because when the CAN interface is not active th

Re: Requesting guidance on how to expose (new/exotic) PHY features to user-space

2016-09-19 Thread Andrew Lunn
> In the current SW model, most SW runs in user-space and is proprietary. But we > are working more and more in the direction of Open Sourcing certain part of > the > SW, and the company is becoming more and more aware of the advantage of doing > open-source SW and getting it accepted upstream. In

Requesting guidance on how to expose (new/exotic) PHY features to user-space

2016-09-19 Thread Allan Nielsen
Hi Andrew, I'm working with Raju to create Open Source driver (and to get them accepted upstream) for Microsemi PHYs. First of all, thanks a lot for all the comments and all the help you (and others) are providing. It is hard to see such a community working without people like you - you are doing

[PATCH net] vti6: fix input path

2016-09-19 Thread Nicolas Dichtel
Since commit 1625f4529957, vti6 is broken, all input packets are dropped (LINUX_MIB_XFRMINNOSTATES is incremented). XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 is set by vti6_rcv() before calling xfrm6_rcv()/xfrm6_rcv_spi(), thus we cannot set to NULL that value in xfrm6_rcv_spi(). A new function xfrm6_r

Re: [PATCH 0/2] cxgb4 FR_NSMR_TPTE_WR support

2016-09-19 Thread David Miller
From: "Steve Wise" Date: Mon, 19 Sep 2016 09:17:01 -0500 > >> >> From: Steve Wise >> Date: Fri, 16 Sep 2016 07:54:55 -0700 >> >> > This series enables a new work request to optimize small REG_MR >> > operations. This is intended for 4.9. If everyone agrees, I suggest >> > Doug take both the

Re: [PATCH v3 net-next 05/16] tcp: switch back to proper tcp_skb_cb size check in tcp_init()

2016-09-19 Thread Lance Richardson
> From: "Neal Cardwell" > To: "David Miller" > Cc: netdev@vger.kernel.org, "Eric Dumazet" , "Soheil > Hassas Yeganeh" , "Neal > Cardwell" , "Yuchung Cheng" > Sent: Sunday, September 18, 2016 6:03:42 PM > Subject: [PATCH v3 net-next 05/16] tcp: switch back to proper tcp_skb_cb size > check in t

Re: [PATCH v3 net-next 05/16] tcp: switch back to proper tcp_skb_cb size check in tcp_init()

2016-09-19 Thread Eric Dumazet
On Mon, Sep 19, 2016 at 7:37 AM, Lance Richardson wrote: > The skb local variable could be avoided via: > > BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > FIELD_SIZEOF(struct sk_buff, > cb)); > Right you are, thanks !

Re: [net-next PATCH] mlx4: add missed recycle opportunity for XDP_TX on TX failure

2016-09-19 Thread Eric Dumazet
On Mon, 2016-09-19 at 09:40 +0200, Jesper Dangaard Brouer wrote: > Correct drop handling for XDP_TX on TX failure, were recently added in > commit 95357907ae73 ("mlx4: fix XDP_TX is acting like XDP_PASS on TX > ring full"). > > The change missed an opportunity for recycling the RX page, instead of

  1   2   3   >