Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next 04/20] net: dsa: change scope of FDB handlers
From: Florian Fainelli @ 2017-05-22 19:25 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-5-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Change the scope of the switchdev FDB object handlers from the DSA slave
> device to the generic DSA port, so that the future port-wide API can
> also be used for other port types, such as CPU and DSA links.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 05/20] net: dsa: change scope of MDB handlers
From: Florian Fainelli @ 2017-05-22 19:26 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-6-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Change the scope of the switchdev MDB object handlers from the DSA slave
> device to the generic DSA port, so that the future port-wide API can
> also be used for other port types, such as CPU and DSA links.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* [PATCH] net/core: remove explicit do_softirq() from busy_poll_stop()
From: Sebastian Andrzej Siewior @ 2017-05-22 19:26 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, David S. Miller, tglx

Since commit 217f69743681 ("net: busy-poll: allow preemption in
sk_busy_loop()") there is an explicit do_softirq() invocation after
local_bh_enable() has been invoked.
I don't understand why we need this because local_bh_enable() will
invoke do_softirq() once the softirq counter reached zero and we have
softirq-related work pending.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 net/core/dev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index fca407b4a6ea..e84eb0ec5529 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5199,8 +5199,6 @@ static void busy_poll_stop(struct napi_struct *napi, void *have_poll_lock)
 	if (rc == BUSY_POLL_BUDGET)
 		__napi_schedule(napi);
 	local_bh_enable();
-	if (local_softirq_pending())
-		do_softirq();
 }
 
 void napi_busy_loop(unsigned int napi_id,
-- 
2.11.0

^ permalink raw reply related

* Re: [PATCH net-next 06/20] net: dsa: change scope of VLAN handlers
From: Florian Fainelli @ 2017-05-22 19:27 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-7-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Change the scope of the switchdev VLAN object handlers from the DSA
> slave device to the generic DSA port, so that the future port-wide API
> can also be used for other port types, such as CPU and DSA links.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 07/20] net: dsa: change scope of VLAN filtering setter
From: Florian Fainelli @ 2017-05-22 19:27 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-8-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Change the scope of the switchdev VLAN filtering attribute setter from
> the DSA slave device to the generic DSA port, so that the future
> port-wide API can also be used for other port types, such as CPU and DSA
> links.
>> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 08/20] net: dsa: change scope of ageing time setter
From: Florian Fainelli @ 2017-05-22 19:29 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-9-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Change the scope of the switchdev bridge ageing time attribute setter
> from the DSA slave device to the generic DSA port, so that the future
> port-wide API can also be used for other port types, such as CPU and DSA
> links.
> 
> Also ds->ports is now a contiguous array of dsa_port structures, thus
> their addresses cannot be NULL. Remove the useless check in
> dsa_fastest_ageing_time.

And you are also passing just the ageing time value, and not longer the
full attribute, which is a nice simplification.

> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* [PATCH net-next] enic: unmask intr only when napi is complete
From: Govindarajulu Varadarajan @ 2017-05-22 19:19 UTC (permalink / raw)
  To: netdev, davem; +Cc: benve, Govindarajulu Varadarajan

In case of busy poll, napi_complete_done returns false and does not
dequeue napi. In this case do not unmask the intr. We are guaranteed
napi is called again. This reduces unnecessary iowrites.

Signed-off-by: Govindarajulu Varadarajan <gvaradar@cisco.com>
---
 drivers/net/ethernet/cisco/enic/enic_main.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 4b87beeabce1..6a9c8878aca0 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -1537,13 +1537,12 @@ static int enic_poll(struct napi_struct *napi, int budget)
 		 */
 		enic_calc_int_moderation(enic, &enic->rq[0]);
 
