From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, mlxsw@mellanox.com, andrew@lunn.ch,
vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com,
ast@kernel.org, daniel@iogearbox.net, simon.horman@netronome.com,
pieter.jansenvanvuuren@netronome.com, john.hurley@netronome.com
Subject: Re: [patch net-next v2 01/10] cls_bpf: move prog offload->netdev check into drivers
Date: Mon, 13 Nov 2017 09:28:23 +0100 [thread overview]
Message-ID: <20171113082823.GI1986@nanopsycho> (raw)
In-Reply-To: <20171113001235.5d4f4262@cakuba>
Mon, Nov 13, 2017 at 09:12:35AM CET, jakub.kicinski@netronome.com wrote:
>On Mon, 13 Nov 2017 08:55:56 +0100, Jiri Pirko wrote:
>> Mon, Nov 13, 2017 at 08:17:34AM CET, jakub.kicinski@netronome.com wrote:
>> >On Mon, 13 Nov 2017 07:25:38 +0100, Jiri Pirko wrote:
>> >> Mon, Nov 13, 2017 at 03:14:18AM CET, jakub.kicinski@netronome.com wrote:
>> >> >On Sun, 12 Nov 2017 16:55:55 +0100, Jiri Pirko wrote:
>> >> >> From: Jiri Pirko <jiri@mellanox.com>
>> >> >>
>> >> >> In order to remove tp->q usage in cls_bpf, the offload->netdev check
>> >> >> needs to be moved to individual drivers as only they will have access
>> >> >> to appropriate struct net_device.
>> >> >>
>> >> >> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
>> >> >
>> >> >This seems not entirely correct and it adds unnecessary code. I think
>> >>
>> >> What is not correct?
>> >
>> >From quick reading it looks like you will allow to install the
>> >dev-specific filter without skip_sw flag. You haven't fixed what
>>
>> Right. I see it now.
>>
>>
>> >your previous series broke in cls_bpf offload model and now you
>>
>> What do you mean exactly?
>
>As explained elsewhere, cls_bpf used to track what's offloaded and
>issue ADD/REPLACE/DESTORY accordingly. Now drivers need to know what
>they're offloading, but they still don't. So if you add a filter that
>offload successfully and then one that doesn't, the spurious DESTORY
>will kill the wrong offload.
Ah, got it.
>
>> >break it even further.
>> >
>> >> >the XDP and cls_bpf handling could be unified, making way for binding
>> >> >the same program to multiple ports of the same device. Would you mind
>> >> >waiting a day for me to send corrections to BPF offload?
>> >>
>> >> Well I'm trying to get this in before net-next closes...
>> >
>> >Right, and I'm surprised by that. I'd hope you'll understand my caution
>> >here given recent history.
>>
>> Sure.
>
>I looked through this series and I can't grasp all the details of how
>things are supposed to work from the code here :( Perhaps important
>bits went in earlier and I missed them.
>
>Starting from the most fundamental thing - if I have a shared block
>full of skip_sw filters and then bind it to a device which doesn't even
>have ndo_setup_tc - what prevents that from happening?
Nothing atm. I need to add some check there. Thanks.
>
>AFACT tcf_block_offload_cmd() is returning void.
next prev parent reply other threads:[~2017-11-13 8:28 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-12 15:55 [patch net-next v2 00/10] net: sched: allow qdiscs to share filter block instances Jiri Pirko
2017-11-12 15:55 ` [patch net-next v2 01/10] cls_bpf: move prog offload->netdev check into drivers Jiri Pirko
2017-11-13 2:14 ` Jakub Kicinski
2017-11-13 6:25 ` Jiri Pirko
2017-11-13 7:17 ` Jakub Kicinski
2017-11-13 7:55 ` Jiri Pirko
2017-11-13 8:12 ` Jakub Kicinski
2017-11-13 8:28 ` Jiri Pirko [this message]
2017-11-12 15:55 ` [patch net-next v2 02/10] net: sched: introduce support for multiple filter chain pointers registration Jiri Pirko
2017-11-12 15:55 ` [patch net-next v2 03/10] net: sched: avoid usage of tp->q in tcf_classify Jiri Pirko
2017-11-12 15:55 ` [patch net-next v2 04/10] net: sched: introduce block mechanism to handle netif_keep_dst calls Jiri Pirko
2017-11-13 7:47 ` Jakub Kicinski
2017-11-13 7:58 ` Jiri Pirko
2017-11-13 8:03 ` Jakub Kicinski
2017-11-13 8:08 ` Jiri Pirko
2017-11-13 8:17 ` Jakub Kicinski
2017-11-13 8:35 ` Jiri Pirko
2017-11-13 8:45 ` Jakub Kicinski
2017-11-13 8:54 ` Jiri Pirko
2017-11-12 15:55 ` [patch net-next v2 05/10] net: sched: remove classid and q fields from tcf_proto Jiri Pirko
2017-11-12 15:56 ` [patch net-next v2 06/10] net: sched: allow ingress and clsact qdiscs to share filter blocks Jiri Pirko
2017-11-13 7:54 ` Jakub Kicinski
2017-11-13 7:56 ` Jiri Pirko
2017-11-13 8:05 ` Jakub Kicinski
2017-11-13 8:09 ` Jiri Pirko
2017-11-12 15:56 ` [patch net-next v2 07/10] mlxsw: spectrum_acl: Reshuffle code around mlxsw_sp_acl_ruleset_create/destroy Jiri Pirko
2017-11-12 15:56 ` [patch net-next v2 08/10] mlxsw: spectrum_acl: Don't store netdev and ingress for ruleset unbind Jiri Pirko
2017-11-12 15:56 ` [patch net-next v2 09/10] mlxsw: spectrum_acl: Implement TC block sharing Jiri Pirko
2017-11-12 15:56 ` [patch net-next v2 10/10] mlxsw: spectrum_acl: Pass mlxsw_sp_port down to ruleset bind/unbind ops Jiri Pirko
2017-11-15 23:12 ` [patch net-next v2 00/10] net: sched: allow qdiscs to share filter block instances Cong Wang
2017-11-18 17:18 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171113082823.GI1986@nanopsycho \
--to=jiri@resnulli.us \
--cc=andrew@lunn.ch \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=jakub.kicinski@netronome.com \
--cc=jhs@mojatatu.com \
--cc=john.hurley@netronome.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=pieter.jansenvanvuuren@netronome.com \
--cc=simon.horman@netronome.com \
--cc=vivien.didelot@savoirfairelinux.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).