rxq->fqid, ret);
}
}
-
+ /* Enable main queue to receive error packets also by default */
+ fman_if_set_err_fqid(fif, rxq->fqid);
return 0;
}
fman_intf->mac_addr.addr_bytes[5]);
if (!fman_intf->is_shared_mac) {
- /* Disable RX mode */
-#ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER
+ /* Configure error packet handling */
fman_if_receive_rx_errors(fman_intf,
FM_FD_RX_STATUS_ERR_MASK);
-#else
- fman_if_discard_rx_errors(fman_intf);
-#endif
+ /* Disable RX mode */
fman_if_disable_rx(fman_intf);
/* Disable promiscuous mode */
fman_if_promiscuous_disable(fman_intf);
DPAA_DP_LOG(DEBUG, " Parsing mbuf: %p with annotations: %p", m, annot);
+ m->ol_flags = PKT_RX_RSS_HASH | PKT_RX_IP_CKSUM_GOOD |
+ PKT_RX_L4_CKSUM_GOOD;
+
switch (prs) {
case DPAA_PKT_TYPE_IPV4:
m->packet_type = RTE_PTYPE_L2_ETHER |
m->packet_type = RTE_PTYPE_L2_ETHER |
RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_SCTP;
break;
+ case DPAA_PKT_TYPE_IPV4_CSUM_ERR:
+ case DPAA_PKT_TYPE_IPV6_CSUM_ERR:
+ m->ol_flags = PKT_RX_RSS_HASH | PKT_RX_IP_CKSUM_BAD;
+ break;
+ case DPAA_PKT_TYPE_IPV4_TCP_CSUM_ERR:
+ case DPAA_PKT_TYPE_IPV6_TCP_CSUM_ERR:
+ case DPAA_PKT_TYPE_IPV4_UDP_CSUM_ERR:
+ case DPAA_PKT_TYPE_IPV6_UDP_CSUM_ERR:
+ m->ol_flags = PKT_RX_RSS_HASH | PKT_RX_L4_CKSUM_BAD;
+ break;
case DPAA_PKT_TYPE_NONE:
m->packet_type = 0;
break;
/* Set the hash values */
m->hash.rss = (uint32_t)(annot->hash);
- /* All packets with Bad checksum are dropped by interface (and
- * corresponding notification issued to RX error queues).
- */
- m->ol_flags = PKT_RX_RSS_HASH | PKT_RX_IP_CKSUM_GOOD;
/* Check if Vlan is present */
if (prs & DPAA_PARSE_VLAN_MASK)
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright 2016 Freescale Semiconductor, Inc. All rights reserved.
- * Copyright 2017 NXP
+ * Copyright 2017,2020 NXP
*
*/
* 0x8000 - Ethernet type
* ShimR & Logical Port ID 0x0000
*/
-#define DPAA_PARSE_MASK 0x00E044ED00800000
+#define DPAA_PARSE_MASK 0x00F044EF00800000
#define DPAA_PARSE_VLAN_MASK 0x0000000000700000
/* Parsed values (Little Endian) */
(0x0020000000000000 | DPAA_PKT_TYPE_TUNNEL_4_6)
#define DPAA_PKT_TYPE_TUNNEL_6_4_TCP \
(0x0020000000000000 | DPAA_PKT_TYPE_TUNNEL_6_4)
+
+/* Checksum Errors */
+#define DPAA_PKT_IP_CSUM_ERR 0x0000400200000000
+#define DPAA_PKT_L4_CSUM_ERR 0x0010000000000000
+#define DPAA_PKT_TYPE_IPV4_CSUM_ERR \
+ (DPAA_PKT_IP_CSUM_ERR | DPAA_PKT_TYPE_IPV4)
+#define DPAA_PKT_TYPE_IPV6_CSUM_ERR \
+ (DPAA_PKT_IP_CSUM_ERR | DPAA_PKT_TYPE_IPV6)
+#define DPAA_PKT_TYPE_IPV4_TCP_CSUM_ERR \
+ (DPAA_PKT_L4_CSUM_ERR | DPAA_PKT_TYPE_IPV4_TCP)
+#define DPAA_PKT_TYPE_IPV6_TCP_CSUM_ERR \
+ (DPAA_PKT_L4_CSUM_ERR | DPAA_PKT_TYPE_IPV6_TCP)
+#define DPAA_PKT_TYPE_IPV4_UDP_CSUM_ERR \
+ (DPAA_PKT_L4_CSUM_ERR | DPAA_PKT_TYPE_IPV4_UDP)
+#define DPAA_PKT_TYPE_IPV6_UDP_CSUM_ERR \
+ (DPAA_PKT_L4_CSUM_ERR | DPAA_PKT_TYPE_IPV6_UDP)
+
#define DPAA_PKT_L3_LEN_SHIFT 7
/**