* 0x2 - TCP L4 checksum
* 0x3 - SCTP L4 checksum
*/
- const uint8_t csum = (!(((ol_flags ^ PKT_TX_UDP_CKSUM) >> 52) & 0x3) +
- (!(((ol_flags ^ PKT_TX_TCP_CKSUM) >> 52) & 0x3) * 2) +
- (!(((ol_flags ^ PKT_TX_SCTP_CKSUM) >> 52) & 0x3) * 3));
-
- const uint8_t is_tunnel_parsed = (!!(ol_flags & PKT_TX_TUNNEL_GTP) ||
- !!(ol_flags & PKT_TX_TUNNEL_VXLAN_GPE) ||
- !!(ol_flags & PKT_TX_TUNNEL_VXLAN) ||
- !!(ol_flags & PKT_TX_TUNNEL_GRE) ||
- !!(ol_flags & PKT_TX_TUNNEL_GENEVE) ||
- !!(ol_flags & PKT_TX_TUNNEL_IP) ||
- !!(ol_flags & PKT_TX_TUNNEL_IPIP));
-
- const uint8_t csum_outer = (!!(ol_flags & PKT_TX_OUTER_UDP_CKSUM) ||
- !!(ol_flags & PKT_TX_TUNNEL_UDP));
+ const uint8_t csum = (!(((ol_flags ^ RTE_MBUF_F_TX_UDP_CKSUM) >> 52) & 0x3) +
+ (!(((ol_flags ^ RTE_MBUF_F_TX_TCP_CKSUM) >> 52) & 0x3) * 2) +
+ (!(((ol_flags ^ RTE_MBUF_F_TX_SCTP_CKSUM) >> 52) & 0x3) * 3));
+
+ const uint8_t is_tunnel_parsed = (!!(ol_flags & RTE_MBUF_F_TX_TUNNEL_GTP) ||
+ !!(ol_flags & RTE_MBUF_F_TX_TUNNEL_VXLAN_GPE) ||
+ !!(ol_flags & RTE_MBUF_F_TX_TUNNEL_VXLAN) ||
+ !!(ol_flags & RTE_MBUF_F_TX_TUNNEL_GRE) ||
+ !!(ol_flags & RTE_MBUF_F_TX_TUNNEL_GENEVE) ||
+ !!(ol_flags & RTE_MBUF_F_TX_TUNNEL_IP) ||
+ !!(ol_flags & RTE_MBUF_F_TX_TUNNEL_IPIP));
+
+ const uint8_t csum_outer = (!!(ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM) ||
+ !!(ol_flags & RTE_MBUF_F_TX_TUNNEL_UDP));
const uint8_t outer_l2_len = m->outer_l2_len;
const uint8_t l2_len = m->l2_len;
send_hdr->w0.l3ptr = outer_l2_len;
send_hdr->w0.l4ptr = outer_l2_len + m->outer_l3_len;
/* Set clk3 for PKO to calculate IPV4 header checksum */
- send_hdr->w0.ckl3 = !!(ol_flags & PKT_TX_OUTER_IPV4);
+ send_hdr->w0.ckl3 = !!(ol_flags & RTE_MBUF_F_TX_OUTER_IPV4);
/* Outer L4 */
send_hdr->w0.ckl4 = csum_outer;
/* Set clke for PKO to calculate inner IPV4 header
* checksum.
*/
- send_hdr->w0.ckle = !!(ol_flags & PKT_TX_IPV4);
+ send_hdr->w0.ckle = !!(ol_flags & RTE_MBUF_F_TX_IPV4);
/* Inner L4 */
send_hdr->w0.cklf = csum;
send_hdr->w0.l3ptr = l2_len;
send_hdr->w0.l4ptr = l2_len + m->l3_len;
/* Set clk3 for PKO to calculate IPV4 header checksum */
- send_hdr->w0.ckl3 = !!(ol_flags & PKT_TX_IPV4);
+ send_hdr->w0.ckl3 = !!(ol_flags & RTE_MBUF_F_TX_IPV4);
/* Inner L4 */
send_hdr->w0.ckl4 = csum;
send_hdr->w0.l3ptr = outer_l2_len;
send_hdr->w0.l4ptr = outer_l2_len + m->outer_l3_len;
/* Set clk3 for PKO to calculate IPV4 header checksum */
- send_hdr->w0.ckl3 = !!(ol_flags & PKT_TX_OUTER_IPV4);
+ send_hdr->w0.ckl3 = !!(ol_flags & RTE_MBUF_F_TX_OUTER_IPV4);
/* Outer L4 */
send_hdr->w0.ckl4 = csum_outer;
send_hdr->w0.l3ptr = l2_len;
send_hdr->w0.l4ptr = l2_len + m->l3_len;
/* Set clk3 for PKO to calculate IPV4 header checksum */
- send_hdr->w0.ckl3 = !!(ol_flags & PKT_TX_IPV4);
+ send_hdr->w0.ckl3 = !!(ol_flags & RTE_MBUF_F_TX_IPV4);
/* Inner L4 */
send_hdr->w0.ckl4 = csum;
/* Mark mempool object as "put" since it is freed by PKO */
if (!(cmd_buf[0] & (1ULL << 58)))
- __mempool_check_cookies(m_tofree->pool, (void **)&m_tofree,
+ RTE_MEMPOOL_CHECK_COOKIES(m_tofree->pool, (void **)&m_tofree,
1, 0);
/* Get the gaura Id */
gaura_id =
const uint16_t flag)
{
uint16_t nb_segs, nb_desc = 0;
- uint16_t gaura_id, len = 0;
+ uint16_t gaura_id;
struct rte_mbuf *m_next = NULL, *m_tofree;
rte_iova_t iova;
uint16_t data_len;
*/
if (!(cmd_buf[nb_desc] & (1ULL << 57))) {
tx_pkt->next = NULL;
- __mempool_check_cookies(m_tofree->pool,
+ RTE_MEMPOOL_CHECK_COOKIES(m_tofree->pool,
(void **)&m_tofree, 1, 0);
}
nb_desc++;
cmd_buf[nb_desc++] = iova;
nb_segs--;
- len += data_len;
tx_pkt = m_next;
} while (nb_segs);