DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Huawei Xie <huawei.xie@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [RFC PATCH] virtio: virtio ring layout optimization and vectorization rx
Date: Tue, 22 Sep 2015 10:37:18 +0200	[thread overview]
Message-ID: <4527609.XBoLQSHpyv@xps13> (raw)
In-Reply-To: <1442506651-16279-1-git-send-email-huawei.xie@intel.com>

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.

  reply	other threads:[~2015-09-22  8:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 16:17 Huawei Xie
2015-09-22  8:37 ` Thomas Monjalon [this message]
2015-09-22  9:29   ` Xie, Huawei
2015-09-22 13:37     ` Thomas Monjalon
2015-09-22 22:55       ` Stephen Hemminger
2015-09-24 18:03 ` [dpdk-dev] [RFC PATCH v2] virtio ring layout optimization and vectorization Huawei Xie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4527609.XBoLQSHpyv@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).