DEV_TX_OFFLOAD_MULTI_SEGS;
/* enable timestamp in mbuf */
-enum pmd_dpaa2_ts dpaa2_enable_ts;
+bool dpaa2_enable_ts;
struct rte_dpaa2_xstats_name_off {
char name[RTE_ETH_XSTATS_NAME_SIZE];
static int dpaa2_dev_set_link_down(struct rte_eth_dev *dev);
static int dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
-void
-rte_pmd_dpaa2_set_timestamp(enum pmd_dpaa2_ts enable)
-{
- dpaa2_enable_ts = enable;
-}
-
static int
dpaa2_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
{
{
struct dpaa2_dev_priv *priv = dev->data->dev_private;
struct fsl_mc_io *dpni = dev->process_private;
- int ret;
+ int ret = 0;
PMD_INIT_FUNC_TRACE();
/* VLAN Filter not avaialble */
if (!priv->max_vlan_filters) {
DPAA2_PMD_INFO("VLAN filter not available");
- goto next_mask;
+ return -ENOTSUP;
}
if (dev->data->dev_conf.rxmode.offloads &
if (ret < 0)
DPAA2_PMD_INFO("Unable to set vlan filter = %d", ret);
}
-next_mask:
- if (mask & ETH_VLAN_EXTEND_MASK) {
- if (dev->data->dev_conf.rxmode.offloads &
- DEV_RX_OFFLOAD_VLAN_EXTEND)
- DPAA2_PMD_INFO("VLAN extend offload not supported");
- }
- return 0;
+ return ret;
}
static int
int rx_l4_csum_offload = false;
int tx_l3_csum_offload = false;
int tx_l4_csum_offload = false;
- int ret;
+ int ret, tc_index;
PMD_INIT_FUNC_TRACE();
}
if (eth_conf->rxmode.mq_mode == ETH_MQ_RX_RSS) {
- ret = dpaa2_setup_flow_dist(dev,
- eth_conf->rx_adv_conf.rss_conf.rss_hf);
- if (ret) {
- DPAA2_PMD_ERR("Unable to set flow distribution."
- "Check queue config");
- return ret;
+ for (tc_index = 0; tc_index < priv->num_rx_tc; tc_index++) {
+ ret = dpaa2_setup_flow_dist(dev,
+ eth_conf->rx_adv_conf.rss_conf.rss_hf,
+ tc_index);
+ if (ret) {
+ DPAA2_PMD_ERR(
+ "Unable to set flow distribution on tc%d."
+ "Check queue config", tc_index);
+ return ret;
+ }
}
}
flow_id = 0;
ret = dpni_set_queue(dpni, CMD_PRI_LOW, priv->token, DPNI_QUEUE_TX,
- tc_id, flow_id, options, &tx_flow_cfg);
+ tc_id, flow_id, options, &tx_flow_cfg);
if (ret) {
DPAA2_PMD_ERR("Error in setting the tx flow: "
- "tc_id=%d, flow=%d err=%d",
- tc_id, flow_id, ret);
+ "tc_id=%d, flow=%d err=%d",
+ tc_id, flow_id, ret);
return -1;
}
struct rte_eth_rss_conf *rss_conf)
{
struct rte_eth_dev_data *data = dev->data;
+ struct dpaa2_dev_priv *priv = data->dev_private;
struct rte_eth_conf *eth_conf = &data->dev_conf;
- int ret;
+ int ret, tc_index;
PMD_INIT_FUNC_TRACE();
if (rss_conf->rss_hf) {
- ret = dpaa2_setup_flow_dist(dev, rss_conf->rss_hf);
- if (ret) {
- DPAA2_PMD_ERR("Unable to set flow dist");
- return ret;
+ for (tc_index = 0; tc_index < priv->num_rx_tc; tc_index++) {
+ ret = dpaa2_setup_flow_dist(dev, rss_conf->rss_hf,
+ tc_index);
+ if (ret) {
+ DPAA2_PMD_ERR("Unable to set flow dist on tc%d",
+ tc_index);
+ return ret;
+ }
}
} else {
- ret = dpaa2_remove_flow_dist(dev, 0);
- if (ret) {
- DPAA2_PMD_ERR("Unable to remove flow dist");
- return ret;
+ for (tc_index = 0; tc_index < priv->num_rx_tc; tc_index++) {
+ ret = dpaa2_remove_flow_dist(dev, tc_index);
+ if (ret) {
+ DPAA2_PMD_ERR(
+ "Unable to remove flow dist on tc%d",
+ tc_index);
+ return ret;
+ }
}
}
eth_conf->rx_adv_conf.rss_conf.rss_hf = rss_conf->rss_hf;
}
priv->num_rx_tc = attr.num_rx_tcs;
+ priv->qos_entries = attr.qos_entries;
+ priv->fs_entries = attr.fs_entries;
+ priv->dist_queues = attr.num_queues;
+
/* only if the custom CG is enabled */
if (attr.options & DPNI_OPT_CUSTOM_CG)
priv->max_cgs = attr.num_cgs;