From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by dpdk.org (Postfix) with ESMTP id D03909E5 for ; Tue, 22 Sep 2015 10:38:24 +0200 (CEST) Received: by wicfx3 with SMTP id fx3so12555492wic.0 for ; Tue, 22 Sep 2015 01:38:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=55fQjH9RqdtIq47fsqjTOqPBTAvgOlj9TFRF8VvPLKk=; b=dsbNEOCzTG+LIhGwdXRQpwIa92Msb4sg2lllU4EVeSjM4MoO7fJXeYImpSxqBYuDIG Rc8BnNdj58aPgWC19y9dKCiRQXeWmuzsxKIjF8n4pbZfTZ7k4xa0q+Vz1SoLDUMU/Uv5 a0geSl9TQSdJS6XbxGcTUo+4NycjXoEhwb3vl2sGdeXXGb6SajOkzX/FRM82aeZOOkjw l8VEgfDubEPNRV5Za0wJygt+tNkNb1A+223W/E2noaXAOZP62UD8aSJ915uLx7Lwf9gV Oz2e1reWF5OfXPZ13txbaOmVd+zGZGBggxKcThCTMzWQUsZufVqvWPIHi4XAY4oJ6jC1 FUSA== X-Gm-Message-State: ALoCoQlgcZxsPai69/8v47597WHbuWipJCxp80Xr2hULtEKxITBwBztMV6+6OWRwhzvkshO5bWK8 X-Received: by 10.180.82.7 with SMTP id e7mr18601491wiy.19.1442911104671; Tue, 22 Sep 2015 01:38:24 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id p1sm1872381wif.7.2015.09.22.01.38.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2015 01:38:23 -0700 (PDT) From: Thomas Monjalon To: Huawei Xie Date: Tue, 22 Sep 2015 10:37:18 +0200 Message-ID: <4527609.XBoLQSHpyv@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1442506651-16279-1-git-send-email-huawei.xie@intel.com> References: <1442506651-16279-1-git-send-email-huawei.xie@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [RFC PATCH] virtio: virtio ring layout optimization and vectorization rx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2015 08:38:25 -0000 2015-09-18 00:17, Huawei Xie: > --- a/config/common_linuxapp > +++ b/config/common_linuxapp > @@ -241,6 +241,7 @@ CONFIG_RTE_LIBRTE_ENIC_DEBUG=n > # Compile burst-oriented VIRTIO PMD driver > # > CONFIG_RTE_LIBRTE_VIRTIO_PMD=y > +CONFIG_RTE_VIRTIO_SIMPLE=y > CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=n > CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_RX=n > CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_TX=n -1 > @@ -1150,6 +1158,14 @@ rx_func_get(struct rte_eth_dev *eth_dev) > eth_dev->rx_pkt_burst = &virtio_recv_mergeable_pkts; > else > eth_dev->rx_pkt_burst = &virtio_recv_pkts; > + > +#ifdef RTE_VIRTIO_SIMPLE > + if (!vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) { > + printf("use simple rxtx\n"); > + eth_dev->rx_pkt_burst = &virtio_recv_pkts_simple; > + eth_dev->tx_pkt_burst = &virtio_xmit_pkts_simple; > + } > +#endif I thought it was clear we must avoid #ifdef for configuration. Please check how to add a runtime flag. Or better: keep only one path which works everywhere and well optimized.