-	if (rq_work_done < rq_work_to_do) {
+	if ((rq_work_done < budget) && napi_complete_done(napi, rq_work_done)) {
 
 		/* Some work done, but not enough to stay in polling,
 		 * exit polling
 		 */
 
-		napi_complete_done(napi, rq_work_done);
 		if (enic->rx_coalesce_setting.use_adaptive_rx_coalesce)
 			enic_set_int_moderation(enic, &enic->rq[0]);
 		vnic_intr_unmask(&enic->intr[intr]);
@@ -1663,13 +1662,12 @@ static int enic_poll_msix_rq(struct napi_struct *napi, int budget)
 		 */
 		enic_calc_int_moderation(enic, &enic->rq[rq]);
 
-	if (work_done < work_to_do) {
+	if ((work_done < budget) && napi_complete_done(napi, work_done)) {
 
 		/* Some work done, but not enough to stay in polling,
 		 * exit polling
 		 */
 
-		napi_complete_done(napi, work_done);
 		if (enic->rx_coalesce_setting.use_adaptive_rx_coalesce)
 			enic_set_int_moderation(enic, &enic->rq[rq]);
 		vnic_intr_unmask(&enic->intr[intr]);
-- 
2.13.0

^ permalink raw reply related

* Re: [PATCH 0/4] Configuring traffic classes via new hardware offload mechanism in tc/mqprio
From: Jeff Kirsher @ 2017-05-22 19:31 UTC (permalink / raw)
  To: Amritha Nambiar, intel-wired-lan, Or Gerlitz
  Cc: alexander.h.duyck, kiran.patil, sridhar.samudrala,
	mitch.a.williams, neerav.parikh, netdev
In-Reply-To: <149524122523.11022.4541073724650541658.stgit@anamdev.jf.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]

On Fri, 2017-05-19 at 17:58 -0700, Amritha Nambiar wrote:
> The following series introduces a new harware offload mode in tc/mqprio
> where the TCs, the queue configurations and bandwidth rate limits are
> offloaded to the hardware.
> The i40e driver enables the new mqprio hardware offload mechanism
> factoring the TCs, queue configuration and bandwidth rates by creating HW
> channel VSIs. 
> 
> In this mode, the priority to traffic class mapping and the user
> specified queue ranges are used to configure the traffic class when the
> 'hw' option is set to 2. This is achieved by creating HW channels(VSI). A
> new channel is created for each of the traffic class configuration
> offloaded via mqprio framework except for the first TC (TC0) which is for
> the main VSI. TC0 for the main VSI is also reconfigured as per user
> provided queue parameters. Finally, bandwidth rate limits are set on
> these traffic classes through the mqprio offload framework by sending
> these rates in addition to the number of TCs and the queue
> configurations.
> 
> Example:
> # tc qdisc add dev eth0 root mqprio num_tc 2  map 0 0 0 0 1 1 1 1\
>   queues 4@0 4@4 min_rate 0Mbit 0Mbit max_rate 55Mbit 60Mbit hw 2
> 
> To dump the bandwidth rates:
> 
> # tc qdisc show dev eth0
>   qdisc mqprio 804a: root  tc 2 map 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0
>                queues:(0:3) (4:7)
>                min rates:0bit 0bit
>                max rates:55Mbit 60Mbit
> 

This was meant to be sent out as an RFC, but apparently that did not get
conveyed when these were sent out Friday.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH net-next 09/20] net: dsa: move port state setters
From: Florian Fainelli @ 2017-05-22 19:31 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-10-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Add a new port.c file to hold all DSA port-wide logic. This patch moves
> in the code which sets a port state.

Usually, I am not fond of moving code around, but in this case, this
makes the whole directory structure nicer.

> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 10/20] net: dsa: move bridging routines
From: Florian Fainelli @ 2017-05-22 19:32 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-11-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Move the DSA port code which bridges a port in port.c, where it belongs.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 11/20] net: dsa: move VLAN filtering setter
From: Florian Fainelli @ 2017-05-22 19:33 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-12-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Move the DSA port code which sets VLAN filtering on a port in port.c,
> where it belongs.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 12/20] net: dsa: move ageing time setter
From: Florian Fainelli @ 2017-05-22 19:34 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-13-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Move the DSA port code which sets a port ageing time in port.c, where it
> belongs.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* [GIT] Networking
From: David Miller @ 2017-05-22 19:34 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


Mostly netfilter bug fixes in here, but we have some bits elsewhere
as well.

1) Don't do SNAT replies for non-NATed connections in IPVS, from Julian
   Anastasov.

2) Don't delete conntrack helpers while they are still in use, from
   Liping Zhang.

3) Fix zero padding in xtables's xt_data_to_user(), from Willem de
   Bruijn.

4) Add proper RCU protection to nf_tables_dump_set() because we cannot
   guarantee that we hold the NFNL_SUBSYS_NFTABLES lock.  From Liping
   Zhang.

5) Initialize rcv_mss in tcp_disconnect(), from Wei Wang.

6) smsc95xx devices can't handle IPV6 checksums fully, so don't
   advertise support for offloading them.  From Nisar Sayed.

7) Fix out-of-bounds access in __ip6_append_data(), from Eric Dumazet.

8) Make atl2_probe() propagate the error code properly on failures,
   from Alexey Khoroshilov.

9) arp_target[] in bond_check_params() is used uninitialized.  This got
   changes from a global static to a local variable, which is how this
   mistake happened.  Fix from Jarod Wilson.

