[PATCH ethtool] ethtool: don't report UFO on kernels v4.14 and above

2018-11-29 Thread Ivan Vecera
off_flag_def'. Cc: John W. Linville Signed-off-by: Ivan Vecera --- ethtool.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ethtool.c b/ethtool.c index 2f7e96b..6121979 100644 --- a/ethtool.c +++ b/ethtool.c @@ -1465,8 +1465,10 @@ static void dump_features(const struct

Re: [PATCH net] be2net: Fix NULL pointer dereference in be_tx_timeout()

2018-11-28 Thread Ivan Vecera
On 28. 11. 18 20:00, David Miller wrote: From: Ivan Vecera Date: Wed, 28 Nov 2018 11:12:22 +0100 On 27. 11. 18 23:51, David Miller wrote: From: Petr Oros Date: Thu, 22 Nov 2018 15:24:07 +0100 @@ -4700,8 +4700,11 @@ int be_update_queues(struct be_adapter *adapter) struct net_device

Re: [PATCH net] be2net: Fix NULL pointer dereference in be_tx_timeout()

2018-11-28 Thread Ivan Vecera
On 27. 11. 18 23:51, David Miller wrote: From: Petr Oros Date: Thu, 22 Nov 2018 15:24:07 +0100 @@ -4700,8 +4700,11 @@ int be_update_queues(struct be_adapter *adapter) struct net_device *netdev = adapter->netdev; int status; - if (netif_running(netdev)) + if

Re: [PATCH] Revert "be2net: remove desc field from be_eq_obj"

2018-10-23 Thread Ivan Vecera
On 23.10.2018 20:03, David Miller wrote: > From: Ivan Vecera > Date: Tue, 23 Oct 2018 16:40:26 +0200 > >> The mentioned commit needs to be reverted because we cannot pass >> string allocated on stack to request_irq(). This function stores >> uses this pointer for later

Re: [PATCH iproute2] iplink: report drop stats for VFs

2018-07-25 Thread Ivan Vecera
On 25.7.2018 19:04, David Ahern wrote: > On 7/25/18 10:22 AM, Ivan Vecera wrote: >> Kernel commit c5a9f6f0ab40 ("net/core: Add drop counters to VF >> statistics") added support for Rx/Tx packet drops but these stats are >> not reported by 'ip link'. >> &

[PATCH iproute2] iplink: report drop stats for VFs

2018-07-25 Thread Ivan Vecera
Kernel commit c5a9f6f0ab40 ("net/core: Add drop counters to VF statistics") added support for Rx/Tx packet drops but these stats are not reported by 'ip link'. Cc: Eugenia Emantayev Cc: Saeed Mahameed Signed-off-by: Ivan Vecera --- ip/ipaddress.c | 11 +-- 1 file

[PATCH net-next v2 0/8] be2net: small structures clean-up

2018-07-10 Thread Ivan Vecera
The series: - removes unused / unneccessary fields in several be2net structures - re-order fields in some structures to eliminate holes, cache-lines crosses - as result reduces size of main struct be_adapter by 4kB Ivan Vecera (8): be2net: remove unused old AIC info be2net: remove unused

[PATCH net-next v2 3/8] be2net: remove desc field from be_eq_obj

2018-07-10 Thread Ivan Vecera
The event queue description (be_eq_obj.desc) field is used only to format string for IRQ name and it is not really needed to hold this value. Remove it and use local variable to format string for IRQ name. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 1 - drivers

[PATCH net-next v2 6/8] be2net: remove unused tx_jiffies field from be_tx_stats

2018-07-10 Thread Ivan Vecera
Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 91ca8d132e87..d521364e17cf 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b

[PATCH net-next v2 2/8] be2net: remove unused old custom busy-poll fields

2018-07-10 Thread Ivan Vecera
de") Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 6cf9d106c989..a4604dea4560 100644 --- a/drivers/net/ethernet/emu

[PATCH net-next v2 5/8] be2net: move txcp field in be_tx_obj to eliminate holes in the struct

2018-07-10 Thread Ivan Vecera
*/ /* --- cacheline 1 boundary (64 bytes) --- */ struct be_queue_info cq; /*6456 */ struct sk_buff * sent_skb_list[2048]; /* 120 16384 */ ... }; Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 2 +- 1 file changed

[PATCH net-next v2 7/8] be2net: re-order fields in be_error_recovert to avoid hole

2018-07-10 Thread Ivan Vecera
- Unionize two u8 fields where only one of them is used depending on NIC chipset. - Move recovery_supported field after that union These changes eliminate 7-bytes hole in the struct and makes it smaller by 8 bytes. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 9

[PATCH net-next v2 4/8] be2net: reorder fields in be_eq_obj structure

2018-07-10 Thread Ivan Vecera
Re-order fields in struct be_eq_obj to ensure that .napi field begins at start of cache-line. Also the .adapter field is moved to the first cache-line next to .q field and 3 fields (idx,msi_idx,spurious_intr) and the 4-bytes hole to 3rd cache-line. Signed-off-by: Ivan Vecera --- drivers/net

[PATCH net-next v2 8/8] be2net: move rss_flags field in rss_info to ensure proper alignment

2018-07-10 Thread Ivan Vecera
]; /* 128 128 */ /* --- cacheline 4 boundary (256 bytes) --- */ u8 rss_hkey[40]; /* 25640 */ u64rss_flags;/* 296 8 */ }; Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet

[PATCH net-next v2 1/8] be2net: remove unused old AIC info

2018-07-10 Thread Ivan Vecera
The commit 2632bafd74ae ("be2net: fix adaptive interrupt coalescing") introduced a separate struct be_aic_obj to hold AIC information but unfortunately left the old stuff in be_eq_obj. So remove it. Fixes: 2632bafd74ae ("be2net: fix adaptive interrupt coalescing") Signed

