{
struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
+ struct ecore_ntuple_filter_params params;
char mz_name[RTE_MEMZONE_NAMESIZE] = {0};
struct qede_arfs_entry *tmp = NULL;
const struct rte_memzone *mz;
ecore_arfs_mode_configure(p_hwfn, p_hwfn->p_arfs_ptt,
&qdev->arfs_info.arfs);
}
+
+ memset(¶ms, 0, sizeof(params));
+ params.addr = (dma_addr_t)mz->iova;
+ params.length = pkt_len;
+ params.qid = arfs->rx_queue;
+ params.vport_id = 0;
+ params.b_is_add = add;
+ params.b_is_drop = arfs->is_drop;
+
/* configure filter with ECORE_SPQ_MODE_EBLOCK */
rc = ecore_configure_rfs_ntuple_filter(p_hwfn, NULL,
- (dma_addr_t)mz->iova,
- pkt_len,
- arfs->rx_queue,
- 0, add);
+ ¶ms);
if (rc == ECORE_SUCCESS) {
if (add) {
arfs->pkt_len = pkt_len;
return -EINVAL;
}
- if (fdir->action.rx_queue >= QEDE_RSS_COUNT(qdev)) {
+ if (fdir->action.rx_queue >= QEDE_RSS_COUNT(eth_dev)) {
DP_ERR(edev, "invalid queue number %u\n",
fdir->action.rx_queue);
return -EINVAL;
struct rte_flow_error *error,
struct rte_flow *flow)
{
- struct qede_dev *qdev = QEDE_INIT_QDEV(dev);
const struct rte_flow_action_queue *queue;
if (actions == NULL) {
case RTE_FLOW_ACTION_TYPE_QUEUE:
queue = actions->conf;
- if (queue->index >= QEDE_RSS_COUNT(qdev)) {
+ if (queue->index >= QEDE_RSS_COUNT(dev)) {
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
actions,
flow->entry.rx_queue = queue->index;
break;
-
+ case RTE_FLOW_ACTION_TYPE_DROP:
+ if (flow)
+ flow->entry.is_drop = true;
+ break;
default:
rte_flow_error_set(error, ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION,
actions,
- "Action is not supported - only ACTION_TYPE_QUEUE supported");
+ "Action is not supported - only ACTION_TYPE_QUEUE and ACTION_TYPE_DROP supported");
return -rte_errno;
}
}