10) Fix fallout from unnecessary NULL check removal in cls_matchall,
    from Jiri Pirko.  This is definitely brown paper bag territory...

Please pull, thanks a lot!

The following changes since commit 8b4822de59d5d9919b9b045183a36c673ce20b73:

  Merge tag 'md/4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md (2017-05-18 12:04:41 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 

for you to fetch changes up to 2d76b2f8b54abd16225cd80afca36ed43f113c41:

  net: sched: cls_matchall: fix null pointer dereference (2017-05-22 14:54:16 -0400)

----------------------------------------------------------------
Alexey Khoroshilov (1):
      net: atheros: atl2: don't return zero on failure path in atl2_probe()

David S. Miller (3):
      Merge git://git.kernel.org/.../pablo/nf
      Merge branch 'arp-always-override-existing-neigh-entries-with-gratuitous-ARP'
      net: Make IP alignment calulations clearer.

Eric Dumazet (1):
      ipv6: fix out of bound writes in __ip6_append_data()

Eric Leblond (1):
      netfilter: synproxy: fix conntrackd interaction

Gao Feng (1):
      ebtables: arpreply: Add the standard target sanity check

Ihar Hrachyshka (4):
      arp: fixed error in a comment
      arp: decompose is_garp logic into a separate function
      arp: postpone addr_type calculation to as late as possible
      arp: always override existing neigh entries with gratuitous ARP

Jarod Wilson (2):
      bonding: fix accounting of active ports in 3ad
      bonding: fix randomly populated arp target array

Jiri Pirko (1):
      net: sched: cls_matchall: fix null pointer dereference

Julian Anastasov (1):
      ipvs: SNAT packet replies only for NATed connections

Liping Zhang (4):
      netfilter: don't setup nat info for confirmed ct
      netfilter: introduce nf_conntrack_helper_put helper function
      netfilter: nfnl_cthelper: reject del request if helper obj is in use
      netfilter: nf_tables: can't assume lock is acquired when dumping set elems

Matthias Kaehlcke (1):
      netfilter: ctnetlink: Make some parameters integer to avoid enum mismatch

Nisar Sayed (1):
      smsc95xx: Support only IPv4 TCP/UDP csum offload

Pablo Neira Ayuso (3):
      Merge tag 'ipvs-fixes-for-v4.12' of http://git.kernel.org/.../horms/ipvs
      netfilter: nf_tables: missing sanitization in data from userspace
      netfilter: nf_tables: revisit chain/object refcounting from elements

WANG Cong (1):
      vsock: use new wait API for vsock_stream_sendmsg()

Wei Wang (1):
      tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0

Willem de Bruijn (2):
      netfilter: xtables: zero padding in data_to_user
      netfilter: xtables: fix build failure from COMPAT_XT_ALIGN outside CONFIG_COMPAT

Xin Long (1):
      bridge: start hello_timer when enabling KERNEL_STP in br_stp_start

 drivers/net/bonding/bond_3ad.c              |   2 +-
 drivers/net/bonding/bond_main.c             |   5 ++--
 drivers/net/ethernet/atheros/atlx/atl2.c    |   8 +++---
 drivers/net/usb/smsc95xx.c                  |  13 ++++++---
 include/linux/netfilter/x_tables.h          |   2 +-
 include/linux/netfilter_bridge/ebtables.h   |   5 ++++
 include/net/netfilter/nf_conntrack_helper.h |   4 +++
 include/net/netfilter/nf_tables.h           |   2 +-
 kernel/bpf/verifier.c                       |  12 ++++++---
 net/bridge/br_stp_if.c                      |   1 +
 net/bridge/br_stp_timer.c                   |   2 +-
 net/bridge/netfilter/ebt_arpreply.c         |   3 +++
 net/bridge/netfilter/ebtables.c             |   9 ++++---
 net/ipv4/arp.c                              |  56 +++++++++++++++++++++++++++------------
 net/ipv4/tcp.c                              |   4 +++
 net/ipv6/ip6_output.c                       |  15 ++++++-----
 net/netfilter/ipvs/ip_vs_core.c             |  19 ++++++++++----
 net/netfilter/nf_conntrack_helper.c         |  12 +++++++++
 net/netfilter/nf_conntrack_netlink.c        |  11 +++++---
 net/netfilter/nf_nat_core.c                 |   4 +++
 net/netfilter/nf_tables_api.c               | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
 net/netfilter/nfnetlink_cthelper.c          |  17 +++++++-----
 net/netfilter/nft_bitwise.c                 |  19 ++++++++++----
 net/netfilter/nft_cmp.c                     |  12 +++++++--
 net/netfilter/nft_ct.c                      |   4 +--
 net/netfilter/nft_immediate.c               |   5 ++--
 net/netfilter/nft_range.c                   |   4 +--
 net/netfilter/nft_set_hash.c                |   2 +-
 net/netfilter/x_tables.c                    |  24 +++++++++++------
 net/netfilter/xt_CT.c                       |   6 ++---
 net/openvswitch/conntrack.c                 |   4 +--
 net/sched/cls_matchall.c                    |   1 -
 net/vmw_vsock/af_vsock.c                    |  21 ++++++---------
 33 files changed, 335 insertions(+), 133 deletions(-)