[PATCH net-next 2/8] be2net: remove unused old custom busy-poll fields

2018-06-21 Thread Ivan Vecera
de") Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 6cf9d106c989..a4604dea4560 100644 --- a/drivers/net/ethernet/emu

[PATCH net-next 4/8] be2net: reorder fields in be_eq_obj structure

2018-06-21 Thread Ivan Vecera
Re-order fields in struct be_eq_obj to ensure that .napi field begins at start of cache-line. Also the .adapter field is moved to the first cache-line next to .q field and 3 fields (idx,msi_idx,spurious_intr) and the 4-bytes hole to 3rd cache-line. Signed-off-by: Ivan Vecera --- drivers/net

[PATCH net-next 5/8] be2net: move txcp field in be_tx_obj to eliminate holes in the struct

2018-06-21 Thread Ivan Vecera
*/ /* --- cacheline 1 boundary (64 bytes) --- */ struct be_queue_info cq; /*6456 */ struct sk_buff * sent_skb_list[2048]; /* 120 16384 */ ... }; Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 2 +- 1 file changed

[PATCH net-next 7/8] be2net: re-order fields in be_error_recovert to avoid hole

2018-06-21 Thread Ivan Vecera
- Unionize two u8 fields where only one of them is used depending on NIC chipset. - Move recovery_supported field after that union These changes eliminate 7-bytes hole in the struct and makes it smaller by 8 bytes. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 9

[PATCH net-next 6/8] be2net: remove unused tx_jiffies field from be_tx_stats

2018-06-21 Thread Ivan Vecera
Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 91ca8d132e87..d521364e17cf 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b

[PATCH net-next 3/8] be2net: remove desc field from be_eq_obj

2018-06-21 Thread Ivan Vecera
The event queue description (be_eq_obj.desc) field is used only to format string for IRQ name and it is not really needed to hold this value. Remove it and use local variable to format string for IRQ name. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 1 - drivers

[PATCH net-next 8/8] be2net: move rss_flags field in rss_info to ensure proper alignment

2018-06-21 Thread Ivan Vecera
]; /* 128 128 */ /* --- cacheline 4 boundary (256 bytes) --- */ u8 rss_hkey[40]; /* 25640 */ u64rss_flags;/* 296 8 */ }; Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet

[PATCH net-next 1/8] be2net: remove unused old AIC info

2018-06-21 Thread Ivan Vecera
The commit 2632bafd74ae ("be2net: fix adaptive interrupt coalescing") introduced a separate struct be_aic_obj to hold AIC information but unfortunately left the old stuff in be_eq_obj. So remove it. Fixes: 2632bafd74ae ("be2net: fix adaptive interrupt coalescing") Signed

[PATCH net-next 0/8] be2net: small structures clean-up

2018-06-21 Thread Ivan Vecera
The series: - removes unused / unneccessary fields in several be2net structures - re-order fields in some structures to eliminate holes, cache-lines crosses - as result reduces size of main struct be_adapter by 4kB Ivan Vecera (8): be2net: remove unused old AIC info be2net: remove unused

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-21 Thread Ivan Vecera
On 20.6.2018 20:03, Ilias Apalodimas wrote: > Hi Florian, > > On Wed, Jun 20, 2018 at 10:58:26AM -0700, Florian Fainelli wrote: >> On 06/20/2018 10:51 AM, Ilias Apalodimas wrote: >>> Hello Ivan, >>> On Wed, Jun 20, 2018 at 02:56:48PM +0200, Ivan Vecera wrot

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-20 Thread Ivan Vecera
On 20.6.2018 14:59, Ilias Apalodimas wrote: > On Wed, Jun 20, 2018 at 02:53:47PM +0200, Ivan Vecera wrote: >> On 20.6.2018 09:08, Jiri Pirko wrote: >>> Tue, Jun 19, 2018 at 01:19:00AM CEST, grygorii.stras...@ti.com wrote: >>>> >>>> >>>> On 06/

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-20 Thread Ivan Vecera
On 18.6.2018 22:19, Ilias Apalodimas wrote: > Jiri proposed using devlink, which makes sense, but i am not sure it's > applicable on this patchset. This will change the driver completely and will > totally break backwards compatibility. Another good reason for a new driver. I.

Re: [RFC v2, net-next, PATCH 4/4] net/cpsw_switchdev: add switchdev mode of operation on cpsw driver

2018-06-20 Thread Ivan Vecera
On 20.6.2018 09:08, Jiri Pirko wrote: > Tue, Jun 19, 2018 at 01:19:00AM CEST, grygorii.stras...@ti.com wrote: >> >> >> On 06/14/2018 06:43 AM, Ilias Apalodimas wrote: >>> On Thu, Jun 14, 2018 at 01:39:58PM +0200, Jiri Pirko wrote: Thu, Jun 14, 2018 at 01:34:04PM CEST,

[PATCH ethtool 6/6] ethtool: remove unreachable code

2018-06-08 Thread Ivan Vecera
The default switch case is unreachable as the MAX_CHANNEL_NUM == 4. Fixes: a5e73bb ("ethtool:QSFP Plus/QSFP28 Diagnostics Information Support") Cc: Vidya Sagar Ravipati Signed-off-by: Ivan Vecera --- qsfp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/qsfp.c b/qsfp.c ind

[PATCH ethtool 1/6] ethtool: fix uninitialized return value

2018-06-08 Thread Ivan Vecera
Fixes: b0fe96d ("Ethtool: Implements ETHTOOL_PHY_GTUNABLE/ETHTOOL_PHY_STUNABLE and PHY downshift") Signed-off-by: Ivan Vecera --- ethtool.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ethtool.c b/ethtool.c index 2e87384..e7495fe 100644 --- a/ethto

