DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Gavin Hu (Arm Technology China)" <Gavin.Hu@arm.com>
To: Jens Freimann <jfreimann@redhat.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"tiwei.bie@intel.com" <tiwei.bie@intel.com>,
	"zhihong.wang@intel.com" <zhihong.wang@intel.com>,
	nd <nd@arm.com>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v2 1/3] net/virtio: inline refill and offload	helpers
Date: Wed, 19 Dec 2018 10:26:10 +0000	[thread overview]
Message-ID: <VI1PR08MB31673BDDD3035F01D87356188FBE0@VI1PR08MB3167.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20181219092504.5t6c5mxwwvkfpkmm@jenstp.localdomain>



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Jens Freimann
> Sent: Wednesday, December 19, 2018 5:25 PM
> To: Maxime Coquelin <maxime.coquelin@redhat.com>
> Cc: dev@dpdk.org; tiwei.bie@intel.com; zhihong.wang@intel.com
> Subject: Re: [dpdk-dev] [PATCH v2 1/3] net/virtio: inline refill and offload
> helpers
> 
> On Tue, Dec 11, 2018 at 02:48:02PM +0100, Maxime Coquelin wrote:
> >Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> >---
> > drivers/net/virtio/virtio_rxtx.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> >diff --git a/drivers/net/virtio/virtio_rxtx.c
> >b/drivers/net/virtio/virtio_rxtx.c
> >index eb891433e..e1c270b1c 100644
> >--- a/drivers/net/virtio/virtio_rxtx.c
> >+++ b/drivers/net/virtio/virtio_rxtx.c
> >@@ -741,7 +741,7 @@ virtio_dev_tx_queue_setup_finish(struct
> rte_eth_dev *dev,
> > 	return 0;
> > }
> >
> >-static void
> >+static inline void
> > virtio_discard_rxbuf(struct virtqueue *vq, struct rte_mbuf *m)  {
> > 	int error;
> >@@ -757,7 +757,7 @@ virtio_discard_rxbuf(struct virtqueue *vq, struct
> rte_mbuf *m)
> > 	}
> > }
> >
> >-static void
> >+static inline void
> > virtio_discard_rxbuf_inorder(struct virtqueue *vq, struct rte_mbuf *m)
> >{
> > 	int error;
> >@@ -769,7 +769,7 @@ virtio_discard_rxbuf_inorder(struct virtqueue *vq,
> struct rte_mbuf *m)
> > 	}
> > }
> >
> >-static void
> >+static inline void
> > virtio_update_packet_stats(struct virtnet_stats *stats, struct
> >rte_mbuf *mbuf)  {
> > 	uint32_t s = mbuf->pkt_len;
> >@@ -811,7 +811,7 @@ virtio_rx_stats_updated(struct virtnet_rx *rxvq,
> >struct rte_mbuf *m)  }
> >
> > /* Optionally fill offload information in structure */ -static int
> >+static inline int
> > virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr) {
> > 	struct rte_net_hdr_lens hdr_lens;
> 
> since these are all static functions, does declaring them inline actually help
> or are they inlined anyway by the compiler?
> 
> regards,
> Jens

By disassembling the code, static function calls translate to "bl XXX", that means they are not inline.
Inline is not always working, maybe __rte_always_inline is required here? 
/Gavin

  reply	other threads:[~2018-12-19 10:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 13:48 [dpdk-dev] [PATCH v2 0/3] net/virtio: Rx paths improvements Maxime Coquelin
2018-12-11 13:48 ` [dpdk-dev] [PATCH v2 1/3] net/virtio: inline refill and offload helpers Maxime Coquelin
2018-12-19  9:25   ` Jens Freimann
2018-12-19 10:26     ` Gavin Hu (Arm Technology China) [this message]
2018-12-19 10:53       ` Jens Freimann
2018-12-19 12:04         ` Maxime Coquelin
2018-12-11 13:48 ` [dpdk-dev] [PATCH v2 2/3] net/virtio: add non-mergeable support to in-order path Maxime Coquelin
2018-12-19 11:27   ` Tiwei Bie
2018-12-11 13:48 ` [dpdk-dev] [PATCH v2 3/3] net/virtio: improve batching in mergeable path Maxime Coquelin
2018-12-19  9:47   ` Jens Freimann
2018-12-19 12:08     ` Maxime Coquelin
2018-12-19 11:18   ` Tiwei Bie
2018-12-19 12:01     ` Maxime Coquelin

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=VI1PR08MB31673BDDD3035F01D87356188FBE0@VI1PR08MB3167.eurprd08.prod.outlook.com \
    --to=gavin.hu@arm.com \
    --cc=dev@dpdk.org \
    --cc=jfreimann@redhat.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=nd@arm.com \
    --cc=tiwei.bie@intel.com \
    --cc=zhihong.wang@intel.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).