Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-11-19 Thread Yunsheng Lin
On 2020/11/19 19:41, Peter Zijlstra wrote: > On Thu, Nov 19, 2020 at 05:19:44PM +0800, Yunsheng Lin wrote: >> On 2020/11/19 0:26, Jakub Kicinski wrote: >>> On Wed, 18 Nov 2020 16:57:57 +0100 Peter Zijlstra wrote: On Wed, Nov 18, 2020 at 07:43:48AM -0800, Jakub Kicinski wrote: > TBH th

Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-11-19 Thread Peter Zijlstra
On Thu, Nov 19, 2020 at 05:19:44PM +0800, Yunsheng Lin wrote: > On 2020/11/19 0:26, Jakub Kicinski wrote: > > On Wed, 18 Nov 2020 16:57:57 +0100 Peter Zijlstra wrote: > >> On Wed, Nov 18, 2020 at 07:43:48AM -0800, Jakub Kicinski wrote: > >> > >>> TBH the last sentence I wrote isn't clear even to me

Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-11-19 Thread Yunsheng Lin
On 2020/11/19 0:26, Jakub Kicinski wrote: > On Wed, 18 Nov 2020 16:57:57 +0100 Peter Zijlstra wrote: >> On Wed, Nov 18, 2020 at 07:43:48AM -0800, Jakub Kicinski wrote: >> >>> TBH the last sentence I wrote isn't clear even to me at this point ;D >>> >>> Maybe using just the macros from preempt.h - l

Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-11-18 Thread Jakub Kicinski
On Wed, 18 Nov 2020 16:57:57 +0100 Peter Zijlstra wrote: > On Wed, Nov 18, 2020 at 07:43:48AM -0800, Jakub Kicinski wrote: > > > TBH the last sentence I wrote isn't clear even to me at this point ;D > > > > Maybe using just the macros from preempt.h - like this? > > > > #define lockdep_assert_in

Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-11-18 Thread Peter Zijlstra
On Wed, Nov 18, 2020 at 07:43:48AM -0800, Jakub Kicinski wrote: > TBH the last sentence I wrote isn't clear even to me at this point ;D > > Maybe using just the macros from preempt.h - like this? > > #define lockdep_assert_in_softirq()\ > do {

Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-11-18 Thread Jakub Kicinski
On Wed, 18 Nov 2020 09:57:30 +0800 Yunsheng Lin wrote: > On 2020/11/3 3:41, Jakub Kicinski wrote: > > On Mon, 2 Nov 2020 11:14:32 +0800 Yunsheng Lin wrote: > >> On 2020/11/1 6:38, Jakub Kicinski wrote: > >>> On Thu, 29 Oct 2020 19:34:48 +0800 Yunsheng Lin wrote: > The current semantic

Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-11-17 Thread Yunsheng Lin
On 2020/11/3 3:41, Jakub Kicinski wrote: > On Mon, 2 Nov 2020 11:14:32 +0800 Yunsheng Lin wrote: >> On 2020/11/1 6:38, Jakub Kicinski wrote: >>> On Thu, 29 Oct 2020 19:34:48 +0800 Yunsheng Lin wrote: The current semantic for napi_consume_skb() is that caller need to provide non-zero bud

Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-11-02 Thread Jakub Kicinski
On Mon, 2 Nov 2020 11:14:32 +0800 Yunsheng Lin wrote: > On 2020/11/1 6:38, Jakub Kicinski wrote: > > On Thu, 29 Oct 2020 19:34:48 +0800 Yunsheng Lin wrote: > >> The current semantic for napi_consume_skb() is that caller need > >> to provide non-zero budget when calling from NAPI context, and > >>

Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-11-01 Thread Yunsheng Lin
On 2020/11/1 6:38, Jakub Kicinski wrote: > On Thu, 29 Oct 2020 19:34:48 +0800 Yunsheng Lin wrote: >> The current semantic for napi_consume_skb() is that caller need >> to provide non-zero budget when calling from NAPI context, and >> breaking this semantic will cause hard to debug problem, because

Re: [PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-10-31 Thread Jakub Kicinski
On Thu, 29 Oct 2020 19:34:48 +0800 Yunsheng Lin wrote: > The current semantic for napi_consume_skb() is that caller need > to provide non-zero budget when calling from NAPI context, and > breaking this semantic will cause hard to debug problem, because > _kfree_skb_defer() need to run in atomic con

[PATCH net-next] net: add in_softirq() debug checking in napi_consume_skb()

2020-10-29 Thread Yunsheng Lin
The current semantic for napi_consume_skb() is that caller need to provide non-zero budget when calling from NAPI context, and breaking this semantic will cause hard to debug problem, because _kfree_skb_defer() need to run in atomic context in order to push the skb to the particular cpu' napi_alloc