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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201120020140.GA26162@ranger.igk.intel.com>
Date:   Fri, 20 Nov 2020 03:01:40 +0100
From:   Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To:     David Awogbemila <awogbemila@...gle.com>
Cc:     Saeed Mahameed <saeed@...nel.org>, Netdev <netdev@...r.kernel.org>,
        Catherine Sullivan <csully@...gle.com>,
        Yangchun Fu <yangchun@...gle.com>
Subject: Re: [PATCH net-next v7 1/4] gve: Add support for raw addressing
 device option

On Thu, Nov 19, 2020 at 04:22:24PM -0800, David Awogbemila wrote:
> On Thu, Nov 19, 2020 at 12:21 PM Saeed Mahameed <saeed@...nel.org> wrote:
> >
> > On Wed, 2020-11-18 at 15:20 -0800, David Awogbemila wrote:
> > > From: Catherine Sullivan <csully@...gle.com>
> > >
> > > Add support to describe device for parsing device options. As
> > > the first device option, add raw addressing.
> > >
> > > "Raw Addressing" mode (as opposed to the current "qpl" mode) is an
> > > operational mode which allows the driver avoid bounce buffer copies
> > > which it currently performs using pre-allocated qpls
> > > (queue_page_lists)
> > > when sending and receiving packets.
> > > For egress packets, the provided skb data addresses will be
> > > dma_map'ed and
> > > passed to the device, allowing the NIC can perform DMA directly - the
> > > driver will not have to copy the buffer content into pre-allocated
> > > buffers/qpls (as in qpl mode).
> > > For ingress packets, copies are also eliminated as buffers are handed
> > > to
> > > the networking stack and then recycled or re-allocated as
> > > necessary, avoiding the use of skb_copy_to_linear_data().
> > >
> > > This patch only introduces the option to the driver.
> > > Subsequent patches will add the ingress and egress functionality.
> > >
> > > Reviewed-by: Yangchun Fu <yangchun@...gle.com>
> > > Signed-off-by: Catherine Sullivan <csully@...gle.com>
> > > Signed-off-by: David Awogbemila <awogbemila@...gle.com>
> > > ---
> > >
> > ...
> > > diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c
> > > b/drivers/net/ethernet/google/gve/gve_adminq.c
> > > index 24ae6a28a806..1e2d407cb9d2 100644
> > > --- a/drivers/net/ethernet/google/gve/gve_adminq.c
> > > +++ b/drivers/net/ethernet/google/gve/gve_adminq.c
> > > @@ -14,6 +14,57 @@
> > >  #define GVE_ADMINQ_SLEEP_LEN         20
> > >  #define GVE_MAX_ADMINQ_EVENT_COUNTER_CHECK   100
> > >
> > > +#define GVE_DEVICE_OPTION_ERROR_FMT "%s option error:\n" \
> > > +"Expected: length=%d, feature_mask=%x.\n" \
> > > +"Actual: length=%d, feature_mask=%x.\n"
> > > +
> > > +static inline
> > > +struct gve_device_option *gve_get_next_option(struct
> > >
> >
> > Following Dave's policy, no static inline functions in C files.
> > This is control path so you don't really need the inline here.
> 
> Okay, I'll move it to a header file.

That's not what Saeed meant I suppose. Policy says that we let the
compiler to make the decision whether or not such static function should
be inlined. And since it's not a performance critical path as Saeed says
then drop the inline and keep the rest as-is.

> 
> >
> >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