[ovs-dev] [PATCH v2] netdev-dpdk: Use default NIC configuration.
Ethan Jackson
ethan at nicira.com
Thu May 21 20:48:47 UTC 2015
Applied, thanks!
On Thu, May 21, 2015 at 9:26 AM, Kevin Traynor <kevin.traynor at intel.com> wrote:
> This patch simplifies Rx/Tx NIC configuration by removing
> custom values and using the defaults provided by the DPDK
> PMDs. This also enables Rx vectorisation which improves
> performance.
>
> v2: rebase to master
>
> Signed-off-by: Kevin Traynor <kevin.traynor at intel.com>
> Acked-by: Daniele Di Proietto <diproiettod at vmware.com>
> ---
> lib/netdev-dpdk.c | 32 ++------------------------------
> 1 files changed, 2 insertions(+), 30 deletions(-)
>
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index 124b115..02a0032 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -90,15 +90,6 @@ BUILD_ASSERT_DECL((MAX_NB_MBUF / ROUND_DOWN_POW2(MAX_NB_MBUF/MIN_NB_MBUF))
> #define NIC_PORT_RX_Q_SIZE 2048 /* Size of Physical NIC RX Queue, Max (n+32<=4096)*/
> #define NIC_PORT_TX_Q_SIZE 2048 /* Size of Physical NIC TX Queue, Max (n+32<=4096)*/
>
> -/* XXX: Needs per NIC value for these constants. */
> -#define RX_PTHRESH 32 /* Default values of RX prefetch threshold reg. */
> -#define RX_HTHRESH 32 /* Default values of RX host threshold reg. */
> -#define RX_WTHRESH 16 /* Default values of RX write-back threshold reg. */
> -
> -#define TX_PTHRESH 36 /* Default values of TX prefetch threshold reg. */
> -#define TX_HTHRESH 0 /* Default values of TX host threshold reg. */
> -#define TX_WTHRESH 0 /* Default values of TX write-back threshold reg. */
> -
> /* Character device cuse_dev_name. */
> static char *cuse_dev_name = NULL;
>
> @@ -128,25 +119,6 @@ static const struct rte_eth_conf port_conf = {
> },
> };
>
> -static const struct rte_eth_rxconf rx_conf = {
> - .rx_thresh = {
> - .pthresh = RX_PTHRESH,
> - .hthresh = RX_HTHRESH,
> - .wthresh = RX_WTHRESH,
> - },
> -};
> -
> -static const struct rte_eth_txconf tx_conf = {
> - .tx_thresh = {
> - .pthresh = TX_PTHRESH,
> - .hthresh = TX_HTHRESH,
> - .wthresh = TX_WTHRESH,
> - },
> - .tx_free_thresh = 0,
> - .tx_rs_thresh = 0,
> - .txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS|ETH_TXQ_FLAGS_NOOFFLOADS,
> -};
> -
> enum { MAX_TX_QUEUE_LEN = 384 };
> enum { DPDK_RING_SIZE = 256 };
> BUILD_ASSERT_DECL(IS_POW2(DPDK_RING_SIZE));
> @@ -449,7 +421,7 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev) OVS_REQUIRES(dpdk_mutex)
>
> for (i = 0; i < dev->up.n_txq; i++) {
> diag = rte_eth_tx_queue_setup(dev->port_id, i, NIC_PORT_TX_Q_SIZE,
> - dev->socket_id, &tx_conf);
> + dev->socket_id, NULL);
> if (diag) {
> VLOG_ERR("eth dev tx queue setup error %d",diag);
> return -diag;
> @@ -459,7 +431,7 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev) OVS_REQUIRES(dpdk_mutex)
> for (i = 0; i < dev->up.n_rxq; i++) {
> diag = rte_eth_rx_queue_setup(dev->port_id, i, NIC_PORT_RX_Q_SIZE,
> dev->socket_id,
> - &rx_conf, dev->dpdk_mp->mp);
> + NULL, dev->dpdk_mp->mp);
> if (diag) {
> VLOG_ERR("eth dev rx queue setup error %d",diag);
> return -diag;
> --
> 1.7.4.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list