.input_index = SRCP_DESTP_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
sizeof(struct rte_ipv4_hdr) +
- offsetof(struct tcp_hdr, src_port),
+ offsetof(struct rte_tcp_hdr, src_port),
},
{
/* rte_flow uses a bit mask for protocol ports */
.input_index = SRCP_DESTP_INPUT_IPV4,
.offset = sizeof(struct rte_ether_hdr) +
sizeof(struct rte_ipv4_hdr) +
- offsetof(struct tcp_hdr, dst_port),
+ offsetof(struct rte_tcp_hdr, dst_port),
},
};
if (!rte_eth_dev_is_valid_port(port))
return -1;
- rte_eth_dev_info_get(port, &dev_info);
+ retval = rte_eth_dev_info_get(port, &dev_info);
+ if (retval != 0) {
+ printf("Error during getting device (port %u) info: %s\n",
+ port, strerror(-retval));
+ return retval;
+ }
+
if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
port_conf.txmode.offloads |=
DEV_TX_OFFLOAD_MBUF_FAST_FREE;
if (get_cb_field(&in, &m, 0, sizeof(uint32_t) * CHAR_BIT, 0))
return -EINVAL;
- addr[0] = IPv4(a, b, c, d);
+ addr[0] = RTE_IPV4(a, b, c, d);
mask_len[0] = m;
return 0;
}