Reputation: 17
I see the following error while compiling openvswitch-2.13.6 library with dpdk. I have tried to look for answers and am not able to find. I did try to see what header is included. it is from . /usr/local/include/rte_vhost.h and I see the variable definitions are available in struct vhost_device_ops
Any pointers and suggestions are welcome.
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I ./include -I ./include -I ./lib -I ./lib -I/root/dpdk/dpdk-21.11/build -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -fno-strict-aliasing -Wswitch-bool -Wlogical-not-parentheses -Wsizeof-array-argument -Wbool-compare -Wshift-negative-value -Wduplicated-cond -Wshadow -mssse3 -include rte_config.h -I/usr/local/include -D_FILE_OFFSET_BITS=64 -I/root/dpdk/dpdk-21.11/build -Ofast -msse4.2 -mpopcnt -I/root/dpdk/dpdk-21.11/build -MT lib/netdev-dpdk.lo -MD -MP -MF lib/.deps/netdev-dpdk.Tpo -c lib/netdev-dpdk.c -o lib/netdev-dpdk.o
In file included from lib/netdev-dpdk.c:52:0:
lib/dp-packet.h: In function ‘dp_packet_hwol_is_tso’:
lib/dp-packet.h:541:13: warning: "PKT_TX_TCP_SEG" is deprecated
return !!(b->mbuf.ol_flags & PKT_TX_TCP_SEG);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_hwol_is_ipv4’:
lib/dp-packet.h:548:13: warning: "PKT_TX_IPV4" is deprecated
return !!(b->mbuf.ol_flags & PKT_TX_IPV4);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_hwol_l4_mask’:
lib/dp-packet.h:555:13: warning: "PKT_TX_L4_MASK" is deprecated
return b->mbuf.ol_flags & PKT_TX_L4_MASK;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_hwol_l4_is_tcp’:
lib/dp-packet.h:562:13: warning: "PKT_TX_L4_MASK" is deprecated
return (b->mbuf.ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h:562:13: warning: "PKT_TX_TCP_CKSUM" is deprecated
return (b->mbuf.ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_hwol_l4_is_udp’:
lib/dp-packet.h:569:13: warning: "PKT_TX_L4_MASK" is deprecated
return (b->mbuf.ol_flags & PKT_TX_L4_MASK) == PKT_TX_UDP_CKSUM;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h:569:13: warning: "PKT_TX_UDP_CKSUM" is deprecated
return (b->mbuf.ol_flags & PKT_TX_L4_MASK) == PKT_TX_UDP_CKSUM;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_hwol_l4_is_sctp’:
lib/dp-packet.h:576:13: warning: "PKT_TX_L4_MASK" is deprecated
return (b->mbuf.ol_flags & PKT_TX_L4_MASK) == PKT_TX_SCTP_CKSUM;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h:576:13: warning: "PKT_TX_SCTP_CKSUM" is deprecated
return (b->mbuf.ol_flags & PKT_TX_L4_MASK) == PKT_TX_SCTP_CKSUM;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_hwol_set_tx_ipv4’:
lib/dp-packet.h:583:13: warning: "PKT_TX_IPV4" is deprecated
b->mbuf.ol_flags |= PKT_TX_IPV4;
^~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_hwol_set_tx_ipv6’:
lib/dp-packet.h:590:13: warning: "PKT_TX_IPV6" is deprecated
b->mbuf.ol_flags |= PKT_TX_IPV6;
^~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_hwol_set_csum_tcp’:
lib/dp-packet.h:598:13: warning: "PKT_TX_TCP_CKSUM" is deprecated
b->mbuf.ol_flags |= PKT_TX_TCP_CKSUM;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_hwol_set_csum_udp’:
lib/dp-packet.h:606:13: warning: "PKT_TX_UDP_CKSUM" is deprecated
b->mbuf.ol_flags |= PKT_TX_UDP_CKSUM;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_hwol_set_csum_sctp’:
lib/dp-packet.h:614:13: warning: "PKT_TX_SCTP_CKSUM" is deprecated
b->mbuf.ol_flags |= PKT_TX_SCTP_CKSUM;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_hwol_set_tcp_seg’:
lib/dp-packet.h:623:13: warning: "PKT_TX_TCP_SEG" is deprecated
b->mbuf.ol_flags |= PKT_TX_TCP_SEG;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_set_rss_hash’:
lib/dp-packet.h:638:13: warning: "PKT_RX_RSS_HASH" is deprecated
p->mbuf.ol_flags |= PKT_RX_RSS_HASH;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_rss_valid’:
lib/dp-packet.h:644:13: warning: "PKT_RX_RSS_HASH" is deprecated
return p->mbuf.ol_flags & PKT_RX_RSS_HASH;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_reset_offload’:
lib/dp-packet.h:650:13: warning: "EXT_ATTACHED_MBUF" is deprecated
p->mbuf.ol_flags &= DPDK_MBUF_NON_OFFLOADING_FLAGS;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h:650:13: warning: "IND_ATTACHED_MBUF" is deprecated
lib/dp-packet.h: In function ‘dp_packet_ip_checksum_valid’:
lib/dp-packet.h:656:13: warning: "PKT_RX_IP_CKSUM_MASK" is deprecated
return (p->mbuf.ol_flags & PKT_RX_IP_CKSUM_MASK) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h:657:13: warning: "PKT_RX_IP_CKSUM_GOOD" is deprecated
PKT_RX_IP_CKSUM_GOOD;
^~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_ip_checksum_bad’:
lib/dp-packet.h:663:13: warning: "PKT_RX_IP_CKSUM_MASK" is deprecated
return (p->mbuf.ol_flags & PKT_RX_IP_CKSUM_MASK) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h:664:13: warning: "PKT_RX_IP_CKSUM_BAD" is deprecated
PKT_RX_IP_CKSUM_BAD;
^~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_l4_checksum_valid’:
lib/dp-packet.h:670:13: warning: "PKT_RX_L4_CKSUM_MASK" is deprecated
return (p->mbuf.ol_flags & PKT_RX_L4_CKSUM_MASK) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h:671:13: warning: "PKT_RX_L4_CKSUM_GOOD" is deprecated
PKT_RX_L4_CKSUM_GOOD;
^~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_l4_checksum_bad’:
lib/dp-packet.h:677:13: warning: "PKT_RX_L4_CKSUM_MASK" is deprecated
return (p->mbuf.ol_flags & PKT_RX_L4_CKSUM_MASK) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h:678:13: warning: "PKT_RX_L4_CKSUM_BAD" is deprecated
PKT_RX_L4_CKSUM_BAD;
^~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_has_flow_mark’:
lib/dp-packet.h:684:13: warning: "PKT_RX_FDIR_ID" is deprecated
if (p->mbuf.ol_flags & PKT_RX_FDIR_ID) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/dp-packet.h: In function ‘dp_packet_set_flow_mark’:
lib/dp-packet.h:696:13: warning: "PKT_RX_FDIR_ID" is deprecated
p->mbuf.ol_flags |= PKT_RX_FDIR_ID;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c: At top level:
lib/netdev-dpdk.c:191:21: error: variable ‘virtio_net_device_ops’ has initializer but incomplete type
static const struct vhost_device_ops virtio_net_device_ops =
^~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:193:6: error: ‘const struct vhost_device_ops’ has no member named ‘new_device’
.new_device = new_device,
^~~~~~~~~~
lib/netdev-dpdk.c:193:20: warning: excess elements in struct initializer
.new_device = new_device,
^~~~~~~~~~
lib/netdev-dpdk.c:193:20: note: (near initialization for ‘virtio_net_device_ops’)
lib/netdev-dpdk.c:194:6: error: ‘const struct vhost_device_ops’ has no member named ‘destroy_device’
.destroy_device = destroy_device,
^~~~~~~~~~~~~~
lib/netdev-dpdk.c:194:23: warning: excess elements in struct initializer
.destroy_device = destroy_device,
^~~~~~~~~~~~~~
lib/netdev-dpdk.c:194:23: note: (near initialization for ‘virtio_net_device_ops’)
lib/netdev-dpdk.c:195:6: error: ‘const struct vhost_device_ops’ has no member named ‘vring_state_changed’
.vring_state_changed = vring_state_changed,
^~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:195:28: warning: excess elements in struct initializer
.vring_state_changed = vring_state_changed,
^~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:195:28: note: (near initialization for ‘virtio_net_device_ops’)
lib/netdev-dpdk.c:196:6: error: ‘const struct vhost_device_ops’ has no member named ‘features_changed’
.features_changed = NULL,
^~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:196:25: warning: excess elements in struct initializer
.features_changed = NULL,
^~~~
lib/netdev-dpdk.c:196:25: note: (near initialization for ‘virtio_net_device_ops’)
lib/netdev-dpdk.c:197:6: error: ‘const struct vhost_device_ops’ has no member named ‘new_connection’
.new_connection = NULL,
^~~~~~~~~~~~~~
lib/netdev-dpdk.c:197:23: warning: excess elements in struct initializer
.new_connection = NULL,
^~~~
lib/netdev-dpdk.c:197:23: note: (near initialization for ‘virtio_net_device_ops’)
lib/netdev-dpdk.c:198:6: error: ‘const struct vhost_device_ops’ has no member named ‘destroy_connection’
.destroy_connection = destroy_connection,
^~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:198:27: warning: excess elements in struct initializer
.destroy_connection = destroy_connection,
^~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:198:27: note: (near initialization for ‘virtio_net_device_ops’)
lib/netdev-dpdk.c:199:6: error: ‘const struct vhost_device_ops’ has no member named ‘guest_notified’
.guest_notified = vhost_guest_notified,
^~~~~~~~~~~~~~
lib/netdev-dpdk.c:199:23: warning: excess elements in struct initializer
.guest_notified = vhost_guest_notified,
^~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:199:23: note: (near initialization for ‘virtio_net_device_ops’)
lib/netdev-dpdk.c: In function ‘netdev_dpdk_get_num_ports’:
lib/netdev-dpdk.c:1342:13: error: ‘rte_eth_devices’ undeclared (first use in this function); did you mean ‘rte_eth_dev’?
if (rte_eth_devices[dev->port_id].device == device
^~~~~~~~~~~~~~~
rte_eth_dev
lib/netdev-dpdk.c:1342:13: note: each undeclared identifier is reported only once for each function it appears in
lib/netdev-dpdk.c: In function ‘vhost_common_construct’:
lib/netdev-dpdk.c:1354:44: warning: implicit declaration of function ‘rte_get_master_lcore’; did you mean ‘rte_get_main_lcore’? [-Wimplicit-function-declaration]
int socket_id = rte_lcore_to_socket_id(rte_get_master_lcore());
^~~~~~~~~~~~~~~~~~~~
rte_get_main_lcore
lib/netdev-dpdk.c: In function ‘netdev_dpdk_vhost_construct’:
lib/netdev-dpdk.c:1413:49: warning: passing argument 2 of ‘rte_vhost_driver_callback_register’ from incompatible pointer type [-Wincompatible-pointer-types]
&virtio_net_device_ops);
^
In file included from lib/netdev-dpdk.c:47:0:
/usr/local/include/rte_vhost.h:608:5: note: expected ‘const struct rte_vhost_device_ops * const’ but argument is of type ‘const struct vhost_device_ops *’
int rte_vhost_driver_callback_register(const char *path,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c: In function ‘netdev_dpdk_destruct’:
lib/netdev-dpdk.c:1516:20: error: ‘rte_eth_devices’ undeclared (first use in this function); did you mean ‘rte_eth_dev’?
eth_dev = &rte_eth_devices[dev->port_id];
^~~~~~~~~~~~~~~
rte_eth_dev
lib/netdev-dpdk.c:1518:20: error: dereferencing pointer to incomplete type ‘struct rte_eth_dev’
eth_dev->data &&
^~
lib/netdev-dpdk.c:1519:45: error: ‘RTE_ETH_DEV_CLOSE_REMOVE’ undeclared (first use in this function); did you mean ‘RTE_ETH_DEV_REMOVED’?
(eth_dev->data->dev_flags & RTE_ETH_DEV_CLOSE_REMOVE);
^~~~~~~~~~~~~~~~~~~~~~~~
RTE_ETH_DEV_REMOVED
lib/netdev-dpdk.c: In function ‘netdev_dpdk_vhost_client_set_config’:
lib/netdev-dpdk.c:2099:44: error: ‘RTE_VHOST_USER_DEQUEUE_ZERO_COPY’ undeclared (first use in this function); did you mean ‘RTE_VHOST_USER_ASYNC_COPY’?
dev->vhost_driver_flags |= RTE_VHOST_USER_DEQUEUE_ZERO_COPY;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RTE_VHOST_USER_ASYNC_COPY
lib/netdev-dpdk.c: In function ‘netdev_dpdk_prep_hwol_packet’:
lib/netdev-dpdk.c:2203:13: warning: "PKT_TX_L4_MASK" is deprecated
if (mbuf->ol_flags & PKT_TX_L4_MASK) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:2210:13: warning: "PKT_TX_TCP_SEG" is deprecated
if (mbuf->ol_flags & PKT_TX_TCP_SEG) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:2220:13: warning: "PKT_TX_TCP_CKSUM" is deprecated
mbuf->ol_flags |= PKT_TX_TCP_CKSUM;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:2223:13: warning: "PKT_TX_IPV4" is deprecated
if (mbuf->ol_flags & PKT_TX_IPV4) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:2224:13: warning: "PKT_TX_IP_CKSUM" is deprecated
mbuf->ol_flags |= PKT_TX_IP_CKSUM;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c: In function ‘netdev_dpdk_filter_packet_len’:
lib/netdev-dpdk.c:2571:13: warning: "PKT_TX_TCP_SEG" is deprecated
&& !(pkt->ol_flags & PKT_TX_TCP_SEG))) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c: In function ‘dpdk_copy_dp_packet_to_mbuf’:
lib/netdev-dpdk.c:2793:13: warning: "EXT_ATTACHED_MBUF" is deprecated
~(EXT_ATTACHED_MBUF | IND_ATTACHED_MBUF));
^ ~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:2793:13: warning: "IND_ATTACHED_MBUF" is deprecated
lib/netdev-dpdk.c:2798:13: warning: "PKT_TX_L4_MASK" is deprecated
if (mbuf_dest->ol_flags & PKT_TX_L4_MASK) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c: In function ‘dpdk_do_tx_copy’:
lib/netdev-dpdk.c:2843:13: warning: "PKT_TX_TCP_SEG" is deprecated
&& !(packet->mbuf.ol_flags & PKT_TX_TCP_SEG)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c: In function ‘netdev_dpdk_get_status’:
lib/netdev-dpdk.c:3687:13: warning: "PCI_ANY_ID" is deprecated
uint16_t vendor_id = PCI_ANY_ID;
^~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c:3688:13: warning: "PCI_ANY_ID" is deprecated
uint16_t device_id = PCI_ANY_ID;
^~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c: In function ‘netdev_dpdk_detach’:
lib/netdev-dpdk.c:3811:15: error: ‘rte_eth_devices’ undeclared (first use in this function); did you mean ‘rte_eth_dev’?
rte_dev = rte_eth_devices[port_id].device;
^~~~~~~~~~~~~~~
rte_eth_dev
lib/netdev-dpdk.c: In function ‘netdev_dpdk_vhost_client_reconfigure’:
lib/netdev-dpdk.c:5235:24: error: ‘RTE_VHOST_USER_DEQUEUE_ZERO_COPY’ undeclared (first use in this function); did you mean ‘RTE_VHOST_USER_ASYNC_COPY’?
& RTE_VHOST_USER_DEQUEUE_ZERO_COPY;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RTE_VHOST_USER_ASYNC_COPY
lib/netdev-dpdk.c:5263:50: warning: passing argument 2 of ‘rte_vhost_driver_callback_register’ from incompatible pointer type [-Wincompatible-pointer-types]
&virtio_net_device_ops);
^
In file included from lib/netdev-dpdk.c:47:0:
/usr/local/include/rte_vhost.h:608:5: note: expected ‘const struct rte_vhost_device_ops * const’ but argument is of type ‘const struct vhost_device_ops *’
int rte_vhost_driver_callback_register(const char *path,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/netdev-dpdk.c: In function ‘netdev_dpdk_rte_flow_query_count’:
lib/netdev-dpdk.c:5384:45: error: ‘struct rte_flow_action_count’ has no member named ‘shared’
struct rte_flow_action_count count = { .shared = 0, .id = 0 };
^~~~~~
lib/netdev-dpdk.c:5384:63: warning: initialized field overwritten [-Woverride-init]
struct rte_flow_action_count count = { .shared = 0, .id = 0 };
^
lib/netdev-dpdk.c:5384:63: note: (near initialization for ‘count.id’)
lib/netdev-dpdk.c: At top level:
lib/netdev-dpdk.c:191:38: error: storage size of ‘virtio_net_device_ops’ isn’t known
static const struct vhost_device_ops virtio_net_device_ops =
^~~~~~~~~~~~~~~~~~~~~
Makefile:4470: recipe for target 'lib/netdev-dpdk.lo' failed
make[2]: *** [lib/netdev-dpdk.lo] Error 1
make[2]: Leaving directory '/root/dpdk/openvswitch-2.13.6'
Makefile:5199: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/dpdk/openvswitch-2.13.6'
Makefile:2953: recipe for target 'all' failed
make: *** [all] Error 2
Upvotes: 0
Views: 552
Reputation: 1
According to the OVS release notes, DPDK version 20.11.1 needs to be used instead of the latest. So if you are doing installation according to this manual: https://docs.openvswitch.org/en/latest/intro/install/dpdk/ you need to use wget https://fast.dpdk.org/rel/dpdk-20.11.1.tar.xz instead of wget https://fast.dpdk.org/rel/dpdk-21.11.tar.xz
Upvotes: 0
Reputation: 17
Found the issue, OVS release notes actually has the compatible version of DPDK listed and I got compilation going.
Upvotes: 0