[PATCH ethtool 3/6] ethtool: remove unused global variable

2018-06-08 Thread Ivan Vecera
Fixes: 2c2ee7a ("ethtool: Add support for sfc register dumps") Signed-off-by: Ivan Vecera --- sfc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sfc.c b/sfc.c index 9478b38..b4c590f 100644 --- a/sfc.c +++ b/sfc.c @@ -3083,9 +3083,6 @@ static const struct efx_nic

[PATCH ethtool 4/6] ethtool: several fixes in do_gregs()

2018-06-08 Thread Ivan Vecera
- correctly close gregs_dump_file in case of fstat() failure - check for error from realloc Fixes: be4c2d0 ("ethtool.c: fix dump_regs heap corruption") Cc: David Decotigny Signed-off-by: Ivan Vecera --- ethtool.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-)

[PATCH ethtool 5/6] ethtool: correctly free hkey when get_stringset() fails

2018-06-08 Thread Ivan Vecera
Memory allocated for 'hkey' is not freed when get_stringset(..., ETH_SS_RSS_HASH_FUNCS...) fails. Fixes: b888f35 ("ethtool: Support for configurable RSS hash function") Cc: Gal Pressman Signed-off-by: Ivan Vecera --- ethtool.c | 13 ++--- 1 file changed, 6 insertions(+), 7

[PATCH ethtool 2/6] ethtool: fix RING_VF assignment

2018-06-08 Thread Ivan Vecera
Fixes: 36ee712 ("ethtool: support queue and VF fields for rxclass filters") Cc: Jacob Keller Signed-off-by: Ivan Vecera --- rxclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rxclass.c b/rxclass.c index ce4b382..42d122d 100644 --- a/rxclass.c +++ b

[PATCH iproute2] devlink: don't enforce NETLINK_{CAP,EXT}_ACK sock opts

2018-06-01 Thread Ivan Vecera
("devlink: mnlg: Add support for extended ack") Cc: Arkadi Sharshevsky Cc: Stephen Hemminger Signed-off-by: Ivan Vecera --- devlink/mnlg.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/devlink/mnlg.c b/devlink/mnlg.c index 3d28453a..c33c90be 100644

Re: [PATCH 0/4] RFC CPSW switchdev mode

2018-05-24 Thread Ivan Vecera
On 24.5.2018 14:54, Andrew Lunn wrote: > On Thu, May 24, 2018 at 11:48:31AM +0300, Ilias Apalodimas wrote: >> On Thu, May 24, 2018 at 10:05:28AM +0200, Jiri Pirko wrote: >>> Thu, May 24, 2018 at 08:56:20AM CEST, ilias.apalodi...@linaro.org wrote: >>> Any reason you need cpu port? We don't need it

Re: [PATCH net-next mlxsw v2 2/2] net: bridge: Notify about !added_by_user FDB entries

2018-05-03 Thread Ivan Vecera
t_bridge *br, struct net_bridge_port *p); > int br_fdb_external_learn_add(struct net_bridge *br, struct net_bridge_port > *p, > - const unsigned char *addr, u16 vid); > + const unsigned char *addr, u16 vid, > + bool swdev_not

Re: [PATCH net-next mlxsw v2 1/2] switchdev: Add fdb.added_by_user to switchdev notifications

2018-05-03 Thread Ivan Vecera
struct dsa_switchdev_event_work *switchdev_work; > > if (!dsa_slave_dev_check(dev)) > @@ -1458,8 +1459,10 @@ static int dsa_slave_switchdev_event(struct > notifier_block *unused, > switch (event) { > case SWITCHDEV_FDB_ADD_TO_DEVICE: /* fall through */ > case SWITCHDEV_FDB_DEL_TO_DEVICE: > + if (!fdb_info->added_by_user) > + break; > if (dsa_slave_switchdev_fdb_work_init(switchdev_work, > - ptr)) > + fdb_info)) > goto err_fdb_work_init; > dev_hold(dev); > break; > LGTM Acked-by: Ivan Vecera <ivec...@redhat.com>

[PATCH net-next v2] ipv6: addrconf: don't evaluate keep_addr_on_down twice

2018-04-24 Thread Ivan Vecera
The addrconf_ifdown() evaluates keep_addr_on_down state twice. There is no need to do it. Cc: David Ahern <dsah...@gmail.com> Signed-off-by: Ivan Vecera <c...@cera.cz> --- net/ipv6/addrconf.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --gi

[PATCH net-next] ipv6: addrconf: don't evaluate keep_addr_on_down twice

2018-04-24 Thread Ivan Vecera
The addrconf_ifdown() evaluates keep_addr_on_down state twice. There is no need to do it. Cc: David Ahern <dsah...@gmail.com> Signed-off-by: Ivan Vecera <c...@cera.cz> --- net/ipv6/addrconf.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --gi

[PATCH net] net/sched: cls_u32: fix cls_u32 on filter replace

2018-02-08 Thread Ivan Vecera
d status") Signed-off-by: Ivan Vecera <ivec...@redhat.com> --- net/sched/cls_u32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 6311a548046b..c75e68e839c7 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32

Re: [PATCH net v2] cls_u32: fix use after free in u32_destroy_key()

