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 4A0F7A0548; Tue, 17 Aug 2021 09:46:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA84D40DF5; Tue, 17 Aug 2021 09:46:05 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 970894014E for ; Tue, 17 Aug 2021 09:46:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629186363; 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=/mlLXhhwZbUK3zQ1x9tjXBL6sVYvGAvc+uM1FySS4JA=; b=Li7zXRZw0Y2FkzQAvkTaJA42QQu+Qi83AG9n6veL2pzLsnt9r2QCPKuyXWJ7LeZThenMEr pgsnedN0in1BOyNo2uoUGp4wHHYcMubj5IqRz3qdp/BwCslIVwnTmKBgFCl3MN1JXpRUKI p6AmX0SlCcf6AFXsEdTBSrCK7Qk517M= 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-297-dRuKmRwvN4uQPtISTTGzhA-1; Tue, 17 Aug 2021 03:46:02 -0400 X-MC-Unique: dRuKmRwvN4uQPtISTTGzhA-1 Received: by mail-vs1-f72.google.com with SMTP id i186-20020a6722c30000b02902bc73413510so3296928vsi.10 for ; Tue, 17 Aug 2021 00:46:02 -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=/mlLXhhwZbUK3zQ1x9tjXBL6sVYvGAvc+uM1FySS4JA=; b=sQjkR08Q2khV1VRjr8F3oSddbKhbj8zHGUYaIStazqvYUrrEWoZF9fqG+5bsQow7Jz B9KItHatAhsAIMyT9loglKHwsg5VEHmw1KBoUG9/zU1/j/TbsSfqSipHEEE3UsCJMkgg RlaFSHIUEpvRsKRQ5xSxQ9QIwq66gcv85JZKZxaXagYlE4J3Y2avWIILWqo3mEitEcBN n9ETT+K3/FYv3z3KyuRxmw0a2dOOS/mm49DzzwVw/mUS+G9RVGaM/3R1MTTp0CycjHaX Af0WiR8olaipAhf9W+pzErXhtoE7Crhqcvau0lcDzTAW/iUF0iix6RGU2wT3EvgWRHIU ViIw== X-Gm-Message-State: AOAM533AviC1GhJ6A4PHZwgcW+tHvTPGK0CUx597V2u6i90GSzYhIBGu QARp/8vCLMPjw7GKUIa0glstzfQQfA2SAyTV+AHN8ebWqKG6ntmIcFhCoebErBvec2vuAy+LTtZ AzdJbisCh/TokrxS2LwQ= X-Received: by 2002:a67:ec98:: with SMTP id h24mr1569928vsp.10.1629186362140; Tue, 17 Aug 2021 00:46:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2LRMQywGQ6p9nIsiOAGN0PGXiKG460w14y1MzYp0Rx4rXoyaUpSHv/ZKccMHR8YTGTaNNxSrCYb3F2jjdwJg= X-Received: by 2002:a67:ec98:: with SMTP id h24mr1569912vsp.10.1629186361896; Tue, 17 Aug 2021 00:46:01 -0700 (PDT) MIME-Version: 1.0 References: <20210815145614.3826-1-u9012063@gmail.com> <20210815224954.0bfa9266@sovereign> In-Reply-To: <20210815224954.0bfa9266@sovereign> From: David Marchand Date: Tue, 17 Aug 2021 09:45:50 +0200 Message-ID: To: Dmitry Kozlyuk Cc: William Tu , dev , Ranjit Menon 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 RFC] net/virtio: Add virtio support for Windows. 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 Sun, Aug 15, 2021 at 9:50 PM Dmitry Kozlyuk wrote: > > diff --git a/drivers/net/virtio/virtio_pci_ethdev.c b/drivers/net/virtio/virtio_pci_ethdev.c > > index 4083853c48..03e9dfab71 100644 > > --- a/drivers/net/virtio/virtio_pci_ethdev.c > > +++ b/drivers/net/virtio/virtio_pci_ethdev.c > > @@ -220,7 +220,9 @@ static struct rte_pci_driver rte_virtio_net_pci_pmd = { > > > > RTE_INIT(rte_virtio_net_pci_pmd_init) > > { > > +#if !(defined(_WIN32) || defined(_WIN64)) > > rte_eal_iopl_init(); > > +#endif > > I think rte_eal_iopl_init() should not be called from this PMD at all, > because it is allready called by PCI bus driver before probing. This call to iopl() must be kept in a pmd constructor (at least on Linux) so that, for example, the interrupt thread inherits the IO priviledge level. > > Also, DPDK code should use #ifdef RTE_EXEC_ENV_WINDOWS, etc. to test > if it is building for a specific execution environment. > > > rte_pci_register(&rte_virtio_net_pci_pmd); > > } > > -- David Marchand