lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 4 Feb 2021 08:54:30 +0100
From:   Loic Poulain <loic.poulain@...aro.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Bjørn Mork <bjorn@...k.no>,
        Dan Williams <dcbw@...hat.com>,
        Network Development <netdev@...r.kernel.org>,
        Carl Yin(殷张成) <carl.yin@...ctel.com>
Subject: Re: [PATCH net-next v2 1/3] net: mhi: Add RX/TX fixup callbacks

Hi Jakub,


On Thu, 4 Feb 2021 at 00:08, Jakub Kicinski <kuba@...nel.org> wrote:
>
> Please put the maintainers or the list thru which you expect the patch
> to be applied in the To: field of your emails.
>
> On Mon,  1 Feb 2021 22:05:40 +0100 Loic Poulain wrote:
> > +     if (proto && proto->tx_fixup) {
> > +             skb = proto->tx_fixup(mhi_netdev, skb);
> > +             if (unlikely(!skb))
> > +                     goto exit_drop;
> > +     }
>
> > @@ -170,7 +193,11 @@ static void mhi_net_dl_callback(struct mhi_device *mhi_dev,
> >               }
> >
> >               skb_put(skb, mhi_res->bytes_xferd);
> > -             netif_rx(skb);
> > +
> > +             if (proto && proto->rx_fixup)
> > +                     proto->rx_fixup(mhi_netdev, skb);
> > +             else
> > +                     netif_rx(skb);
> >       }
>
> There us a slight asymmetry between tx_fixup and rx_fixup.
> tx_fixup just massages the frame and then mhi_net still takes
> care of transmission. On Rx side rx_fixup actually does the
> netif_rx(skb). Maybe s/rx_fixup/rx/ ?

Yes, that makes sense.

Loic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