2018-02-02 Thread Ivan Vecera
0; > } > } > @@ -667,7 +674,11 @@ static void u32_destroy(struct tcf_proto *tp, struct > netlink_ext_ack *extack) > > while ((ht = rtnl_dereference(tp_c->hlist)) != NULL) { > RCU_INIT_POINTER(tp_c->hlist, ht->next); > - kfree_rcu(ht, rcu); > + /* u32_destroy_key() will will later free ht for us, if > + * it's still referenced by some knode > + */ > + if (ht->refcnt == 0) > + kfree_rcu(ht, rcu); > } > > idr_destroy(_c->handle_idr); > Good catch, Paolo. Tested-by: Ivan Vecera <ivec...@redhat.com>

[PATCH net] be2net: restore properly promisc mode after queues reconfiguration

2018-01-19 Thread Ivan Vecera
arde <ajit.khapa...@broadcom.com> Cc: Sriharsha Basavapatna <sriharsha.basavapa...@broadcom.com> Cc: Somnath Kotur <somnath.ko...@broadcom.com> Fixes: 622190669403 ("be2net: Request RSS capability of Rx interface depending on number of Rx rings") Signed-off-by: Ivan Vecera &l

Re: [patch net resend] net: sched: cbq: create block for q->link.block

2017-11-28 Thread Ivan Vecera
handle 1: cbq avpkt 1000 rate 1000Mbit bandwidth > 1000Mbit > $ tc filter add dev eth0 parent 1: protocol ip prio 100 u32 match ip protocol > 0 0x00 flowid 1:1 > > Reported-by: Jaroslav Aster <jas...@redhat.com> > Reported-by: Ivan Vecera <ivec...@redhat.com

Re: [PATCH iproute2 2/2] devlink: add batch command support

2017-11-09 Thread Ivan Vecera
On 10.11.2017 07:57, Leon Romanovsky wrote: > On Fri, Nov 10, 2017 at 07:20:14AM +0100, Ivan Vecera wrote: >> The patch adds support to batch devlink commands. >> >> Cc: Jiri Pirko <j...@mellanox.com> >> Cc: Arkadi Sharshevsky <arka...@mellanox.com&

[PATCH iproute2 0/2] add batch command support to devlink

2017-11-09 Thread Ivan Vecera
This patch series adds support for devlink commands batching. The first just removes a requirement to have declared 'resolve_hosts' variable in any command that use any function implemented in utils.c (it is really confusing to see this declaration in utils like bridge or devlink). Ivan Vecera (2

[PATCH iproute2 1/2] lib: make resolve_hosts variable common

2017-11-09 Thread Ivan Vecera
in utils.c so the existing ones can be removed (the same approach that is used for timestamp_short). Cc: Jiri Pirko <j...@mellanox.com> Cc: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Ivan Vecera <ivec...@redhat.com> --- bridge/bridge.c | 1 - genl/genl.c

[PATCH iproute2 2/2] devlink: add batch command support

2017-11-09 Thread Ivan Vecera
The patch adds support to batch devlink commands. Cc: Jiri Pirko <j...@mellanox.com> Cc: Arkadi Sharshevsky <arka...@mellanox.com> Signed-off-by: Ivan Vecera <ivec...@redhat.com> --- devlink/devlink.c | 70 +++--- man/m

Re: [patch net-next v2 2/5] net: bridge: Export bridge multicast router state

2017-10-09 Thread Ivan Vecera
ev) > +{ > + struct net_bridge *br = netdev_priv(dev); > + bool is_router; > + > + spin_lock_bh(>multicast_lock); > + is_router = br_multicast_is_router(br); > + spin_unlock_bh(>multicast_lock); > + return is_router; > +} > +EXPORT_SYMBOL_GPL(br_multicast_router); > + > int br_multicast_set_querier(struct net_bridge *br, unsigned long val) > { > unsigned long max_delay; > Reviewed by: Ivan Vecera <ivec...@redhat.com>

Re: [patch net-next v2 1/5] net: bridge: Notify on bridge device mrouter state changes

2017-10-09 Thread Ivan Vecera
/* fall through */ > + br->multicast_router = val; > + err = 0; > + break; > case MDB_RTR_TYPE_TEMP_QUERY: > + if (br->multicast_router != MDB_RTR_TYPE_TEMP_QUERY) > + br_mc_router_state_change(br, false); > br->multicast_router = val; > err = 0; > break; > Reviewed by: Ivan Vecera <ivec...@redhat.com>

Re: [PATCH net-next v3 13/13] net: switchdev: Remove bridge bypass support from switchdev

2017-08-07 Thread Ivan Vecera
dge_port(dev)) > - return -EOPNOTSUPP; > - > - afspec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), > - IFLA_AF_SPEC); > - if (afspec) > - return switchdev_port_br_afspec(dev, afspec, > - switchdev_port_obj_del); > - > - return 0; > -} > -EXPORT_SYMBOL_GPL(switchdev_port_bridge_dellink); > - > -/** > - * switchdev_port_fdb_add - Add FDB (MAC/VLAN) entry to port > - * > - * @ndmsg: netlink hdr > - * @nlattr: netlink attributes > - * @dev: port device > - * @addr: MAC address to add > - * @vid: VLAN to add > - * > - * Add FDB entry to switch device. > - */ > -int switchdev_port_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], > -struct net_device *dev, const unsigned char *addr, > -u16 vid, u16 nlm_flags) > -{ > - struct switchdev_obj_port_fdb fdb = { > - .obj.orig_dev = dev, > - .obj.id = SWITCHDEV_OBJ_ID_PORT_FDB, > - .vid = vid, > - }; > - > - ether_addr_copy(fdb.addr, addr); > - return switchdev_port_obj_add(dev, ); > -} > -EXPORT_SYMBOL_GPL(switchdev_port_fdb_add); > - > -/** > - * switchdev_port_fdb_del - Delete FDB (MAC/VLAN) entry from port > - * > - * @ndmsg: netlink hdr > - * @nlattr: netlink attributes > - * @dev: port device > - * @addr: MAC address to delete > - * @vid: VLAN to delete > - * > - * Delete FDB entry from switch device. > - */ > -int switchdev_port_fdb_del(struct ndmsg *ndm, struct nlattr *tb[], > -struct net_device *dev, const unsigned char *addr, > -u16 vid) > -{ > - struct switchdev_obj_port_fdb fdb = { > - .obj.orig_dev = dev, > - .obj.id = SWITCHDEV_OBJ_ID_PORT_FDB, > - .vid = vid, > - }; > - > - ether_addr_copy(fdb.addr, addr); > - return switchdev_port_obj_del(dev, ); > -} > -EXPORT_SYMBOL_GPL(switchdev_port_fdb_del); > - > bool switchdev_port_same_parent_id(struct net_device *a, > struct net_device *b) > { > Reviewed-by: Ivan Vecera <ivec...@redhat.com>

Re: [PATCH net-next v3 12/13] net: bridge: Remove FDB deletion through switchdev object

2017-08-07 Thread Ivan Vecera
nal_learn) > - fdb_del_external_learn(f); > - > hlist_del_init_rcu(>hlist); > fdb_notify(br, f, RTM_DELNEIGH); > call_rcu(>rcu, fdb_rcu_free); > Reviewed-by: Ivan Vecera <ivec...@redhat.com>

