Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E68DC54E4A for ; Tue, 12 May 2020 13:18:57 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 15C78206DD for ; Tue, 12 May 2020 13:18:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15C78206DD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4A4D61BF7A; Tue, 12 May 2020 15:18:56 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id CF57D1BF3C for ; Tue, 12 May 2020 15:18:54 +0200 (CEST) IronPort-SDR: 8Br+JtXD3F98wQ27UMhjWDcuylNR4YN8gQk74n4FNfD+sPLxCYZ0nryD1OzuRvT0Qqy20SCmpF Wcj3jpWvMjeA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2020 06:18:53 -0700 IronPort-SDR: jH2E955AtqePyjZbfMYfhzFr+OXvKckE65K4jq4+AbJG6MOdThIIe9zaItG8/2B/kA8XV4ntcs k8VimbevpCMw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,383,1583222400"; d="scan'208";a="286647748" Received: from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.56]) by fmsmga004.fm.intel.com with ESMTP; 12 May 2020 06:18:51 -0700 From: Marvin Liu To: maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com, ferruh.yigit@intel.com Cc: dev@dpdk.org, Marvin Liu Date: Tue, 12 May 2020 21:18:06 +0800 Message-Id: <20200512131806.33087-1-yong.liu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/virtio: remove duplicated runtime check 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" Runtime checks for vectorized datapath are organized into device configuration function. Remove duplicated check in device init function. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 49ccef12c7..312871cb48 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1965,10 +1965,8 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev) PMD_DRV_LOG(INFO, "building environment do not support packed ring vectorized"); #else - if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F)) { - hw->use_vec_rx = 1; - hw->use_vec_tx = 1; - } + hw->use_vec_rx = 1; + hw->use_vec_tx = 1; #endif } } -- 2.17.1