+static void
+rxtx_port_config(struct rte_port *port)
+{
+ port->rx_conf = port->dev_info.default_rxconf;
+ port->tx_conf = port->dev_info.default_txconf;
+
+ /* Check if any RX/TX parameters have been passed */
+ if (rx_pthresh != RTE_PMD_PARAM_UNSET)
+ port->rx_conf.rx_thresh.pthresh = rx_pthresh;
+
+ if (rx_hthresh != RTE_PMD_PARAM_UNSET)
+ port->rx_conf.rx_thresh.hthresh = rx_hthresh;
+
+ if (rx_wthresh != RTE_PMD_PARAM_UNSET)
+ port->rx_conf.rx_thresh.wthresh = rx_wthresh;
+
+ if (rx_free_thresh != RTE_PMD_PARAM_UNSET)
+ port->rx_conf.rx_free_thresh = rx_free_thresh;
+
+ if (rx_drop_en != RTE_PMD_PARAM_UNSET)
+ port->rx_conf.rx_drop_en = rx_drop_en;
+
+ if (tx_pthresh != RTE_PMD_PARAM_UNSET)
+ port->tx_conf.tx_thresh.pthresh = tx_pthresh;
+
+ if (tx_hthresh != RTE_PMD_PARAM_UNSET)
+ port->tx_conf.tx_thresh.hthresh = tx_hthresh;
+
+ if (tx_wthresh != RTE_PMD_PARAM_UNSET)
+ port->tx_conf.tx_thresh.wthresh = tx_wthresh;
+
+ if (tx_rs_thresh != RTE_PMD_PARAM_UNSET)
+ port->tx_conf.tx_rs_thresh = tx_rs_thresh;
+
+ if (tx_free_thresh != RTE_PMD_PARAM_UNSET)
+ port->tx_conf.tx_free_thresh = tx_free_thresh;
+
+ if (txq_flags != RTE_PMD_PARAM_UNSET)
+ port->tx_conf.txq_flags = txq_flags;
+}
+