Re: [PATCH net-next v3 1/9] net: switchdev: add SET_SWITCHDEV_OPS helper

2017-06-30 Thread Ivan Vecera
ps)) > #else > > static inline void switchdev_deferred_process(void) > @@ -322,6 +324,8 @@ static inline bool switchdev_port_same_parent_id(struct > net_device *a, > return false; > } > > +#define SWITCHDEV_SET_OPS(netdev, ops) do {} while (0) > + > #endif > > #endif /* _LINUX_SWITCHDEV_H_ */ > Acked-by: Ivan Vecera <ivec...@redhat.com>

Re: [patch net-next v2 04/19] net: switchdev: Change notifier chain to be atomic

2017-06-08 Thread Ivan Vecera
> Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> > Reviewed-by: Ido Schimmel <ido...@mellanox.com> > Reviewed-by: Ivan Vecera <ivec...@redhat.com> > Signed-off-by: Jiri Pirko <j...@mellanox.com> > --- > net/switchdev/switchdev.c | 30 ++---

Re: [patch net-next v2 05/19] net: bridge: Add support for notifying devices about FDB add/del

2017-06-08 Thread Ivan Vecera
adding ? SWITCHDEV_FDB_ADD_TO_DEVICE : > SWITCHDEV_FDB_DEL_TO_DEVICE; > + call_switchdev_notifiers(notifier_type, dev, ); > +} > + > +void > +br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb, int type) > +{ > + if (!fdb->added_by_user) > +

Re: [patch net-next v2 01/19] net: switchdev: Add support for querying supported bridge flags by hardware

2017-06-08 Thread Ivan Vecera
t; > Signed-off-by: Arkadi Sharshevsky <arka...@mellanox.com> > Reviewed-by: Ido Schimmel <ido...@mellanox.com> > Reviewed-by: Ivan Vecera <ivec...@redhat.com> > Signed-off-by: Jiri Pirko <j...@mellanox.com> > --- > include/net/switchdev.h | 2 ++ > 1 f

Re: [patch net-next v2 02/19] net: bridge: Add support for offloading port attributes

2017-06-08 Thread Ivan Vecera
(err == -EOPNOTSUPP) > + return 0; > + if (err) > + return err; > + > + /* Check if specific bridge flag attribute offload is supported */ > + if (!(attr.u.brport_flags_support & mask)) { > + br_warn(p->br, "bridge flag offload is not supported %u(%s)\n", > + (unsigned int)p->port_no, p->dev->name); > + return -EOPNOTSUPP; > + } > + > + attr.id = SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS; > + attr.flags = SWITCHDEV_F_DEFER; > + attr.u.brport_flags = flags; > + err = switchdev_port_attr_set(p->dev, ); > + if (err) { > + br_warn(p->br, "error setting offload flag on port %u(%s)\n", > + (unsigned int)p->port_no, p->dev->name); > + return err; > + } > + > + return 0; > +} > Reviewed-by: Ivan Vecera <ivec...@redhat.com>

Re: [patch net-next 01/19] net: switchdev: Add support for querying supported bridge flags by hardware

2017-06-05 Thread Ivan Vecera
IDGE_FLAGS_SUPPORT */ > bool mrouter; /* PORT_MROUTER */ > clock_t ageing_time; /* BRIDGE_AGEING_TIME */ > bool vlan_filtering;/* > BRIDGE_VLAN_FILTERING */ > Reviewed-by: Ivan Vecera <ivec...@redhat.com>

Re: [patch net-next 04/19] net: switchdev: Change notifier chain to be atomic

2017-06-05 Thread Ivan Vecera
t net_device *dev, >struct switchdev_notifier_info *info) > { > - ASSERT_RTNL(); > - > info->dev = dev; > - return raw_notifier_call_chain(_notif_chain, val, info); > + return atomic_notifier_call_chain(_notif_chain, val, info); > } > EXPORT_SYMBOL_GPL(call_switchdev_notifiers); > > Reviewed-by: Ivan Vecera <ivec...@redhat.com>

Re: [PATCH net-next v2] bridge: fix hello and hold timers starting/stopping

2017-05-20 Thread Ivan Vecera
2017-05-20 7:57 GMT+02:00 Hangbin Liu <liuhang...@gmail.com>: > On Fri, May 19, 2017 at 07:30:43PM +0200, Ivan Vecera wrote: >> Current bridge code incorrectly handles starting/stopping of hello and >> hold timers during STP enable/disable. >> >> 1. Timers are

