- GENEVE Tunneling offload
- VXLAN Tunneling offload
- MPLSoUDP Tx Tunneling offload
+- Generic flow API
Non-supported Features
----------------------
Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
for details.
+RTE Flow Support
+----------------
+
+QLogic FastLinQ QL4xxxx NICs has support for the following patterns and
+actions.
+
+Patterns:
+
+.. _table_qede_supported_flow_item_types:
+
+.. table:: Item types
+
+ +----+--------------------------------+
+ | # | Pattern Type |
+ +====+================================+
+ | 1 | RTE_FLOW_ITEM_TYPE_IPV4 |
+ +----+--------------------------------+
+ | 2 | RTE_FLOW_ITEM_TYPE_IPV6 |
+ +----+--------------------------------+
+ | 3 | RTE_FLOW_ITEM_TYPE_UDP |
+ +----+--------------------------------+
+ | 4 | RTE_FLOW_ITEM_TYPE_TCP |
+ +----+--------------------------------+
+
+Actions:
+
+.. _table_qede_supported_ingress_action_types:
+
+.. table:: Ingress action types
+
+ +----+--------------------------------+
+ | # | Action Type |
+ +====+================================+
+ | 1 | RTE_FLOW_ACTION_TYPE_QUEUE |
+ +----+--------------------------------+
+ | 2 | RTE_FLOW_ACTION_TYPE_DROP |
+ +----+--------------------------------+
+
SR-IOV: Prerequisites and Sample Application Notes
--------------------------------------------------
u64 rx_bcast_pkts;
u64 mftag_filter_discards;
u64 mac_filter_discards;
+ u64 gft_filter_drop;
u64 tx_ucast_bytes;
u64 tx_mcast_bytes;
u64 tx_bcast_bytes;
HILO_64_REGPAIR(tstats.mftag_filter_discard);
p_stats->common.mac_filter_discards +=
HILO_64_REGPAIR(tstats.eth_mac_filter_discard);
+ p_stats->common.gft_filter_drop +=
+ HILO_64_REGPAIR(tstats.eth_gft_drop_pkt);
}
static void __ecore_get_vport_ustats_addrlen(struct ecore_hwfn *p_hwfn,
enum _ecore_status_t
ecore_configure_rfs_ntuple_filter(struct ecore_hwfn *p_hwfn,
struct ecore_spq_comp_cb *p_cb,
- dma_addr_t p_addr, u16 length,
- u16 qid, u8 vport_id,
- bool b_is_add)
+ struct ecore_ntuple_filter_params *p_params)
{
struct rx_update_gft_filter_data *p_ramrod = OSAL_NULL;
struct ecore_spq_entry *p_ent = OSAL_NULL;
u8 abs_vport_id = 0;
enum _ecore_status_t rc = ECORE_NOTIMPL;
- rc = ecore_fw_vport(p_hwfn, vport_id, &abs_vport_id);
- if (rc != ECORE_SUCCESS)
- return rc;
-
- rc = ecore_fw_l2_queue(p_hwfn, qid, &abs_rx_q_id);
- if (rc != ECORE_SUCCESS)
- return rc;
-
/* Get SPQ entry */
OSAL_MEMSET(&init_data, 0, sizeof(init_data));
init_data.cid = ecore_spq_get_cid(p_hwfn);
p_ramrod = &p_ent->ramrod.rx_update_gft;
- DMA_REGPAIR_LE(p_ramrod->pkt_hdr_addr, p_addr);
- p_ramrod->pkt_hdr_length = OSAL_CPU_TO_LE16(length);
+ DMA_REGPAIR_LE(p_ramrod->pkt_hdr_addr, p_params->addr);
+ p_ramrod->pkt_hdr_length = OSAL_CPU_TO_LE16(p_params->length);
- p_ramrod->action_icid_valid = 0;
- p_ramrod->action_icid = 0;
+ if (p_params->b_is_drop) {
+ p_ramrod->vport_id = OSAL_CPU_TO_LE16(ETH_GFT_TRASHCAN_VPORT);
+ } else {
+ rc = ecore_fw_vport(p_hwfn, p_params->vport_id,
+ &abs_vport_id);
+ if (rc)
+ return rc;
+
+ if (p_params->qid != ECORE_RFS_NTUPLE_QID_RSS) {
+ rc = ecore_fw_l2_queue(p_hwfn, p_params->qid,
+ &abs_rx_q_id);
+ if (rc)
+ return rc;
- p_ramrod->rx_qid_valid = 1;
- p_ramrod->rx_qid = OSAL_CPU_TO_LE16(abs_rx_q_id);
+ p_ramrod->rx_qid_valid = 1;
+ p_ramrod->rx_qid = OSAL_CPU_TO_LE16(abs_rx_q_id);
+ }
+
+ p_ramrod->vport_id = OSAL_CPU_TO_LE16((u16)abs_vport_id);
+ }
p_ramrod->flow_id_valid = 0;
p_ramrod->flow_id = 0;
- p_ramrod->vport_id = OSAL_CPU_TO_LE16((u16)abs_vport_id);
- p_ramrod->filter_action = b_is_add ? GFT_ADD_FILTER
- : GFT_DELETE_FILTER;
+ p_ramrod->filter_action = p_params->b_is_add ? GFT_ADD_FILTER
+ : GFT_DELETE_FILTER;
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
"V[%0x], Q[%04x] - %s filter from 0x%lx [length %04xb]\n",
abs_vport_id, abs_rx_q_id,
- b_is_add ? "Adding" : "Removing",
- (unsigned long)p_addr, length);
+ p_params->b_is_add ? "Adding" : "Removing",
+ (unsigned long)p_params->addr, p_params->length);
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
}
struct ecore_ptt *p_ptt,
struct ecore_arfs_config_params *p_cfg_params);
+struct ecore_ntuple_filter_params {
+ /* Physically mapped address containing header of buffer to be used
+ * as filter.
+ */
+ dma_addr_t addr;
+
+ /* Length of header in bytes */
+ u16 length;
+
+ /* Relative queue-id to receive classified packet */
+ #define ECORE_RFS_NTUPLE_QID_RSS ((u16)-1)
+ u16 qid;
+
+ /* Identifier can either be according to vport-id or vfid */
+ bool b_is_vf;
+ u8 vport_id;
+ u8 vf_id;
+
+ /* true if this filter is to be added. Else to be removed */
+ bool b_is_add;
+
+ /* If packet needs to be dropped */
+ bool b_is_drop;
+};
+
/**
* @brief - ecore_configure_rfs_ntuple_filter
*
* @params p_cb Used for ECORE_SPQ_MODE_CB,where client would initialize
* it with cookie and callback function address, if not
* using this mode then client must pass NULL.
- * @params p_addr p_addr is an actual packet header that needs to be
- * filter. It has to mapped with IO to read prior to
- * calling this, [contains 4 tuples- src ip, dest ip,
- * src port, dest port].
- * @params length length of p_addr header up to past the transport header.
- * @params qid receive packet will be directed to this queue.
- * @params vport_id
- * @params b_is_add flag to add or remove filter.
- *
+ * @params p_params
*/
enum _ecore_status_t
ecore_configure_rfs_ntuple_filter(struct ecore_hwfn *p_hwfn,
struct ecore_spq_comp_cb *p_cb,
- dma_addr_t p_addr, u16 length,
- u16 qid, u8 vport_id,
- bool b_is_add);
+ struct ecore_ntuple_filter_params *p_params);
/**
* @brief - ecore_update_eth_rss_ind_table_entry
offsetof(struct ecore_eth_stats_common, mftag_filter_discards)},
{"rx_mac_filter_discards",
offsetof(struct ecore_eth_stats_common, mac_filter_discards)},
+ {"rx_gft_filter_drop",
+ offsetof(struct ecore_eth_stats_common, gft_filter_drop)},
{"rx_hw_buffer_truncates",
offsetof(struct ecore_eth_stats_common, brb_truncates)},
{"rx_hw_buffer_discards",
uint32_t soft_id; /* unused for now */
uint16_t pkt_len; /* actual packet length to match */
uint16_t rx_queue; /* queue to be steered to */
+ bool is_drop; /* drop action */
const struct rte_memzone *mz; /* mz used to hold L2 frame */
struct qede_arfs_tuple tuple;
SLIST_ENTRY(qede_arfs_entry) list;
{
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;
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;
}
}