- /*checksum errors, send them to normal path and set it in annotation */
- err_cfg.errors = DPNI_ERROR_L3CE | DPNI_ERROR_L4CE;
- err_cfg.errors |= DPNI_ERROR_PHE;
+ if (dpaa2_enable_err_queue) {
+ ret = dpni_get_queue(dpni, CMD_PRI_LOW, priv->token,
+ DPNI_QUEUE_RX_ERR, 0, 0, &cfg, &qid);
+ if (ret) {
+ DPAA2_PMD_ERR("Error getting rx err flow information: err=%d",
+ ret);
+ return ret;
+ }
+ dpaa2_q = (struct dpaa2_queue *)priv->rx_err_vq;
+ dpaa2_q->fqid = qid.fqid;
+ dpaa2_q->eth_data = dev->data;
+
+ err_cfg.errors = DPNI_ERROR_DISC;
+ err_cfg.error_action = DPNI_ERROR_ACTION_SEND_TO_ERROR_QUEUE;
+ } else {
+ /* checksum errors, send them to normal path
+ * and set it in annotation
+ */
+ err_cfg.errors = DPNI_ERROR_L3CE | DPNI_ERROR_L4CE;
+
+ /* if packet with parse error are not to be dropped */
+ err_cfg.errors |= DPNI_ERROR_PHE;