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 8EB95A00C3; Fri, 13 May 2022 17:37:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 31E8340DF7; Fri, 13 May 2022 17:37:06 +0200 (CEST) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id E5A9E40DDE for ; Fri, 13 May 2022 17:37:04 +0200 (CEST) Received: by mail-pf1-f178.google.com with SMTP id y41so7970349pfw.12 for ; Fri, 13 May 2022 08:37:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P2guF9KSUDe/ESPc84aA8XkOgq2fmvTEH1y5e0cSO3E=; b=SwclUWietwr17bhu1m/O3iSarZXI51rQlDd2XZdhIxbTXiFU3zjul7oRXKVhHTRZ38 JUXZRIbDncrhDvnELBAAvjck7Rty4/V1Ya/vqaiUynFU61l8MAEFE4DuDcz5JnTLFxU6 n9U0f44Lu/P7kiLuGX9eCFKKot55UM0vQwoX/kXUf3c+CVqzwGbxPSl6iamYkRj3ixfG jiaNGMuzf9WsuQ4aSjsvsTlgXx3Y3ggao6BLyHfUGYG3TgdWmkrQ6hHOtCZV78Mz9CKV SxMvxMhHralpf+hsipmB+jWl+ywfACOFI6ewBY9F/yMlMWZE65p3cBerrRMizjDnBRwK Es0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P2guF9KSUDe/ESPc84aA8XkOgq2fmvTEH1y5e0cSO3E=; b=Xwxpdq8CQxIgzWKRO7e006AgwR3PxcUKQ28I6TaQQH5bq1BOYyDg3c2K/pZE5QWA6d COB87UnoSTIeaauGa0s/Lpn/EGfm9amlVjSyFDyw39UlsU6bS/QfwU9TTCP6G2SJ1IXi Gwx/KY4NAOmDlBkgM4+Mst0F41BS5IIyeMRrVmlPKpdJ5Up6Pe3/MVQ/qFCwYnzrpatE Cx+88czJkowECzhKq8W1L9MoTLWWddxSNnHa2PBlvFLpP3xOct+wku1Tau41UJRAe+NO PBRzDbH0oBfJH0b98r38UogupjHhcJVubfh/zB0mMhiYIeGWZl1DIbDJEfOLx6LH2/LD 76cA== X-Gm-Message-State: AOAM531LPALp3+mf3unSKLoAWzHL/IJbFXCvYZscBXsjR3qFgKKbh9H1 mUB8QA9QVCwk+xXbyFDG1/P88g== X-Google-Smtp-Source: ABdhPJyBrFwxjyEAFxYOLqsuIRhGl4MBEUJ+0eZ1bmb5oNw/pz+CyxIYcAU88h9MGWWPj0WqIecc/w== X-Received: by 2002:a05:6a00:21c8:b0:4fd:f89f:ec0e with SMTP id t8-20020a056a0021c800b004fdf89fec0emr5287528pfj.83.1652456223960; Fri, 13 May 2022 08:37:03 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id g196-20020a6252cd000000b0050dc76281fcsm1901803pfb.214.2022.05.13.08.37.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 08:37:03 -0700 (PDT) Date: Fri, 13 May 2022 08:37:00 -0700 From: Stephen Hemminger To: Heinrich Schuchardt Cc: Stanislaw Kardach , Thomas Monjalon , Michal Mazurek , dev@dpdk.org, Frank Zhao , Sam Grove , mw@semihalf.com, upstream@semihalf.com Subject: Re: [PATCH v3 1/8] eal: add initial support for RISC-V architecture Message-ID: <20220513083700.2b073882@hermes.local> In-Reply-To: <7bc97240-10c7-c437-9f31-b97dc2b418c6@canonical.com> References: <20220510150759.525434-1-kda@semihalf.com> <20220510154849.530872-1-kda@semihalf.com> <20220510154849.530872-2-kda@semihalf.com> <7bc97240-10c7-c437-9f31-b97dc2b418c6@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Fri, 13 May 2022 08:50:34 +0200 Heinrich Schuchardt wrote: > On 5/10/22 17:48, Stanislaw Kardach wrote: > > From: Michal Mazurek > > > > Add all necessary elements for DPDK to compile and run EAL on SiFive > > Freedom U740 SoC which is based on SiFive U74-MC (ISA: rv64imafdc) > > core complex. > > > > This includes: > > > > - EAL library implementation for rv64imafdc ISA. > > - meson build structure for 'riscv' architecture. RTE_ARCH_RISCV define > > is added for architecture identification. > > - xmm_t structure operation stubs as there is no vector support in the > > U74 core. > > > > Compilation was tested on Ubuntu and Arch Linux using riscv64 toolchain. > > Clang compilation currently not supported due to issues with missing > > relocation relaxation. > > > > Two rte_rdtsc() schemes are provided: stable low-resolution using rdtime > > (default) and unstable high-resolution using rdcycle. User can override > > the scheme by defining RTE_RISCV_RDTSC_USE_HPM=1 during compile time of > > both DPDK and the application. The reasoning for this is as follows. > > The RISC-V ISA mandates that clock read by rdtime has to be of constant > > period and synchronized between all hardware threads within 1 tick > > (chapter 10.1 in version 20191213 of RISC-V spec). > > However this clock may not be of high-enough frequency for dataplane > > uses. I.e. on HiFive Unmatched (FU740) it is 1MHz. > > There is a high-resolution alternative in form of rdcycle which is > > clocked at the core clock frequency. The drawbacks are that it may be > > disabled during sleep (WFI) and its frequency might change due to DVFS. Choosing at compile time is ok for embedded but is undesireable for DPDK in a distribution. It sounds like the low-res is equivalent to hpet and the unstable is same as x86 TSC. Therefore why not follow that precedent and do the same thing?