[PATCH net-next v2] bridge: fix hello and hold timers starting/stopping

2017-05-19 Thread Ivan Vecera
: niko...@cumulusnetworks.com Signed-off-by: Ivan Vecera <c...@cera.cz> --- net/bridge/br_stp_if.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 08341d2aa9c9..a05027027513 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge

Re: [PATCH net] bridge: fix hello and hold timers starting/stopping

2017-05-19 Thread Ivan Vecera
2017-05-19 18:55 GMT+02:00 Nikolay Aleksandrov <niko...@cumulusnetworks.com>: > On 5/19/17 7:25 PM, Ivan Vecera wrote: >> >> Current bridge code incorrectly handles starting/stopping of hello and >> hold timers during STP enable/disable. >> >> 1. Timers are

Re: [PATCH net] bridge: fix hello and hold timers starting/stopping

2017-05-19 Thread Ivan Vecera
2017-05-19 18:51 GMT+02:00 Xin Long <lucien@gmail.com>: > On Sat, May 20, 2017 at 12:25 AM, Ivan Vecera <c...@cera.cz> wrote: >> Current bridge code incorrectly handles starting/stopping of hello and >> hold timers during STP enable/disable. >> >> 1. Time

Re: [PATCH net] bridge: start hello_timer when enabling KERNEL_STP in br_stp_start

2017-05-19 Thread Ivan Vecera
br_config_bpdu_generation(br); > > - if (br->stp_enabled != BR_USER_STP) > + if (br->stp_enabled == BR_KERNEL_STP) > mod_timer(>hello_timer, > round_jiffies(jiffies + br->hello_time)); > } > -- > 2.1.0 > Reviewed-by: Ivan Vecera <c...@cera.cz>

[PATCH net] bridge: fix hello and hold timers starting/stopping

2017-05-19 Thread Ivan Vecera
cumulusnetworks.com Signed-off-by: Ivan Vecera <c...@cera.cz> --- net/bridge/br_stp_if.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 0db8102995a5..f137ebf27755 100644 --- a/net/bridge/br_

Re: [PATCH net] bridge: start hello_timer when enabling KERNEL_STP in br_stp_start

2017-05-19 Thread Ivan Vecera
2017-05-19 17:05 GMT+02:00 Nikolay Aleksandrov <niko...@cumulusnetworks.com>: > On 5/19/17 6:03 PM, Ivan Vecera wrote: >> >> 2017-05-19 16:57 GMT+02:00 Nikolay Aleksandrov >> <niko...@cumulusnetworks.com>: >>> >>> On 5/19/17 5:51 PM, Ivan Vece

Re: [PATCH net] bridge: start hello_timer when enabling KERNEL_STP in br_stp_start

2017-05-19 Thread Ivan Vecera
2017-05-19 16:57 GMT+02:00 Nikolay Aleksandrov <niko...@cumulusnetworks.com>: > On 5/19/17 5:51 PM, Ivan Vecera wrote: >> >> 2017-05-19 16:45 GMT+02:00 Nikolay Aleksandrov >> <niko...@cumulusnetworks.com>: >>> >>> On 5/19/17 5:20 PM, Xin L

Re: [PATCH net] bridge: start hello_timer when enabling KERNEL_STP in br_stp_start

2017-05-19 Thread Ivan Vecera
2017-05-19 16:45 GMT+02:00 Nikolay Aleksandrov : > On 5/19/17 5:20 PM, Xin Long wrote: >> >> Since commit 76b91c32dd86 ("bridge: stp: when using userspace stp stop >> kernel hello and hold timers"), bridge would not start hello_timer if >> stp_enabled is not KERNEL_STP

Re: [PATCH] switchdev: documentation: fix whitespace issues

2017-05-01 Thread Ivan Vecera
  |  ||   | > + +--||++++---+ > +|||||| > +++++++ >    p1   p2   p3   p4   p5   p6 > -    > - front-panel ports    >   > -  >   > + > + front-panel ports > + > > Fig 1. > > Acked-by: Ivan Vecera <ivec...@redhat.com>

Re: [PATCH net v2 1/2] bridge: implement missing ndo_uninit()

2017-04-08 Thread Ivan Vecera
2017-04-08 16:14 GMT+02:00 Stephen Hemminger : > On Sat, 8 Apr 2017 17:05:48 +0300 > Nikolay Aleksandrov wrote: > >> On 08/04/17 16:49, Ido Schimmel wrote: >> > On Sat, Apr 08, 2017 at 09:30:42AM -0400, Stephen Hemminger wrote: >> >> On

Re: [patch net-next v2 0/8] Add support for pipeline debug (dpipe)

2017-03-28 Thread Ivan Vecera
/mellanox/mlxsw/spectrum_dpipe.h create mode 100644 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h Reviewed-by: Ivan Vecera <ivec...@redhat.com>

Re: [patch net-next 0/8] Add support for pipeline debug (dpipe)

2017-03-28 Thread Ivan Vecera
Dne 28.3.2017 v 09:59 Jiri Pirko napsal(a): Tue, Mar 28, 2017 at 09:57:22AM CEST, j...@resnulli.us wrote: Tue, Mar 28, 2017 at 09:42:58AM CEST, ivec...@redhat.com wrote: Dne 28.3.2017 v 09:10 Jiri Pirko napsal(a): Tue, Mar 28, 2017 at 12:48:34AM CEST, da...@davemloft.net wrote: Please fix

Re: [patch net-next 0/8] Add support for pipeline debug (dpipe)

