e port list traversal in team_change_mtu() can
be protected by RCU read lock. In case of failure the failing port
is marked and unwind code-path is done also under RCU read lock
protection (but not in reverse order).
Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
Cc: Jiri Pirko
On Thu, 14 Jan 2021 16:34:24 -0800
Saeed Mahameed wrote:
> On Thu, 2021-01-14 at 12:55 +0100, Ivan Vecera wrote:
> > Team driver protects port list traversal in team_change_mtu()
> > by its team->lock mutex. This causes a deadlock with certain
> > devices that call
net teaming device")
Cc: Jiri Pirko
Signed-off-by: Ivan Vecera
---
drivers/net/team/team.c | 36 +++-
include/linux/if_team.h | 1 +
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index c19dac21c4
On Fri, 15 Jan 2021 09:24:05 +0100
Ivan Vecera wrote:
> > according to your explanation in the commit message the team->lock
> > mutex will be also taken under this rcu lock, so this is bad even
> > if dev_set_mtu does not sleep.
> >
> Hmm, you are right... btw
On Wed, 20 Jan 2021 15:18:20 -0800
Cong Wang wrote:
> On Wed, Jan 20, 2021 at 4:56 AM Ivan Vecera wrote:
> >
> > To fix the problem __team_compute_features() needs to be postponed
> > for these cases.
>
> Is there any user-visible effect after deferring this featur
On Thu, 21 Jan 2021 18:34:52 -0800
Jakub Kicinski wrote:
> On Thu, 21 Jan 2021 11:29:37 +0100 Ivan Vecera wrote:
> > On Wed, 20 Jan 2021 15:18:20 -0800
> > Cong Wang wrote:
> > > On Wed, Jan 20, 2021 at 4:56 AM Ivan Vecera wrote:
> > >
> > > >
Fix two error paths in ethnl_set_channels() to avoid lock-up caused
but unreleased RTNL.
Fixes: e19c591eafad ("ethtool: set device channel counts with CHANNELS_SET
request")
Cc: Michal Kubecek
Reported-by: LiLiang
Signed-off-by: Ivan Vecera
---
net/ethtool/channels.c | 6
dr(br);
> @@ -889,6 +898,9 @@ int __br_vlan_set_proto(struct net_bridge *br, __be16
> proto)
> return 0;
>
> err_filt:
> + attr.u.vlan_protocol = ntohs(oldproto);
> + switchdev_port_attr_set(br->dev, &attr);
> +
> list_for_each_entry_continue_reverse(vlan, &vg->vlan_list, vlist)
> vlan_vid_del(p->dev, proto, vlan->vid);
>
Reviewed-by: Ivan Vecera
work based on further testing and suggestions from ivecera
>
> Fixes: a3b658cfb664 ("bonding: allow xfrm offload setup post-module-load")
> Reported-by: Ivan Vecera
> Suggested-by: Ivan Vecera
> Cc: Jay Vosburgh
> Cc: Veaceslav Falico
> Cc: Andy Gospodarek
>
On Sun, 22 Nov 2020 22:17:16 -0500
Jarod Wilson wrote:
> Have run into a case where bond_option_mode_set() gets called before
> hw_features has been filled in, and very bad things happen when
> netdev_change_features() then gets called, because the empty hw_features
> wipes out almost all feature
: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
Cc: Jiri Pirko
Cc: David S. Miller
Cc: Cong Wang
Cc: Jakub Kicinski
Cc: Saeed Mahameed
Signed-off-by: Ivan Vecera
---
drivers/net/team/team.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/n
On Mon, 25 Jan 2021 12:53:22 -0800
Cong Wang wrote:
> On Sun, Jan 24, 2021 at 11:44 PM Ivan Vecera wrote:
> >
> > Function __team_compute_features() is protected by team->lock
> > mutex when it is called from team_compute_features() used when
> > features of a
ruct 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
char *addr, u16 vid,
> + bool swdev_notify);
> int br_fdb_external_learn_del(struct net_bridge *br, struct net_bridge_port
> *p,
> - const unsigned char *addr, u16 vid);
> + const unsigned char *addr, u16 vid,
> + bool swdev_notify);
> void br_fdb_offloaded_set(struct net_bridge *br, struct net_bridge_port *p,
> const unsigned char *addr, u16 vid);
>
> diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c
> index 71a03c4..35474d4 100644
> --- a/net/bridge/br_switchdev.c
> +++ b/net/bridge/br_switchdev.c
> @@ -118,7 +118,7 @@ br_switchdev_fdb_call_notifiers(bool adding, const
> unsigned char *mac,
> void
> br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb, int type)
> {
> - if (!fdb->added_by_user || !fdb->dst)
> + if (!fdb->dst)
> return;
>
> switch (type) {
>
Acked-by: Ivan Vecera
The addrconf_ifdown() evaluates keep_addr_on_down state twice. There
is no need to do it.
Cc: David Ahern
Signed-off-by: Ivan Vecera
---
net/ipv6/addrconf.c | 23 ++-
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
The addrconf_ifdown() evaluates keep_addr_on_down state twice. There
is no need to do it.
Cc: David Ahern
Signed-off-by: Ivan Vecera
---
net/ipv6/addrconf.c | 23 ++-
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
Adaptive coalescing is managed per adapter not per event queue so it
does not needed to store 'enable' flag for each event queue.
Signed-off-by: Ivan Vecera
---
drivers/net/ethernet/emulex/benet/be.h | 2 +-
drivers/net/ethernet/emulex/benet/be_ethtool.c | 7 ---
d
+++
net/core/dev.c| 9 +
net/sched/sch_generic.c | 3 +++
3 files changed, 23 insertions(+)
Reviewed-by: Ivan Vecera
return skb;
@@ -880,6 +882,7 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
sch->enqueue = ops->enqueue;
sch->dequeue = ops->dequeue;
sch->dev_queue = dev_queue;
+ sch->empty = true;
dev_hold(dev);
refcount_set(&sch->refcnt, 1);
Reviewed-by: Ivan Vecera
@ int br_multicast_set_router(struct net_bridge *br,
> unsigned long val)
> switch (val) {
> case MDB_RTR_TYPE_DISABLED:
> case MDB_RTR_TYPE_PERM:
> + br_mc_router_state_change(br, val == MDB_RTR_TYPE_PERM);
> del_timer(&br->multicast_ro
mp;br->multicast_lock);
> + is_router = br_multicast_is_router(br);
> + spin_unlock_bh(&br->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
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, ilias.apalodi...@linaro.o
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.
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/
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
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
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
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
]; /* 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
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
- 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
*/
/* --- 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
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
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
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
- 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
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
]; /* 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
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
*/
/* --- 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
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
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
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
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 i
39f5d ("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 10
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 insert
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
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
- 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(-)
di
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
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
dgeport are not deleted.
>
> Note that this has the same effect as the IFLA_BRPORT_FLUSH attribute.
>
> CC: Jiri Pirko
> CC: Ivan Vecera
> CC: Roopa Prabhu
> CC: Nikolay Aleksandrov
> Signed-off-by: Alexandra Winter
> Signed-off-by: Julian Wiedmann
> ---
>
otifier blocks.
> */
> int call_switchdev_notifiers(unsigned long val, struct net_device *dev,
Acked-by: Ivan Vecera
Fixes: f2c17e107900 ("netlink: add netlink handler for gfeatures (-k)")
Cc: Michal Kubecek
Signed-off-by: Ivan Vecera
---
netlink/features.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/netlink/features.c b/netlink/features.c
index 3f1240437350..b2
Potentially allocated memory allocated for mask is not freed when
the allocation for value fails.
Fixes: 81a30f416ec7 ("netlink: add bitset command line parser handlers")
Cc: Michal Kubecek
Signed-off-by: Ivan Vecera
---
netlink/parser.c | 4 +++-
1 file changed, 3 insertions(+),
Fixes: bdfffab54933 ("netlink: message format descriptions for rtnetlink")
Cc: Michal Kubecek
Signed-off-by: Ivan Vecera
---
netlink/prettymsg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/netlink/prettymsg.c b/netlink/prettymsg.c
index 9e62bebe615e..f992dcaf0
Memory blocks referenced by new_state and old_state are never freed.
For efeatures there is no need to check pointer as free() can be called
with NULL parameter.
Fixes: 6042804cf6ec ("Change -k/-K options to use ETHTOOL_{G,S}FEATURES")
Cc: Michal Kubecek
Signed-off-by: I
On Mon, 28 Sep 2020 17:44:55 +0200
Michal Kubecek wrote:
> On Thu, Sep 24, 2020 at 09:27:57PM +0200, Ivan Vecera wrote:
> > Fixes: f2c17e107900 ("netlink: add netlink handler for gfeatures (-k)")
> >
> > Cc: Michal Kubecek
> > Signed-off-by: Ivan Vecera
m_skbedit.c| 2 +-
> tc/m_skbmod.c | 2 +-
> tc/m_tunnel_key.c | 2 +-
> tc/m_vlan.c | 2 +-
> tc/m_xt.c | 2 +-
> tc/m_xt_old.c | 2 +-
> tc/tc_filter.c | 12
> 21 files changed, 32 insertions(+), 20 deletions(-)
>
Tested-by: 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 (netif_run
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
in struct 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_featur
ze was 176 bytes (using defconfig on x86_64).
With regard to this fact it's reasonable to allocate this structure
dynamically in fl_change() to reduce its stack size.
Fixes: 05cd271fd61a ("cls_flower: Support multiple masks per priority")
Cc: Jiri Pirko
Cc: Paul Blakey
Signed-off-
1a ("cls_flower: Support multiple masks per priority")
Not sure this is -net material. But I don't mind.
Cc: Jiri Pirko
Cc: Paul Blakey
Signed-off-by: Ivan Vecera
---
net/sched/cls_flower.c | 19 ++-
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/net/
Cc: Jiri Pirko
Cc: Paul Blakey
Acked-by: Jiri Pirko
Signed-off-by: Ivan Vecera
---
net/sched/cls_flower.c | 19 ++-
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
index dad04e710493..f6aa57fbbbaf 100644
--- a/net/sch
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
lmsg_type = RTM_GETNEIGH,
> + .nlh.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST,
> + .nlh.nlmsg_seq = rth->dump = ++rth->seq,
> + .ifm.ifi_family = PF_BRIDGE,
> + };
> + int err;
> +
> + err = filter_fn(&req.nlh, sizeof(req));
> + if (err)
> + return err;
> +
> + return send(rth->fd, &req, sizeof(req), 0);
> +}
> +
> int rtnl_statsdump_req_filter(struct rtnl_handle *rth, int fam, __u32
> filt_mask)
> {
> struct {
> --
> 2.20.1
>
Acked-by: Ivan Vecera
;& ret != -EOPNOTSUPP)
return ret;
*changed = __vlan_add_flags(vlan, flags);
@@ -1147,7 +1154,7 @@ int nbp_vlan_add(struct net_bridge_port *port, u16 vid,
u16 flags,
vlan->vid = vid;
vlan->port = port;
- ret = __vlan_add(vlan, flags);
+ ret = __vlan_add(vlan, flags, extack);
if (ret)
kfree(vlan);
else
Acked-by: Ivan Vecera
dev_port_obj_del_now(struct net_device *dev,
const struct switchdev_obj *obj)
{
return switchdev_port_obj_notify(SWITCHDEV_PORT_OBJ_DEL,
-dev, obj, NULL);
+ dev, obj, NULL, NULL);
}
static void switchdev_port_obj_del_deferred(struct net_device *dev,
Acked-by: Ivan Vecera
_notif_chain,
val, info);
}
Acked-by: Ivan Vecera
struct netlink_ext_ack *extack))
{
int err;
Acked-by: Ivan Vecera
->ndo_bridge_setlink(dev, nlh,
- flags);
+ flags,
+ extack);
if (!err) {
flags &= ~BRI
This patch sets an error message in extack when the number of qdisc
handles exceeds the maximum. Also the error-code ENOSPC is more
appropriate than ENOMEM in this situation.
Signed-off-by: Ivan Vecera
---
net/sched/sch_api.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff
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
> Reported-by: Ivan Vecera
> Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure
will never end. The extack message is correct, but
> it doesn't say that 0 is not a valid number for 'flows': while at it, fix
> this also. Add a tdc selftest to check correct validation of 'flows'.
>
> CC: Ivan Vecera
> Fixes: ec97ecf1ebe4 ("net: sche
mrp_ring_state; /* MRP_RING_STATE */
> #endif
> } u;
> };
Acked-by: Ivan Vecera
s changed, 240 insertions(+), 5 deletions(-)
>
Works great. Thanks, Roopa.
Tested-by: 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 +-
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'.
solve_hosts directly
in utils.c so the existing ones can be removed (the same approach
that is used for timestamp_short).
Cc: Jiri Pirko
Cc: Arkadi Sharshevsky
Signed-off-by: Ivan Vecera
---
bridge/bridge.c | 1 -
genl/genl.c | 1 -
ip/ip.c | 1 -
ip/rtmon.c | 1 -
lib/uti
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
The patch adds support to batch devlink commands.
Cc: Jiri Pirko
Cc: Arkadi Sharshevsky
Signed-off-by: Ivan Vecera
---
devlink/devlink.c | 70 +++---
man/man8/devlink.8 | 16 +
2 files changed, 78 insertions(+), 8 deletions(-)
diff
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
>> Cc: Arkadi Sharshevsky
>> Signed-off-by: Ivan Vecera
&
tatic 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
d status")
Signed-off-by: Ivan Vecera
---
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.c
@@ -955,7 +955,8 @@ static i
nath Kotur
Fixes: 622190669403 ("be2net: Request RSS capability of Rx interface depending
on number of Rx rings")
Signed-off-by: Ivan Vecera
---
drivers/net/ethernet/emulex/benet/be_main.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/net/ethernet/emulex/benet/
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(&tp_c->handle_idr);
>
Good catch, Paolo.
Tested-by: Ivan Vecera
.obj);
> -}
> -
> static void fdb_delete(struct net_bridge *br, struct net_bridge_fdb_entry *f)
> {
> if (f->is_static)
> fdb_del_hw_addr(br, f->addr.addr);
>
> - if (f->added_by_external_learn)
> - fdb_del_external_learn(f);
> -
> hlist_del_init_rcu(&f->hlist);
> fdb_notify(br, f, RTM_DELNEIGH);
> call_rcu(&f->rcu, fdb_rcu_free);
>
Reviewed-by: Ivan Vecera
lattr *afspec;
> -
> - if (!netif_is_bridge_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, &fdb.obj);
> -}
> -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, &fdb.obj);
> -}
> -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
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 when br_dev_open.
>>
>> The p
2017-05-19 16:57 GMT+02:00 Nikolay Aleksandrov :
> On 5/19/17 5:51 PM, Ivan Vecera wrote:
>>
>> 2017-05-19 16:45 GMT+02:00 Nikolay Aleksandrov
>> :
>>>
>>> On 5/19/17 5:20 PM, Xin Long wrote:
>>>>
>>>>
>>>> Since commit
2017-05-19 17:05 GMT+02:00 Nikolay Aleksandrov :
> On 5/19/17 6:03 PM, Ivan Vecera wrote:
>>
>> 2017-05-19 16:57 GMT+02:00 Nikolay Aleksandrov
>> :
>>>
>>> On 5/19/17 5:51 PM, Ivan Vecera wrote:
>>>>
>>>>
>>>> 2017-05-19 1
cumulusnetworks.com
Signed-off-by: Ivan Vecera
---
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_stp_if.c
+++ b/net/bridge/br
led != BR_USER_STP)
> + if (br->stp_enabled == BR_KERNEL_STP)
> mod_timer(&br->hello_timer,
> round_jiffies(jiffies + br->hello_time));
> }
> --
> 2.1.0
>
Reviewed-by: Ivan Vecera
2017-05-19 18:51 GMT+02:00 Xin Long :
> On Sat, May 20, 2017 at 12:25 AM, Ivan Vecera wrote:
>> Current bridge code incorrectly handles starting/stopping of hello and
>> hold timers during STP enable/disable.
>>
>> 1. Timers are stopped in br_stp_start() during NO_STP
2017-05-19 18:55 GMT+02:00 Nikolay Aleksandrov :
> 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 stopped in br_stp_start() during N
: niko...@cumulusnetworks.com
Signed-off-by: Ivan Vecera
---
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/br_stp_if.c
@@
2017-05-20 7:57 GMT+02:00 Hangbin Liu :
> 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 stopped in br_stp_star
truct switchdev_notifier_info *info)
> {
> - ASSERT_RTNL();
> -
> info->dev = dev;
> - return raw_notifier_call_chain(&switchdev_notif_chain, val, info);
> + return atomic_notifier_call_chain(&switchdev_notif_chain, val, info);
> }
> EXPORT_SYMBOL_GPL(call_switchdev_notifiers);
>
>
Reviewed-by: Ivan Vecera
clock_t ageing_time;/* BRIDGE_AGEING_TIME */
> bool vlan_filtering;/*
> BRIDGE_VLAN_FILTERING */
>
Reviewed-by: Ivan Vecera
1 - 100 of 240 matches
Mail list logo