From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 0D89BA00E6 for ; Fri, 17 May 2019 15:01:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E7F595F20; Fri, 17 May 2019 15:01:08 +0200 (CEST) Received: from mail-vs1-f67.google.com (mail-vs1-f67.google.com [209.85.217.67]) by dpdk.org (Postfix) with ESMTP id 7277F58EC for ; Fri, 17 May 2019 15:01:07 +0200 (CEST) Received: by mail-vs1-f67.google.com with SMTP id j184so4542904vsd.11 for ; Fri, 17 May 2019 06:01:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gipR/FVEVBZC6HQmWrLY6CM5qWzX/FfUmJoyFPuVM0g=; b=kiRivoC1M9FRIfJVWMRPzGi87YIY8ORy/nQzXjG4TRN9BlJdt5jXxzgvXF/Fy43cvM QCw3QQo9iskREb6S25jTQjs6pi41Yr6kLyWPk4fbwcdyEltHHTwzmQI1NwJmkXU+OiVf WBYCuUqKk9qcyRm86Z13+DEknBRs1ExdVIvq6Z/gQKgOVdHXJgm6sm+L1+3QijYPXxmG k5iw8OBHlr2c6MYWHsN+hPSESlPAjpciRlk80NbX6s0toubmPuBAoegJrTvwTdq0Y9JD BTSS81xxunl0cDtbLIoX9hQkuACRTSvPNs3XxAm3QC256FP2+8uCA6RzuHHjmKRqaLmj Ys7w== X-Gm-Message-State: APjAAAVrQciFXUmlb9VGog+QSQja1srWDCtsUr4LRIliBGGM0/bTGu37 KnmPcOnWVi8G8Q+WFQ4n7cjdRRSLbQzyxS4aP2/8hA== X-Google-Smtp-Source: APXvYqyNMLM3j0BLNy6CBKa9tjFTJfqdrWJ/bQz01aRxKYdJsgZ/1GiCAPsWGDfkOBXcjQPIH0DrO3KvbKdEGH9rvWA= X-Received: by 2002:a67:d615:: with SMTP id n21mr12264241vsj.39.1558098066697; Fri, 17 May 2019 06:01:06 -0700 (PDT) MIME-Version: 1.0 References: <20190517122220.31283-1-maxime.coquelin@redhat.com> <20190517122220.31283-3-maxime.coquelin@redhat.com> In-Reply-To: <20190517122220.31283-3-maxime.coquelin@redhat.com> From: David Marchand Date: Fri, 17 May 2019 15:00:55 +0200 Message-ID: To: Maxime Coquelin Cc: dev , Tiwei Bie , Jens Freimann , Zhihong Wang , Bruce Richardson , "Ananyev, Konstantin" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 2/5] vhost: do not inline packed and split functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, May 17, 2019 at 2:23 PM Maxime Coquelin wrote: > At runtime either packed Tx/Rx functions will always be called, > or split Tx/Rx functions will always be called. > > This patch removes the forced inlining in order to reduce > the I-cache pressure. > I just wonder if the compiler can't decide on its own to inline those static functions. We have __rte_noinline for this. > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/virtio_net.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c > index a6a33a1013..35ae4992c2 100644 > --- a/lib/librte_vhost/virtio_net.c > +++ b/lib/librte_vhost/virtio_net.c > @@ -771,7 +771,7 @@ copy_mbuf_to_desc(struct virtio_net *dev, struct > vhost_virtqueue *vq, > return error; > } > > -static __rte_always_inline uint32_t > +static uint32_t > virtio_dev_rx_split(struct virtio_net *dev, struct vhost_virtqueue *vq, > struct rte_mbuf **pkts, uint32_t count) > { > @@ -830,7 +830,7 @@ virtio_dev_rx_split(struct virtio_net *dev, struct > vhost_virtqueue *vq, > return pkt_idx; > } > > -static __rte_always_inline uint32_t > +static uint32_t > virtio_dev_rx_packed(struct virtio_net *dev, struct vhost_virtqueue *vq, > struct rte_mbuf **pkts, uint32_t count) > { > @@ -1300,7 +1300,7 @@ get_zmbuf(struct vhost_virtqueue *vq) > return NULL; > } > > -static __rte_always_inline uint16_t > +static uint16_t > virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq, > struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t > count) > { > @@ -1422,7 +1422,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct > vhost_virtqueue *vq, > return i; > } > > -static __rte_always_inline uint16_t > +static uint16_t > virtio_dev_tx_packed(struct virtio_net *dev, struct vhost_virtqueue *vq, > struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t > count) > { > -- > 2.21.0 > > -- David Marchand