2017-03-28 Thread Ivan Vecera
Dne 28.3.2017 v 08:51 Jiri Pirko napsal(a): Tue, Mar 28, 2017 at 12:48:34AM CEST, da...@davemloft.net wrote: Please fix up these warnings and resubmit: drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c: In function ‘mlxsw_sp_rif_counter_free’:

Re: [patch net-next 0/8] Add support for pipeline debug (dpipe)

2017-03-28 Thread Ivan Vecera
Dne 28.3.2017 v 09:10 Jiri Pirko napsal(a): Tue, Mar 28, 2017 at 12:48:34AM CEST, da...@davemloft.net wrote: Please fix up these warnings and resubmit: drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c: In function ‘mlxsw_sp_rif_counter_free’:

[PATCH ethtool] ethtool: sync help output for -x/-X with man page

2017-02-20 Thread Ivan Vecera
Add missing words to the help output for -x and -X commands as well as an ability to set the indirection table to default value. Signed-off-by: Ivan Vecera <c...@cera.cz> --- ethtool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ethtool.c b/ethtool.c index 7

Re: [patch net-next 01/10] switchdev: bridge: Offload multicast disabled

2017-02-09 Thread Ivan Vecera
gle(struct net_bridge *br, unsigned long val) if (br->multicast_disabled == !val) goto unlock; + br_mc_disabled_update(br->dev, !val); br->multicast_disabled = !val; if (br->multicast_disabled) goto unlock; Acked-by: Ivan Vecera <ivec...@redhat.com>

Re: [patch net-next 03/10] switchdev: bridge: Offload mc router ports

2017-02-09 Thread Ivan Vecera
rt_mc_router_state_change(p, false); /* don't allow timer refresh */ if (p->multicast_router == MDB_RTR_TYPE_TEMP) Acked-by: Ivan Vecera <ivec...@redhat.com>

Re: [patch net-next 02/10] bridge: mcast: Merge the mc router ports deletions to one function

2017-02-09 Thread Ivan Vecera
ter == MDB_RTR_TYPE_TEMP) + p->multicast_router = MDB_RTR_TYPE_TEMP_QUERY; } int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val) Acked-by: Ivan Vecera <ivec...@redhat.com>

Re: [patch net-next] MAINTAINERS: add Ivan as a switchdev maintainer

2017-02-02 Thread Ivan Vecera
ndex 300d2ec..eacacb2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11908,6 +11908,7 @@ F: include/linux/swiotlb.h SWITCHDEV M: Jiri Pirko <j...@resnulli.us> +M: Ivan Vecera <ivec...@redhat.com> L: netdev@vger.kernel.org S: Supported F: net/switchdev/ Ack

[PATCH net v2] be2net: fix initial MAC setting

2017-01-31 Thread Ivan Vecera
tting on privileged BE3 VFs") Cc: Sathya Perla <sathya.pe...@broadcom.com> Cc: Ajit Khaparde <ajit.khapa...@broadcom.com> Cc: Sriharsha Basavapatna <sriharsha.basavapa...@broadcom.com> Cc: Somnath Kotur <somnath.ko...@broadcom.com> Signed-off-by: Ivan

Re: [PATCH net] be2net: fix initial MAC setting

2017-01-31 Thread Ivan Vecera
My apologies for my previous replies... Gmail sent them as HTML emails that are not acceptable for ML... Thanks, Ivan

Re: [PATCH net] be2net: fix initial MAC setting

2017-01-31 Thread Ivan Vecera
2017-01-31 19:01 GMT+01:00 David Miller : > > > Sriharsha and other Broadcom folks, you must follow-up on Ivan's > explanations and proof of testing. > > It is not acceptable for you to leave this patch's review state in > limbo for days, no matter how complicated or big the

Re: [PATCH net] be2net: fix initial MAC setting

2017-01-27 Thread Ivan Vecera
2017-01-27 13:38 GMT+01:00 Sriharsha Basavapatna : > Hi Ivan, > > This patch is a bit involved. We need some time to review and test > this to make sure it works with other (non-BE3/VF - Skyhawk, Lancer) > devices. Also, IIRC we shouldn't see this issue with the

Re: [PATCH net] be2net: fix initial MAC setting

2017-01-27 Thread Ivan Vecera
van > > On Thu, Jan 26, 2017 at 3:58 PM, Ivan Vecera <c...@cera.cz> wrote: >> Recent commit 34393529163a ("be2net: fix MAC addr setting on privileged >> BE3 VFs") allows privileged BE3 VFs to set its MAC address during >> initialization. Although the initial M

[PATCH net] be2net: fix initial MAC setting

2017-01-26 Thread Ivan Vecera
gt; Cc: Ajit Khaparde <ajit.khapa...@broadcom.com> Cc: Sriharsha Basavapatna <sriharsha.basavapa...@broadcom.com> Cc: Somnath Kotur <somnath.ko...@broadcom.com> Signed-off-by: Ivan Vecera <c...@cera.cz> --- drivers/net/ethernet/emulex/benet/be_main.c | 31

[PATCH net v3] bridge: netlink: call br_changelink() during br_dev_newlink()

2017-01-20 Thread Ivan Vecera
Any bridge options specified during link creation (e.g. ip link add) are ignored as br_dev_newlink() does not process them. Use br_changelink() to do it. Fixes: 1332351 ("bridge: implement rtnl_link_ops->changelink") Signed-off-by: Ivan Vecera <c...@cera.cz> --- net/bridg

[PATCH net v2] bridge: netlink: call br_changelink() during br_dev_newlink()

2017-01-20 Thread Ivan Vecera
Any bridge options specified during link creation (e.g. ip link add) are ignored as br_dev_newlink() does not process them. Use br_changelink() to do it. Fixes: 1332351 bridge: implement rtnl_link_ops->changelink Signed-off-by: Ivan Vecera <c...@cera.cz> --- net/bridge/br_netli

