From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 54BFBA052A; Wed, 27 Jan 2021 18:43:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 44C7614100F; Wed, 27 Jan 2021 18:43:33 +0100 (CET) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id 6D23E14100E for ; Wed, 27 Jan 2021 18:43:32 +0100 (CET) Received: by mail-pf1-f176.google.com with SMTP id u67so1669089pfb.3 for ; Wed, 27 Jan 2021 09:43:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=oejo1Qv8akMZRMtwEIvdnehWeHm6Ru4p5OBxymwTz9I=; b=pyJ001wsIqf/mq+rK9auLRYMRn7Pkt6rCSiVZri9TNp8PIl/nH7JlWLpjvZfEoPS1d sAD7pBH+0qnyklu4kGLG6wiWGgj1xYtwmiF2h8kCZ1bQWI1mTM6zM1bqGXnPzsEPXXIh sNUQH7RrOzLnArU7xxiNq6EC7gxM1MEIV4pgqO+RHGJtkUCdZTbJXomqBMYgDo1eWdF3 JsVqtn9STDl3DNvxP3f5aXBI+XKK2ILVsrX6SBzKyqq+pGVH7sOjy37g/58KcyO+DW9I 1UdG2vziexr3QKTfychDXwPldBNPBKDaS4vw1+I3MidUGmGjHAU7Yaze3qlewITt4Nex dDWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=oejo1Qv8akMZRMtwEIvdnehWeHm6Ru4p5OBxymwTz9I=; b=iGkdFw9+J8kmE0E7moxm7KW4p1lrZkidOcI3wuHfqOgpyifNxRSJGfvHgTbcTQUPhH A+M+vqxOJfI9gmE5iMZ8RyvUX9Km0+56ZSrghvyyNeRHBoGqH3FZFZvOyQ11SDYz5/yh GApD+Q8pyuiJTv0bjEry9o2t0WG9AS+KALbvRkoWJIw8tUv7G3SNjLUSmKWEHSSVRlhd dcGavRxrygEOg8VksMdUY9vW9NCHh2mUNVneW70tkg9gt345wEurMvLKceL0xxt/YZGD 6d77wE7nkES/F7r2/17wgM7lnIHjlHYr0yxTP75v8DtWhQjkdxcBlS3QyYelQBcfAfZO M9pg== X-Gm-Message-State: AOAM530xMK8OuYFxEPEpgDQx+0Luy8MaeO4cnf3mo7yoQRveSANF285y m36/co4k5niNNyNaXfnbBV9XQGuWCf8Z7w== X-Google-Smtp-Source: ABdhPJynk1iaqxZ1G6xOSsf/eVn2g/f0lzBfUEDh3BxLjZ9szxS88353ryHYav39bGazn8IRKdzAyw== X-Received: by 2002:aa7:9585:0:b029:1c5:10ce:ba7f with SMTP id z5-20020aa795850000b02901c510ceba7fmr8191088pfj.79.1611769411592; Wed, 27 Jan 2021 09:43:31 -0800 (PST) Received: from ?IPv6:2600:1700:6b0:fde0:8db4:403d:f1a5:aac2? ([2600:1700:6b0:fde0:8db4:403d:f1a5:aac2]) by smtp.gmail.com with ESMTPSA id m1sm2725306pjz.16.2021.01.27.09.43.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jan 2021 09:43:31 -0800 (PST) From: Andrew Boyer Message-Id: Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Date: Wed, 27 Jan 2021 12:43:29 -0500 In-Reply-To: <1652797a-8caf-2e7c-ec25-00d4c132d603@intel.com> Cc: dev , Alfredo Cardigliano , Neel Patel To: Ferruh Yigit References: <20210118203508.1332-1-aboyer@pensando.io> <20210118203508.1332-8-aboyer@pensando.io> <1652797a-8caf-2e7c-ec25-00d4c132d603@intel.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH 07/13] net/ionic: inline queue flush function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Jan 27, 2021, at 12:36 PM, Ferruh Yigit = wrote: >=20 > On 1/18/2021 8:35 PM, Andrew Boyer wrote: >> This is hot-path function. >> Signed-off-by: Andrew Boyer >> Signed-off-by: Neel Patel >> --- >> drivers/net/ionic/ionic_dev.c | 6 ------ >> drivers/net/ionic/ionic_dev.h | 9 ++++++++- >> drivers/net/ionic/ionic_osdep.h | 1 - >> 3 files changed, 8 insertions(+), 8 deletions(-) >> diff --git a/drivers/net/ionic/ionic_dev.c = b/drivers/net/ionic/ionic_dev.c >> index eef015686f..fcb3df482a 100644 >> --- a/drivers/net/ionic/ionic_dev.c >> +++ b/drivers/net/ionic/ionic_dev.c >> @@ -459,12 +459,6 @@ ionic_q_sg_map(struct ionic_queue *q, void = *base, rte_iova_t base_pa) >> q->sg_base_pa =3D base_pa; >> } >> -void >> -ionic_q_flush(struct ionic_queue *q) >> -{ >> - writeq(IONIC_DBELL_QID(q->hw_index) | q->head_idx, q->db); >> -} >> - >> void >> ionic_q_post(struct ionic_queue *q, bool ring_doorbell, desc_cb cb, >> void *cb_arg) >> diff --git a/drivers/net/ionic/ionic_dev.h = b/drivers/net/ionic/ionic_dev.h >> index ea89218662..55a56434fd 100644 >> --- a/drivers/net/ionic/ionic_dev.h >> +++ b/drivers/net/ionic/ionic_dev.h >> @@ -254,7 +254,6 @@ int ionic_q_init(struct ionic_lif *lif, struct = ionic_dev *idev, >> size_t desc_size, size_t sg_desc_size); >> void ionic_q_map(struct ionic_queue *q, void *base, rte_iova_t = base_pa); >> void ionic_q_sg_map(struct ionic_queue *q, void *base, rte_iova_t = base_pa); >> -void ionic_q_flush(struct ionic_queue *q); >> void ionic_q_post(struct ionic_queue *q, bool ring_doorbell, desc_cb = cb, >> void *cb_arg); >> uint32_t ionic_q_space_avail(struct ionic_queue *q); >> @@ -262,6 +261,14 @@ bool ionic_q_has_space(struct ionic_queue *q, = uint32_t want); >> void ionic_q_service(struct ionic_queue *q, uint32_t cq_desc_index, >> uint32_t stop_index, void *service_cb_arg); >> +static inline void >> +ionic_q_flush(struct ionic_queue *q) >> +{ >> + uint64_t val =3D IONIC_DBELL_QID(q->hw_index) | q->head_idx; >> + >> + rte_write64(val, q->db); >> +} >> + >=20 > Please be aware of '__rte_always_inline' attribute if you want to = force it, since 'inline' keyword is only a suggestion to the compilers. >=20 Is it though? We are using __rte_always_inline in the hot-path .c file, = but I would have said that in a header file the compiler wouldn=E2=80=99t = have a choice. Happy to be corrected. Thanks, Andrew >> int ionic_adminq_post(struct ionic_lif *lif, struct ionic_admin_ctx = *ctx); >> #endif /* _IONIC_DEV_H_ */ >> diff --git a/drivers/net/ionic/ionic_osdep.h = b/drivers/net/ionic/ionic_osdep.h >> index 157b0ca516..d46687b32f 100644 >> --- a/drivers/net/ionic/ionic_osdep.h >> +++ b/drivers/net/ionic/ionic_osdep.h >> @@ -45,6 +45,5 @@ typedef uint64_t __le64; >> #define ioread32(reg) rte_read32(reg) >> #define iowrite8(value, reg) rte_write8(value, reg) >> #define iowrite32(value, reg) rte_write32(value, reg) >> -#define writeq(value, reg) rte_write64(value, reg) >> #endif