net/sfc: support flow marks in equal stride super-buffer Rx

Equal stride super-buffer Rx mode allows to mark packets in HW
using filters. Process the data on datapath and advertise
corresponding features to allow flow API support to implement it.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Andrew Rybchenko 2018-04-19 12:37:00 +01:00 committed by Ferruh Yigit
parent 5a1ae82d7b
commit 26c4f60823
2 changed files with 14 additions and 2 deletions

View File

@ -193,6 +193,8 @@ struct sfc_dp_rx {
#define SFC_DP_RX_FEAT_SCATTER 0x1
#define SFC_DP_RX_FEAT_MULTI_PROCESS 0x2
#define SFC_DP_RX_FEAT_TUNNELS 0x4
#define SFC_DP_RX_FEAT_FLOW_FLAG 0x8
#define SFC_DP_RX_FEAT_FLOW_MARK 0x10
sfc_dp_rx_get_dev_info_t *get_dev_info;
sfc_dp_rx_pool_ops_supported_t *pool_ops_supported;
sfc_dp_rx_qsize_up_rings_t *qsize_up_rings;

View File

@ -316,12 +316,21 @@ sfc_ef10_essb_rx_get_pending(struct sfc_ef10_essb_rxq *rxq,
m->ol_flags |=
(PKT_RX_RSS_HASH *
!!EFX_TEST_QWORD_BIT(*qwordp,
ES_EZ_ESSB_RX_PREFIX_HASH_VALID_LBN));
ES_EZ_ESSB_RX_PREFIX_HASH_VALID_LBN)) |
(PKT_RX_FDIR_ID *
!!EFX_TEST_QWORD_BIT(*qwordp,
ES_EZ_ESSB_RX_PREFIX_MARK_VALID_LBN)) |
(PKT_RX_FDIR *
!!EFX_TEST_QWORD_BIT(*qwordp,
ES_EZ_ESSB_RX_PREFIX_MATCH_FLAG_LBN));
/* EFX_QWORD_FIELD converts little-endian to CPU */
m->hash.rss =
EFX_QWORD_FIELD(*qwordp,
ES_EZ_ESSB_RX_PREFIX_HASH);
m->hash.fdir.hi =
EFX_QWORD_FIELD(*qwordp,
ES_EZ_ESSB_RX_PREFIX_MARK);
m = sfc_ef10_essb_next_mbuf(rxq, m);
} while (todo_bufs-- > 0);
@ -640,7 +649,8 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
.hw_fw_caps = SFC_DP_HW_FW_CAP_EF10 |
SFC_DP_HW_FW_CAP_RX_ES_SUPER_BUFFER,
},
.features = 0,
.features = SFC_DP_RX_FEAT_FLOW_FLAG |
SFC_DP_RX_FEAT_FLOW_MARK,
.get_dev_info = sfc_ef10_essb_rx_get_dev_info,
.pool_ops_supported = sfc_ef10_essb_rx_pool_ops_supported,
.qsize_up_rings = sfc_ef10_essb_rx_qsize_up_rings,