[PATCH net] bridge: netlink: call br_changelink() during br_dev_newlink()

2017-01-20 Thread Ivan Vecera
Any bridge options specified during link creation (e.g. ip link add) are ignored as br_dev_newlink() does not process them. Use br_changelink() to do it. Signed-off-by: Ivan Vecera <c...@cera.cz> --- net/bridge/br_netlink.c | 33 +++-- 1 file changed, 19 inse

[PATCH net 1/3] be2net: fix status check in be_cmd_pmac_add()

2017-01-13 Thread Ivan Vecera
aparde <ajit.khapa...@broadcom.com> Cc: Sriharsha Basavapatna <sriharsha.basavapa...@broadcom.com> Cc: Somnath Kotur <somnath.ko...@broadcom.com> Signed-off-by: Ivan Vecera <c...@cera.cz> --- drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +- 1 file changed, 1 insertion

[PATCH net 2/3] be2net: don't delete MAC on close on unprivileged BE3 VFs

2017-01-13 Thread Ivan Vecera
roadcom.com> Cc: Somnath Kotur <somnath.ko...@broadcom.com> Signed-off-by: Ivan Vecera <c...@cera.cz> --- drivers/net/ethernet/emulex/benet/be_main.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/e

[PATCH net 3/3] be2net: fix MAC addr setting on privileged BE3 VFs

2017-01-13 Thread Ivan Vecera
should not be allowed to change its MAC in any case. Cc: Sathya Perla <sathya.pe...@broadcom.com> Cc: Ajit Khaparde <ajit.khapa...@broadcom.com> Cc: Sriharsha Basavapatna <sriharsha.basavapa...@broadcom.com> Cc: Somnath Kotur <somnath.ko...@broadcom.com> Signed-off-by: Ivan Vece

[PATCH net] be2net: fix unicast list filling

2017-01-06 Thread Ivan Vecera
Cc: Somnath Kotur <somnath.ko...@broadcom.com> Fixes: b717241 be2net: replace polling with sleeping in the FW completion path Signed-off-by: Ivan Vecera <c...@cera.cz> --- drivers/net/ethernet/emulex/benet/be_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/driv

[PATCH net] be2net: fix accesses to unicast list

2017-01-06 Thread Ivan Vecera
ltering is broken. Cc: Sathya Perla <sathya.pe...@broadcom.com> Cc: Ajit Khaparde <ajit.khapa...@broadcom.com> Cc: Sriharsha Basavapatna <sriharsha.basavapa...@broadcom.com> Cc: Somnath Kotur <somnath.ko...@broadcom.com> Fixes: 988d44b be2net: Avoid redundant addition of mac

Re: [patch net-next 3/5] mlxsw: Move PCI id table definitions into driver modules

2016-10-27 Thread Ivan Vecera
patch could remove no longer necessary driver "kind" strings which were used to link PCI ids with individual mlxsw drivers. Suggested-by: Ivan Vecera <ivec...@redhat.com> Tested-by: Ivan Vecera <ivec...@redhat.com> Signed-off-by: Jiri Pirko <j...@mellanox.com&

[PATCH net] arch/powerpc: Update parameters for csum_tcpudp_magic & csum_tcpudp_nofold

2016-10-27 Thread Ivan Vecera
" Cc: Alexander Duyck <adu...@mirantis.com> Signed-off-by: Ivan Vecera <ivec...@redhat.com> --- arch/powerpc/include/asm/checksum.h | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/include/asm/checksum.h b/arch/powerpc/include/asm/checksum

Re: [PATCH net] bnx2: fix locking when netconsole is used

2016-10-18 Thread Ivan Vecera
Dne 17.10.2016 v 19:21 David Miller napsal(a): From: Ivan Vecera <ivec...@redhat.com> Date: Mon, 17 Oct 2016 18:20:31 +0200 diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 27f11a5..9c408413 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c

[PATCH net v2] bnx2: fix locking when netconsole is used

2016-10-18 Thread Ivan Vecera
) WARN_ON_ONCE(in_irq() || irqs_disabled()); <<<<<< WARN Cc: Sony Chacko <sony.cha...@qlogic.com> Cc: dept-hsglinuxnic...@qlogic.com Signed-off-by: Ivan Vecera <ivec...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2.c | 17 +++-- 1 file change

[PATCH net] bnx2: fix locking when netconsole is used

2016-10-17 Thread Ivan Vecera
) WARN_ON_ONCE(in_irq() || irqs_disabled()); <<<<<< WARN Cc: Sony Chacko <sony.cha...@qlogic.com> Cc: dept-hsglinuxnic...@qlogic.com Signed-off-by: Ivan Vecera <ivec...@redhat.com> --- drivers/net/ethernet/broadcom/bnx2.c | 17 +++-- 1 file change

Re: ethtool.h compile warning on c++

2016-10-17 Thread Ivan Vecera
Dne 14.10.2016 v 21:46 Ben Greear napsal(a): I am getting warnings about sign missmatch. Maybe make SPEED_UNKNOWN be ((__u32)(0x)) ? The 0xU could be better. Ivan

[PATCH net 2/2] bna: fix crash in bnad_get_strings()

2016-09-15 Thread Ivan Vecera
of strings in the array and also removes rtnl_link_stats64 entries that are not used in output and are always zero. Fixes: 6e7333d "net: add rx_nohandler stat counter" Signed-off-by: Ivan Vecera <ivec...@redhat.com> --- drivers/net/ethernet/brocade/bna/bnad_ethtool.c | 50 +++

  1   2   3   >