From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E52BAA04DC; Sat, 31 Oct 2020 22:54:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3B776593A; Sat, 31 Oct 2020 22:54:22 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 9A2E6592C for ; Sat, 31 Oct 2020 22:54:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604181258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t9eRj/znCdwQ+dpue8greB5EFXt4cBkhi1AfIfDgqUA=; b=OE92m5XLg1NKBXDcI8cKVGX4MEsN1GxAARDywyp+iNt7Idv2oMiuP+CG7ZpKyLp8Pb8SSa QYKB1GWm///BvvKyRlDi8n5L9Im2+T3pVCczrO4yunVjhOYRNUPSIzu4AzgdgE/V0dtsOX c0nLl9duFb/g3rR2zRVXNotxUeMk4Fg= Received: from mail-vs1-f72.google.com (mail-vs1-f72.google.com [209.85.217.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-280-DyC9f6QmOC6lqro_Z8pO2g-1; Sat, 31 Oct 2020 17:54:16 -0400 X-MC-Unique: DyC9f6QmOC6lqro_Z8pO2g-1 Received: by mail-vs1-f72.google.com with SMTP id j13so3126573vsn.20 for ; Sat, 31 Oct 2020 14:54:16 -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=t9eRj/znCdwQ+dpue8greB5EFXt4cBkhi1AfIfDgqUA=; b=VmdpT3tuB714x0VnCsVQ/5nBd75SBesk1N2+BnNS0YsZaIVwkCeevoiP+lhBOvHcw9 DJlK7r+MIvxogR+glVjzuH8nuvQBdBEWh+9QfXhEIv9UFJYik+7utLel9yVNVtnWsv1x gX2pNJTa3YPNTjmKeleh/YOuKXecD+GRvuXcPrI9v9oksg9oE8gMACNwguGygHXQxqbx IGGFJzb9TKw76NgTrDdkBzwjPWGF8BzQyJQgzMj2YnkDk98e53MJ8dVYkcOTPpuNLDv3 +DmZ3EODbQuKvoQpyuYIHd60TgeV5WvOQYRKixIBKo8DY0ZmHJHVXrKxFNb91FpA1QMI mM0w== X-Gm-Message-State: AOAM533G8eQpP+uXyEv2pGWL4TEQ17Ef3MdrBaAOY+MFdfGYUe1Aoqg6 wC6t1MqwabIwhWWAum2EFXFyATQj5bGFRAPx9k862Xs9T0ebE2c/9HBhVMupSC1MNw4ZY3Kc9kt qZgGUUVu+0XOEOf+/HpQ= X-Received: by 2002:ab0:4983:: with SMTP id e3mr5033703uad.41.1604181255881; Sat, 31 Oct 2020 14:54:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXiRNR/vdiiytKzHDKwSTaoGLK62jr0/3dBpsspjLRa+yO+xntNCtqgsc0D0Qf0T3z944ddiyzdAlNJyVqfC0= X-Received: by 2002:ab0:4983:: with SMTP id e3mr5033696uad.41.1604181255694; Sat, 31 Oct 2020 14:54:15 -0700 (PDT) MIME-Version: 1.0 References: <20200612212434.6852-2-timothy.mcdaniel@intel.com> <1604168282-30079-1-git-send-email-timothy.mcdaniel@intel.com> <1604168282-30079-6-git-send-email-timothy.mcdaniel@intel.com> In-Reply-To: <1604168282-30079-6-git-send-email-timothy.mcdaniel@intel.com> From: David Marchand Date: Sat, 31 Oct 2020 22:54:04 +0100 Message-ID: To: Timothy McDaniel Cc: dev , Erik Gabriel Carrillo , Gage Eads , Van Haaren Harry , Jerin Jacob Kollanukkaran , Thomas Monjalon Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v14 05/23] event/dlb: add inline 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 Sat, Oct 31, 2020 at 7:17 PM Timothy McDaniel wrote: > > Add miscellaneous inline functions that may be called > from multiple files. These functions include inline > assembly of new x86 instructions, such as movdir64b, > since they are not available as builtin functions in > the minimum supported GCC version. > > Signed-off-by: Timothy McDaniel > Reviewed-by: Gage Eads > --- > drivers/event/dlb/dlb_inline_fns.h | 40 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > create mode 100644 drivers/event/dlb/dlb_inline_fns.h > > diff --git a/drivers/event/dlb/dlb_inline_fns.h b/drivers/event/dlb/dlb_inline_fns.h > new file mode 100644 > index 0000000..1ecddb7 > --- /dev/null > +++ b/drivers/event/dlb/dlb_inline_fns.h > @@ -0,0 +1,40 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2016-2020 Intel Corporation > + */ > + Missing banners, like in dlb2 header (caught by diffing with it). #ifndef __DLB_INLINE_FNS_H__ etc... > +#include "rte_memcpy.h" > +#include "rte_io.h" > + > +/* Inline functions required in more than one source file. */ > + > +static inline struct dlb_eventdev * > +dlb_pmd_priv(const struct rte_eventdev *eventdev) > +{ > + return eventdev->data->dev_private; > +} > + > +static inline void > +dlb_movntdq_single(void *dest, void *src) > +{ > + long long *_src = (long long *)src; > + __m128i src_data0 = (__m128i){_src[0], _src[1]}; > + > + _mm_stream_si128(dest, src_data0); > +} > + > +static inline void > +dlb_cldemote(void *addr) > +{ > + /* Load addr into RSI, then demote the cache line of the address > + * contained in that register. > + */ > + asm volatile(".byte 0x0f, 0x1c, 0x06" :: "S" (addr)); > +} Use EAL API. > + > +static inline void > +dlb_movdir64b(void *dest, void *src) > +{ > + asm volatile(".byte 0x66, 0x0f, 0x38, 0xf8, 0x02" > + : > + : "a" (dest), "d" (src)); > +} NO! We introduced stuff in EAL for this, please double check. -- David Marchand