On Wed 14 Nov 2018 at 06:44, Jiri Pirko wrote:
> Tue, Nov 13, 2018 at 02:46:54PM CET, vla...@mellanox.com wrote:
>>On Mon 12 Nov 2018 at 17:30, David Miller wrote:
>>> From: Vlad Buslov
>>> Date: Mon, 12 Nov 2018 09:55:46 +0200
>>>
>>>> Regi
On Tue 13 Nov 2018 at 13:40, Stefano Brivio wrote:
> On Tue, 13 Nov 2018 13:25:52 +
> Vlad Buslov wrote:
>
>> On Tue 13 Nov 2018 at 09:40, Stefano Brivio wrote:
>> > Hi Vlad,
>> >
>> > On Mon, 12 Nov 2018 09:55:45 +0200
>> > Vlad Busl
On Mon 12 Nov 2018 at 17:30, David Miller wrote:
> From: Vlad Buslov
> Date: Mon, 12 Nov 2018 09:55:46 +0200
>
>> Register netlink protocol handlers for message types RTM_NEWTFILTER,
>> RTM_DELTFILTER, RTM_GETTFILTER as unlocked. Set rtnl_held variable that
>> tracks r
On Tue 13 Nov 2018 at 10:07, Stefano Brivio wrote:
> Vlad,
>
> On Mon, 12 Nov 2018 09:28:59 -0800 (PST)
> David Miller wrote:
>
>> From: Vlad Buslov
>> Date: Mon, 12 Nov 2018 09:55:31 +0200
>>
>&g
On Tue 13 Nov 2018 at 09:40, Stefano Brivio wrote:
> Hi Vlad,
>
> On Mon, 12 Nov 2018 09:55:45 +0200
> Vlad Buslov wrote:
>
>> @@ -179,9 +179,25 @@ static void tcf_proto_destroy_work(struct work_struct
>> *work)
>> rtnl_unlock();
>> }
>>
&
On Mon 12 Nov 2018 at 17:28, David Miller wrote:
> From: Vlad Buslov
> Date: Mon, 12 Nov 2018 09:55:30 +0200
>
>> +void mini_qdisc_pair_swap(struct mini_Qdisc_pair *miniqp,
>> + struct tcf_proto *tp_head)
>> +{
>> +xchg(>tp_head, t
he
status of rtnl lock, so their API is extended with additional
'rtnl_held' argument that is used to indicate that caller holds rtnl
lock.
Vlad Buslov (17):
net: sched: refactor mini_qdisc_pair_swap() to use workqueue
net: sched: protect block state with spinlock
net: sched: refactor tc_
lock for
protection.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 1 +
net/sched/cls_api.c | 44 +---
2 files changed, 38 insertions(+), 7 deletions(-)
diff --git a/include/net/sch_generic.h b/include/net
rom concurrent modification instead of relying on rtnl mutex. Use it
to protect 'deleting' flag. Add lockdep macros to validate that lock is
held when accessing protected fields.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 18 +
net/sched/cls_api.c |
t() only for
classifiers that implement it.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 1 +
net/sched/cls_api.c | 12 +++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 10
tor classifier only and doesn't assume external
synchronization of filters list.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/pkt_cls.h | 2 ++
net/sched/cls_api.c | 70 +++
net/sched/sch_api.c | 4 +--
3 files changed,
tc_new_tfilter() and lookup the chain/proto again.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 1 +
net/sched/cls_api.c | 35 ++-
2 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/include/net/sch_generic.h b
and qdisc to function __tcf_block_release()
that is used internally by regular block release and by chain update
function, which is not unlocked and doesn't need to release rtnl.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 43 ++-
1
API, instead
of new chains API.
Add helper function tcf_require_rtnl() to only lock rtnl when specified
condition is true and the lock hasn't been taken already.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 74 +
1
ume external synchronization of chain list.
Don't take reference to all chains in block when flushing and use
tcf_get_next_chain() to safely iterate over chain list instead. Remove
tcf_block_put_all_chains() that is no longer used.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/
Extend Qdisc_class_ops with flags. Create enum to hold possible class ops
flag values. Add first class ops flags value QDISC_CLASS_OPS_DOIT_UNLOCKED
to indicate that class ops functions can be called without taking rtnl
lock.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net
rent users, second
actually deallocates chain memory (and parent block, if applicable).
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 4 ++
net/sched/cls_api.c | 93 +++
2 files changed, 81 insertions(+), 16 deleti
to indicate that
classifier doesn't require rtnl lock.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 17 +++---
net/sched/cls_api.c | 85 ---
net/sched/cls_basic.c | 12 ---
net/sched/cls_bpf.c | 12
In order to remove dependency on rtnl lock, use block->lock to protect
chain0 struct from concurrent modification. Rearrange code in chain0
callback add and del functions to only access chain0 when block->lock is
held.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls
template values, instead of chains themselves.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 73 +
1 file changed, 57 insertions(+), 16 deletions(-)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index
which is passed
to actions API. Add new 'rtnl_held' parameter to tcf_exts_validate() in cls
API. No classifier is currently updated to support unlocked execution, so
pass hardcoded 'true' flag parameter value.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/pkt_cls.h| 2
as a chain_head_change callback for
ingress and clsact Qdiscs, to use a workqueue.
Signed-off-by: Vlad Buslov
Suggested-by: Jiri Pirko
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 6 ++
net/sched/cls_api.c | 48 +--
net/sched
necessary code while holding chain lock in order to prevent
invalidation of chain_info structure by potential concurrent change.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 17
net/sched/cls_api.c | 103
In order to remove dependency on rtnl lock, modify chain API to use
block->lock to protect chain from concurrent modification. Rearrange
tc_ctl_chain() code to call tcf_chain_hold() while holding block->lock.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.
ate
return value, after memory which err points to has already been
freed. Save error code in temporary variable and use the variable to
generate return value.
Signed-off-by: Vlad Buslov
---
lib/libnetlink.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/libnetlink.c b/
Recently flower classifier was updated to expose count of devices that
filter is offloaded to. Add support to print this counter as 'in_hw_count'.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
Changes from V1 to V2:
- Change print format string to "%u"
tc/f_flower.c | 10 +++
On Wed 03 Oct 2018 at 16:08, Davide Caratti wrote:
> On Wed, 2018-10-03 at 18:29 +0300, Vlad Buslov wrote:
>> Recently flower classifier was updated to expose count of devices that
>> filter is offloaded to. Add support to print this counter as 'in_hw_count'.
>>
>>
Recently flower classifier was updated to expose count of devices that
filter is offloaded to. Add support to print this counter as 'in_hw_count'.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
tc/f_flower.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tc
On Fri 28 Sep 2018 at 17:03, Cong Wang wrote:
> On Fri, Sep 28, 2018 at 4:36 AM Vlad Buslov wrote:
>>
>> On Thu 27 Sep 2018 at 20:42, Cong Wang wrote:
>> > It is clearly a copy-n-paste.
>> >
>> > Signed-off-by: Cong Wang
>> > ---
>&
On Thu 27 Sep 2018 at 20:42, Cong Wang wrote:
> It is clearly a copy-n-paste.
>
> Signed-off-by: Cong Wang
> ---
> net/sched/cls_api.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
> index 3de47e99b788..8dd7f8af6d54 100644
>
Extract code that flushes and puts all chains on tcf block to two
standalone function to be shared with functions that locklessly get/put
reference to block.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 55 +
1
Protect block idr access with spinlock, instead of relying on rtnl lock.
Take tn->idr_lock spinlock during block insertion and removal.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --
users.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 38 +-
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 49e3c10532ad..3de47e99b788 100644
--- a/net/sched/cls_api.c
patches in this set, instead of relying on global protection
provided by rtnl lock.
Extract code that is common with tcf_block_detach_ext() into common
function __tcf_block_put().
Extend tcf_block with rcu to allow safe deallocation when it is accessed
concurrently.
Signed-off-by: Vlad Buslov
() that is called without rtnl lock taken. This function
only takes rtnl lock if Qdisc reference counter reached zero and is
intended to be used as optimization.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/linux/rtnetlink.h | 5 +
include/net/pkt_sched.h | 1 +
include/net
ins to
release, block must still be deallocated manually.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 2 +-
net/sched/cls_api.c | 59 ---
2 files changed, 36 insertions(+), 25 deletions(-)
diff --git a/include/
code that deallocates Qdisc into new private qdisc_destroy()
function. It is intended to be shared between regular qdisc_put() and its
unlocked version that is introduced in next patch in this series.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 2 +-
net/sched
Implement function to take reference to Qdisc that relies on rcu read lock
instead of rtnl mutex. Function only takes reference to Qdisc if reference
counter isn't zero. Intended to be used by unlocked cls API.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 13
, this function only releases Qdisc and it is extended in next
patches in this series.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 79 +++--
1 file changed, 64 insertions(+), 15 deletions(-)
diff --git a/net/sched/cls_api.c
on latest net-next.
- Patch 8 - remove.
- Patch 9 - fold into patch 11.
- Patch 11:
- Rename tcf_block_{get|put}() to tcf_block_refcnt_{get|put}().
- Patch 13 - remove.
Vlad Buslov (10):
net: core: netlink: add helper refcount dec and lock function
net: sched: rename qdisc_destroy() to qdisc_put
wrapper function around refcount_dec_and_lock
that obtains rtnl lock if reference counter value reached 0.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/linux/rtnetlink.h | 2 ++
net/core/rtnetlink.c | 6 ++
2 files changed, 8 insertions(+)
diff --git a/include/linux
on latest net-next.
- Patch 8 - remove.
- Patch 9 - fold into patch 11.
- Patch 11:
- Rename tcf_block_{get|put}() to tcf_block_refcnt_{get|put}().
- Patch 13 - remove.
Vlad Buslov (10):
net: core: netlink: add helper refcount dec and lock function
net: sched: rename qdisc_destroy() to qdisc_put
On Wed 19 Sep 2018 at 22:09, Cong Wang wrote:
> On Mon, Sep 17, 2018 at 12:19 AM Vlad Buslov wrote:
>> @@ -482,16 +483,25 @@ static int tcf_block_insert(struct tcf_block *block,
>> struct net *net,
>> struct netlink_ext_ack *extack)
>>
On Wed 19 Sep 2018 at 22:04, Cong Wang wrote:
> On Mon, Sep 17, 2018 at 12:19 AM Vlad Buslov wrote:
>> +static void tcf_qdisc_put(struct Qdisc *q, bool rtnl_held)
>> +{
>> + if (!q)
>> + return;
>> +
>> + if (rtnl_held)
>>
Implement function to take reference to Qdisc that relies on rcu read lock
instead of rtnl mutex. Function only takes reference to Qdisc if reference
counter isn't zero. Intended to be used by unlocked cls API.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 13
users.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 37 -
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 0a7a3ace2da9..6a3eec5dbdf1 100644
--- a/net/sched/cls_api.c
Extract code that flushes and puts all chains on tcf block to two
standalone function to be shared with functions that locklessly get/put
reference to block.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 55 +
1
wrapper function around refcount_dec_and_lock
that obtains rtnl lock if reference counter value reached 0.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/linux/rtnetlink.h | 1 +
net/core/rtnetlink.c | 6 ++
2 files changed, 7 insertions(+)
diff --git a/include/linux
patches in this set, instead of relying on global protection
provided by rtnl lock.
Extract code that is common with tcf_block_detach_ext() into common
function __tcf_block_put().
Extend tcf_block with rcu to allow safe deallocation when it is accessed
concurrently.
Signed-off-by: Vlad Buslov
() that is called without rtnl lock taken. This function
only takes rtnl lock if Qdisc reference counter reached zero and is
intended to be used as optimization.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/linux/rtnetlink.h | 5 +
include/net/pkt_sched.h | 1 +
include/net
, this function only releases Qdisc and it is extended in next
patches in this series.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 88 -
1 file changed, 73 insertions(+), 15 deletions(-)
diff --git a/net/sched/cls_api.c
code that deallocates Qdisc into new private qdisc_destroy()
function. It is intended to be shared between regular qdisc_put() and its
unlocked version that is introduced in next patch in this series.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 2 +-
net/sched
Protect block idr access with spinlock, instead of relying on rtnl lock.
Take tn->idr_lock spinlock during block insertion and removal.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --
ins to
release, block must still be deallocated manually.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 2 +-
net/sched/cls_api.c | 59 ---
2 files changed, 36 insertions(+), 25 deletions(-)
diff --git a/include/
:
- Rebase on latest net-next.
- Patch 8 - remove.
- Patch 9 - fold into patch 11.
- Patch 11:
- Rename tcf_block_{get|put}() to tcf_block_refcnt_{get|put}().
- Patch 13 - remove.
Vlad Buslov (10):
net: core: netlink: add helper refcount dec and lock function
net: sched: rename qdisc_destroy
On Thu 13 Sep 2018 at 17:13, Cong Wang wrote:
> On Wed, Sep 12, 2018 at 1:51 AM Vlad Buslov wrote:
>>
>>
>> On Fri 07 Sep 2018 at 19:12, Cong Wang wrote:
>> > On Fri, Sep 7, 2018 at 6:52 AM Vlad Buslov wrote:
>> >>
>> >> Acti
On Thu 13 Sep 2018 at 17:21, Cong Wang wrote:
> On Wed, Sep 12, 2018 at 1:24 AM Vlad Buslov wrote:
>>
>>
>> On Fri 07 Sep 2018 at 20:09, Cong Wang wrote:
>> > On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote:
>> >>
>> >> Functions tc
On Fri 07 Sep 2018 at 19:12, Cong Wang wrote:
> On Fri, Sep 7, 2018 at 6:52 AM Vlad Buslov wrote:
>>
>> Action API was changed to work with actions and action_idr in concurrency
>> safe manner, however tcf_del_walker() still uses actions without taking a
>> refer
On Fri 07 Sep 2018 at 19:50, Cong Wang wrote:
> On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote:
>>
>> Extend Qdisc_class_ops with flags. Create enum to hold possible class ops
>> flag values. Add first class ops flags value QDISC_CLASS_OPS_DOIT_UNLOCKED
>>
On Fri 07 Sep 2018 at 19:52, Cong Wang wrote:
> On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote:
>>
>> Extend tcf_block with rcu to allow safe deallocation when it is accessed
>> concurrently.
>
> This sucks, please fold this patch into where you call rcu
On Fri 07 Sep 2018 at 20:09, Cong Wang wrote:
> On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote:
>>
>> Functions tcf_block_get{_ext}() and tcf_block_put{_ext}() actually
>> attach/detach block to specific Qdisc besides just taking/putting
>> reference. Rename them
Change flower in_hw_count type to fixed-size u32 and dump it as
TCA_FLOWER_IN_HW_COUNT. This change is necessary to properly test shared
blocks and re-offload functionality.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h| 2 +-
include/uapi/linux/pkt_cls.h
nfo->lock while iterating over actions
and use new tcf_idr_release_unsafe() to release them while holding the
lock.
Signed-off-by: Vlad Buslov
---
include/net/act_api.h | 1 +
net/sched/act_api.c | 73 ---
2 files changed, 65 insertions(+), 9 del
On Fri 07 Sep 2018 at 09:11, Jakub Kicinski
wrote:
> On Thu, 6 Sep 2018 18:37:23 +0300, Vlad Buslov wrote:
>> Change flower in_hw_count type to fixed-size u32 and dump it as
>> TCA_FLOWER_IN_HW_COUNT. This change is necessary to properly test shared
>> blocks and re-
Change flower in_hw_count type to fixed-size u32 and dump it as
TCA_FLOWER_IN_HW_COUNT. This change is necessary to properly test shared
blocks and re-offload functionality.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h| 2 +-
include/uapi/linux/pkt_cls.h
On Wed 05 Sep 2018 at 20:32, Cong Wang wrote:
> On Wed, Sep 5, 2018 at 12:05 AM Vlad Buslov wrote:
>>
>>
>> On Tue 04 Sep 2018 at 22:41, Cong Wang wrote:
>> > On Mon, Sep 3, 2018 at 1:33 PM Vlad Buslov wrote:
>> >>
>> >>
>> >
On Thu 06 Sep 2018 at 08:39, Kirill Tkhai wrote:
> On 06.09.2018 11:30, Eric Dumazet wrote:
>>
>>
>> On 09/06/2018 12:58 AM, Vlad Buslov wrote:
>>
>> ...
>>
>>> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
>>>
ins to
release, block must still be deallocated manually.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 2 +-
net/sched/cls_api.c | 59 ---
2 files changed, 36 insertions(+), 25 deletions(-)
diff --git a/include/
wrapper function around refcount_dec_and_lock
that obtains rtnl lock if reference counter value reached 0.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/linux/rtnetlink.h | 1 +
net/core/rtnetlink.c | 6 ++
2 files changed, 7 insertions(+)
diff --git a/include/linux
Implement function to take reference to Qdisc that relies on rcu read lock
instead of rtnl mutex. Function only takes reference to Qdisc if reference
counter isn't zero. Intended to be used by unlocked cls API.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 13
Protect block idr access with spinlock, instead of relying on rtnl lock.
Take tn->idr_lock spinlock during block insertion and removal.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --
lock in cls API.
Some functions in cls and sch APIs have historic names that no longer
clearly describe their intent. In order not make this code even more
confusing when introducing their concurrency-friendly versions, rename
these functions to describe actual implementation.
Vlad Buslov (13
() that is called without rtnl lock taken. This function
only takes rtnl lock if Qdisc reference counter reached zero and is
intended to be used as optimization.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/linux/rtnetlink.h | 5 +
include/net/pkt_sched.h | 1 +
include/net
Extract code that flushes and puts all chains on tcf block to two
standalone function to be shared with functions that locklessly get/put
reference to block.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 55 +
1
patches in this set, instead of relying on global protection
provided by rtnl lock.
Extract code that is common with tcf_block_detach_ext() into common
function __tcf_block_put().
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 70
Functions tcf_block_get{_ext}() and tcf_block_put{_ext}() actually
attach/detach block to specific Qdisc besides just taking/putting
reference. Rename them according to their purpose.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/pkt_cls.h| 36
code that deallocates Qdisc into new private qdisc_destroy()
function. It is intended to be shared between regular qdisc_put() and its
unlocked version that is introduced in next patch in this series.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 2 +-
net/sched
Extend Qdisc_class_ops with flags. Create enum to hold possible class ops
flag values. Add first class ops flags value QDISC_CLASS_OPS_DOIT_UNLOCKED
to indicate that class ops functions can be called without taking rtnl
lock.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net
users.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 37 -
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 5d9f91331d26..8808818a1d24 100644
--- a/net/sched/cls_api.c
Extend tcf_block with rcu to allow safe deallocation when it is accessed
concurrently.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
include/net/sch_generic.h | 1 +
net/sched/cls_api.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/net
, this function only releases Qdisc and it is extended in next
patches in this series.
Signed-off-by: Vlad Buslov
Acked-by: Jiri Pirko
---
net/sched/cls_api.c | 88 -
1 file changed, 73 insertions(+), 15 deletions(-)
diff --git a/net/sched/cls_api.c
On Tue 04 Sep 2018 at 22:41, Cong Wang wrote:
> On Mon, Sep 3, 2018 at 1:33 PM Vlad Buslov wrote:
>>
>>
>> On Mon 03 Sep 2018 at 18:50, Cong Wang wrote:
>> > On Mon, Sep 3, 2018 at 12:06 AM Vlad Buslov wrote:
>> >>
>> >> Acti
led at (6082): []
tcf_ife_cleanup+0x39/0x200 [act_ife]
[ 646.878845] ---[ end trace b1b8c12ffe51e657 ]---
Fixes: 5ffe57da29b3 ("act_ife: fix a potential deadlock")
Signed-off-by: Vlad Buslov
---
Changes V1->V2:
- fold constants into helper function
net/sched/act_ife.c | 16 +++
On Mon 03 Sep 2018 at 18:50, Cong Wang wrote:
> On Mon, Sep 3, 2018 at 12:06 AM Vlad Buslov wrote:
>>
>> Action API was changed to work with actions and action_idr in concurrency
>> safe manner, however tcf_del_walker() still uses actions without taking
>> referenc
On Mon 03 Sep 2018 at 17:03, Cong Wang wrote:
> On Mon, Sep 3, 2018 at 12:10 AM Vlad Buslov wrote:
>>
>> Recent refactoring of add_metainfo() caused use_all_metadata() to add
>> metainfo to ife action metalist without taking reference to module. This
>> causes warnin
led at (6082): []
tcf_ife_cleanup+0x39/0x200 [act_ife]
[ 646.878845] ---[ end trace b1b8c12ffe51e657 ]---
Fixes: 5ffe57da29b3 ("act_ife: fix a potential deadlock")
Signed-off-by: Vlad Buslov
---
net/sched/act_ife.c | 18 +-
1 file changed, 17 insertions(+), 1 deletio
According to the new locking rule, we have to take tcf_lock for both
->init() and ->dump(), as RTNL will be removed.
Use tcf spinlock to protect private nat action data from concurrent
modification during dump. (nat init already uses tcf spinlock when changing
action state)
Signed-off-by
of tcf lock. (old params value is not used by
init, so there is no need of standalone rcu dereference step)
Remove rtnl lock assertion that is no longer required.
Signed-off-by: Vlad Buslov
---
net/sched/act_skbedit.c | 23 ++-
1 file changed, 14 insertions(+), 9 deletions(-)
.
Signed-off-by: Vlad Buslov
---
net/sched/act_api.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 398c752ff529..d593114e7d2f 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -246,6 +246,8 @@ static int
08.014230]
==
[ 808.022108] Disabling lock debugging due to kernel taint
Fixes: edfaf94fa705 ("net_sched: improve and refactor tcf_action_put_many()")
Signed-off-by: Vlad Buslov
---
net/sched/act_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/ac
On Wed 29 Aug 2018 at 17:15, Cong Wang wrote:
> According to the new locking rule, we have to take tcf_lock
> for both ->init() and ->dump(), as RTNL will be removed.
> However, it is missing for act_connmark.
Thank you for finding and fixing this!
>
> Cc: Vlad Buslov
"net: sched: act_csum: remove dependency on rtnl lock")
Fixes: 2142236b4584 ("net: sched: act_bpf: remove dependency on rtnl lock")
Signed-off-by: Vlad Buslov
---
net/sched/act_bpf.c| 10 +-
net/sched/act_csum.c | 10 +-
net/sched/act_gact
On Mon 13 Aug 2018 at 23:18, Cong Wang wrote:
> Hi, Vlad,
>
> Could you help to test my fixes?
>
> I just pushed them into my own git repo:
> https://github.com/congwang/linux/commits/net-sched-fixes
>
> Particularly, this is the revert:
>
in
case of overwrite.
Fixes: 4e8ddd7f1758 ("net: sched: don't release reference on action overwrite")
Reported-by: Cong Wang
Signed-off-by: Vlad Buslov
---
net/sched/act_ife.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/net/sched/act_ife.c b/net/sched
On Mon 13 Aug 2018 at 23:00, Cong Wang wrote:
> On Thu, Jul 5, 2018 at 7:24 AM Vlad Buslov wrote:
>> diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c
>> index 89a761395c94..acea3feae762 100644
>> --- a/net/sched/act_ife.c
>> +++ b/net/sched/act_ife.c
> ...
>
On Mon 13 Aug 2018 at 17:23, Jamal Hadi Salim wrote:
> On 2018-08-13 1:20 p.m., Vlad Buslov wrote:
>> Lockdep reports deadlock for following locking scenario in ife action:
>>
>> Task one:
>> 1) Executes ife action update.
>> 2) Takes tcfa_lock.
>> 3)
Hi David,
Is it okay to submit a fix for issue I uncovered when testing actions
with estimators, or I should resubmit to net when net-next is moved?
Thanks,
Vlad
7902]do_syscall_64+0x7a/0x3f0
[ 509.342116]entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 509.349601]
stack backtrace:
[ 509.354663] CPU: 6 PID: 5460 Comm: tc Not tainted 4.18.0-rc8+ #646
[ 509.361216] Hardware name: Supermicro SYS-2028TP-DECR/X10DRT-P, BIOS 2.0b
03/30/2017
On Fri 10 Aug 2018 at 21:45, Cong Wang wrote:
> On Fri, Aug 10, 2018 at 3:29 AM Vlad Buslov wrote:
>>
>> Approach you suggest is valid, but has its own trade-offs:
>>
>> - As you noted, lock granularity becomes coarse-grained due to per-netns
>> scope.
>
&
lock assertion that is no longer required.
Signed-off-by: Vlad Buslov
---
net/sched/act_tunnel_key.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/net/sched/act_tunnel_key.c b/net/sched/act_tunnel_key.c
index d42d9e112789..ba2ae9f75ef5 100644
1 - 100 of 276 matches
Mail list logo