# Re: \[Patch bpf-next v2 2/5\] skmsg: get rid of struct sk\_psock\_parser

- From: Cong Wang \<hidden\>
- Date: 2021-02-13 01:59:02 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/02/7760426
- Thread: https://ratatoskr.run/netdev/2021/02/7759766/t.md

```text
On Fri, Feb 12, 2021 at 11:09 AM Cong Wang [ref] wrote:
>
> On Fri, Feb 12, 2021 at 2:56 AM Lorenz Bauer [ref] wrote:
> >
> > On Wed, 10 Feb 2021 at 02:21, Cong Wang [ref] wrote:
> > >
> > > From: Cong Wang <redacted>
> > >
> > > struct sk_psock_parser is embedded in sk_psock, it is
> > > unnecessary as skb verdict also uses ->saved_data_ready.
> > > We can simply fold these fields into sk_psock, and get rid
> > > of ->enabled.
> >
> > Looks nice, can you use sk_psock_strp_enabled() more? There are a
> > couple places in sock_map.c which test psock->saved_data_ready
> > directly.
>
> Its name tells it is for stream parser, so not suitable for others.
>
> Are you suggesting to rename it to sk_psock_enabled() and use
> it? Note it still has an additional !psock test, but I think that is fine
> for slow paths.

Well, I think it is a bug, sk_psock_strp_enabled() probably means
to check whether progs.stream_verdict is running, not whether
any of these progs is running. So, I'd leave this untouched in this
patchset and if needed a separate bug fix should be sent to -net.

Thanks.
```