^ permalink raw reply

* Re: [PATCH net-next 13/20] net: dsa: move FDB handlers
From: Florian Fainelli @ 2017-05-22 19:34 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-14-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Move the DSA port code which handles FDB objects in port.c, where it
> belongs.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 14/20] net: dsa: move MDB handlers
From: Florian Fainelli @ 2017-05-22 19:35 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-15-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Move the DSA port code which handles MDB objects in port.c, where it
> belongs.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 15/20] net: dsa: move VLAN handlers
From: Florian Fainelli @ 2017-05-22 19:36 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-16-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Move the DSA port code which handles VLAN objects in port.c, where it
> belongs.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 16/20] net: dsa: move notifier info to private header
From: Florian Fainelli @ 2017-05-22 19:37 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-17-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> The DSA notifier events and info structure definitions are not meant for
> DSA drivers and users, but only used internally by the DSA core files.
> 
> Move them from the public net/dsa.h file to the private dsa_priv.h file.
> 
> Also use this opportunity to turn the events into an anonymous enum,
> because we don't care about the values, and this will prevent future
> conflicts when adding (and sorting) new events.

LGTM

> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 17/20] net: dsa: add notifier for ageing time
From: Florian Fainelli @ 2017-05-22 19:38 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-18-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> This patch keeps the port-wide ageing time handling code in
> dsa_port_ageing_time, pushes the requested ageing time value in a new
> switch fabric notification, and moves the switch-wide ageing time
> handling code in dsa_switch_ageing_time.
> 
> This has the effect that now not only the switch that the target port
> belongs to can be programmed, but all switches composing the switch
> fabric. For the moment, keep the current behavior and ignore other
> switches.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

> ---
>  net/dsa/dsa_priv.h |  8 ++++++++
>  net/dsa/port.c     | 37 ++++++++-----------------------------
>  net/dsa/switch.c   | 46 ++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 62 insertions(+), 29 deletions(-)
> 
> diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
> index c19241eb094b..becaf8a61b13 100644
> --- a/net/dsa/dsa_priv.h
> +++ b/net/dsa/dsa_priv.h
> @@ -17,10 +17,18 @@
>  #include <net/dsa.h>
>  
>  enum {
> +	DSA_NOTIFIER_AGEING_TIME,
>  	DSA_NOTIFIER_BRIDGE_JOIN,
>  	DSA_NOTIFIER_BRIDGE_LEAVE,

This is so we keep sorting notifier events alphabetically, right?
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 18/20] net: dsa: add FDB notifier
From: Florian Fainelli @ 2017-05-22 19:39 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-19-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Add two new DSA_NOTIFIER_FDB_ADD and DSA_NOTIFIER_FDB_DEL events to
> notify not only a single switch, but all switches of a the fabric when
> an FDB entry is added or removed.
> 
> For the moment, keep the current behavior and ignore other switches.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 19/20] net: dsa: add MDB notifier
From: Florian Fainelli @ 2017-05-22 19:39 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-20-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Add two new DSA_NOTIFIER_MDB_ADD and DSA_NOTIFIER_MDB_DEL events to
> notify not only a single switch, but all switches of a the fabric when
> an MDB entry is added or removed.
> 
> For the moment, keep the current behavior and ignore other switches.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 20/20] net: dsa: add VLAN notifier
From: Florian Fainelli @ 2017-05-22 19:41 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170519210055.9366-21-vivien.didelot@savoirfairelinux.com>

On 05/19/2017 02:00 PM, Vivien Didelot wrote:
> Add two new DSA_NOTIFIER_VLAN_ADD and DSA_NOTIFIER_VLAN_DEL events to
> notify not only a single switch, but all switches of a the fabric when
> an VLAN entry is added or removed.
> 
> For the moment, keep the current behavior and ignore other switches.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init()
From: SF Markus Elfring @ 2017-05-22 19:46 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner, linux-sctp, netdev
  Cc: David S. Miller, Neil Horman, Vlad Yasevich, LKML,
	kernel-janitors
