net/nfp: remove Rx port metadata
This was required for middlebox-like firmware which NFP does not support anymore. Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
This commit is contained in:
parent
8fce14b789
commit
51151be63c
@ -1609,12 +1609,6 @@ nfp_net_set_hash(struct nfp_net_rxq *rxq, struct nfp_net_rx_desc *rxd,
|
||||
hash = rte_be_to_cpu_32(*(uint32_t *)NFP_HASH_OFFSET);
|
||||
hash_type = rte_be_to_cpu_32(*(uint32_t *)NFP_HASH_TYPE_OFFSET);
|
||||
|
||||
/*
|
||||
* hash type is sharing the same word with input port info
|
||||
* 31-8: input port
|
||||
* 7:0: hash type
|
||||
*/
|
||||
hash_type &= 0xff;
|
||||
mbuf->hash.rss = hash;
|
||||
mbuf->ol_flags |= PKT_RX_RSS_HASH;
|
||||
|
||||
@ -1633,29 +1627,6 @@ nfp_net_set_hash(struct nfp_net_rxq *rxq, struct nfp_net_rx_desc *rxd,
|
||||
}
|
||||
}
|
||||
|
||||
/* nfp_net_check_port - Set mbuf in_port field */
|
||||
static void
|
||||
nfp_net_check_port(struct nfp_net_rx_desc *rxd, struct rte_mbuf *mbuf)
|
||||
{
|
||||
uint32_t port;
|
||||
|
||||
if (!(rxd->rxd.flags & PCIE_DESC_RX_INGRESS_PORT)) {
|
||||
mbuf->port = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
port = rte_be_to_cpu_32(*(uint32_t *)((uint8_t *)mbuf->buf_addr +
|
||||
mbuf->data_off - 8));
|
||||
|
||||
/*
|
||||
* hash type is sharing the same word with input port info
|
||||
* 31-8: input port
|
||||
* 7:0: hash type
|
||||
*/
|
||||
port = (uint8_t)(port >> 8);
|
||||
mbuf->port = port;
|
||||
}
|
||||
|
||||
static inline void
|
||||
nfp_net_mbuf_alloc_failed(struct nfp_net_rxq *rxq)
|
||||
{
|
||||
@ -1805,9 +1776,6 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
|
||||
/* Checking the checksum flag */
|
||||
nfp_net_rx_cksum(rxq, rxds, mb);
|
||||
|
||||
/* Checking the port flag */
|
||||
nfp_net_check_port(rxds, mb);
|
||||
|
||||
if ((rxds->rxd.flags & PCIE_DESC_RX_VLAN) &&
|
||||
(hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN)) {
|
||||
mb->vlan_tci = rte_cpu_to_le_32(rxds->rxd.vlan);
|
||||
|
@ -269,7 +269,7 @@ struct nfp_net_txq {
|
||||
#define PCIE_DESC_RX_I_TCP_CSUM_OK (1 << 11)
|
||||
#define PCIE_DESC_RX_I_UDP_CSUM (1 << 10)
|
||||
#define PCIE_DESC_RX_I_UDP_CSUM_OK (1 << 9)
|
||||
#define PCIE_DESC_RX_INGRESS_PORT (1 << 8)
|
||||
#define PCIE_DESC_RX_SPARE (1 << 8)
|
||||
#define PCIE_DESC_RX_EOP (1 << 7)
|
||||
#define PCIE_DESC_RX_IP4_CSUM (1 << 6)
|
||||
#define PCIE_DESC_RX_IP4_CSUM_OK (1 << 5)
|
||||
|
Loading…
Reference in New Issue
Block a user