In-Reply-To: <20170522165658.GA4642@localhost.localdomain>

>> +++ b/net/sctp/protocol.c
>> @@ -1447,5 +1447,4 @@ static __init int sctp_init(void)
>>  	if (!sctp_ep_hashtable) {
>> -		pr_err("Failed endpoint_hash alloc\n");
> 
> Okay but then why not also delete the one a few lines below this one:
>         if (!sctp_port_hashtable) {
>                 pr_err("Failed bind hash alloc\n");
>                 status = -ENOMEM;
>                 goto err_bhash_alloc;
>         }
> Seems the same pattern to me.
> 
>>  		status = -ENOMEM;
>>  		goto err_ehash_alloc;
>>  	}

How do you think about to remove the other error message in another
update step if a consensus would be achieved in such a direction
for this software module?

Regards,
Markus

^ permalink raw reply

* Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init()
From: Marcelo Ricardo Leitner @ 2017-05-22 19:50 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-sctp, netdev, David S. Miller, Neil Horman, Vlad Yasevich,
	LKML, kernel-janitors
In-Reply-To: <2c849843-549f-419e-2326-1fcb7bcdc2e2@users.sourceforge.net>

On Mon, May 22, 2017 at 09:46:21PM +0200, SF Markus Elfring wrote:
> >> +++ b/net/sctp/protocol.c
> >> @@ -1447,5 +1447,4 @@ static __init int sctp_init(void)
> >>  	if (!sctp_ep_hashtable) {
> >> -		pr_err("Failed endpoint_hash alloc\n");
> > 
> > Okay but then why not also delete the one a few lines below this one:
> >         if (!sctp_port_hashtable) {
> >                 pr_err("Failed bind hash alloc\n");
> >                 status = -ENOMEM;
> >                 goto err_bhash_alloc;
> >         }
> > Seems the same pattern to me.
> > 
> >>  		status = -ENOMEM;
> >>  		goto err_ehash_alloc;
> >>  	}
> 
> How do you think about to remove the other error message in another
> update step if a consensus would be achieved in such a direction
> for this software module?

Fine by me.

Regards,
  Marcelo

^ permalink raw reply

* Re: [PATCH 1/5] sctp: Use kmalloc_array() in sctp_init()
From: Marcelo Ricardo Leitner @ 2017-05-22 19:51 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-sctp, netdev, David S. Miller, Neil Horman, Vlad Yasevich,
	LKML, kernel-janitors
In-Reply-To: <24442429-99f7-7d83-5f56-f84776a81880@users.sourceforge.net>

On Mon, May 22, 2017 at 06:37:19PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 22 May 2017 17:20:11 +0200
> 
> * A multiplication for the size determination of a memory allocation
>   indicated that an array data structure should be processed.
>   Thus use the corresponding function "kmalloc_array".
> 
>   This issue was detected by using the Coccinelle software.
> 
> * Replace the specification of a data structure by a pointer dereference
>   to make the corresponding size determination a bit safer according to
>   the Linux coding style convention.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

> ---
>  net/sctp/protocol.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index 989a900383b5..2b1a6215bd2f 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -1442,6 +1442,6 @@ static __init int sctp_init(void)
>  
>  	/* Allocate and initialize the endpoint hash table.  */
>  	sctp_ep_hashsize = 64;
> -	sctp_ep_hashtable =
> -		kmalloc(64 * sizeof(struct sctp_hashbucket), GFP_KERNEL);
> +	sctp_ep_hashtable = kmalloc_array(64, sizeof(*sctp_ep_hashtable),
> +					  GFP_KERNEL);
>  	if (!sctp_ep_hashtable) {
> -- 
> 2.13.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply

* Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init()
From: Marcelo Ricardo Leitner @ 2017-05-22 19:52 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-sctp, netdev, David S. Miller, Neil Horman, Vlad Yasevich,
	LKML, kernel-janitors
In-Reply-To: <7db0cb49-109b-88a6-532f-c591cc8ffa85@users.sourceforge.net>

On Mon, May 22, 2017 at 06:38:21PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 22 May 2017 17:28:14 +0200
> 
> Omit an extra message for a memory allocation failure in this function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

> ---
>  net/sctp/protocol.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index 2b1a6215bd2f..5e7c8a344770 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -1447,5 +1447,4 @@ static __init int sctp_init(void)
>  	if (!sctp_ep_hashtable) {
> -		pr_err("Failed endpoint_hash alloc\n");
>  		status = -ENOMEM;
>  		goto err_ehash_alloc;
>  	}
> -- 
> 2.13.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox