Bug 1318 - l3fwd build errors in debug DPDK build with RTE_LOG_DP_LEVEL=RTE_LOG_DEBUG
Summary: l3fwd build errors in debug DPDK build with RTE_LOG_DP_LEVEL=RTE_LOG_DEBUG
Status: CONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: examples (show other bugs)
Version: 23.11
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2023-11-14 10:08 CET by Ganapati Kundapura
Modified: 2023-11-17 09:16 CET (History)
0 users



Attachments

Description Ganapati Kundapura 2023-11-14 10:08:14 CET
When DPDK is built in debug mode by setting RTE_LOG_DP_LEVEL=RTE_LOG_DEBUG, l3fwd build fails due to
static inline functions dump_acl4_rule(), dump_acl6_rule() defined in l3fwd_acl.c are called from l3fwd_acl_scalar.h:l3fwd_acl_send_packets() and 
other typo errors as below.

../../examples/l3fwd/l3fwd_acl_scalar.h: In function 'l3fwd_acl_send_packets':
../../examples/l3fwd/l3fwd_acl_scalar.h:96:34: error: invalid operands to binary & (have 'uint32_t *' {aka 'unsigned int *'} and 'unsigned int')
   96 |                         if ((res & ACL_DENY_SIGNATURE) != 0) {  
      |                                  ^

../../examples/l3fwd/l3fwd_acl_scalar.h:98:41: warning: implicit declaration of function 'dump_acl4_rule' [-Wimplicit-function-declaration]
   98 |                                         dump_acl4_rule(pkts[i], res[i]);
      |                                         ^~~~~~~~~~~~~~
../../examples/l3fwd/l3fwd_acl_scalar.h:98:41: warning: nested extern declaration of 'dump_acl4_rule' [-Wnested-externs]

../../examples/l3fwd/l3fwd_acl_scalar.h:99:62: error: 'pkt' undeclared (first use in this function); did you mean 'pkts'?
   99 |                                 else if (RTE_ETH_IS_IPV6_HDR(pkt[i]->packet_type))
      |                                                              ^~~

In file included from ../../examples/l3fwd/l3fwd_acl.c:268:
../../examples/l3fwd/l3fwd_acl_scalar.h:100:41: warning: implicit declaration of function 'dump_acl6_rule' [-Wimplicit-function-declaration]
  100 |                                         dump_acl6_rule(pkt[i], res[i]);
      |                                         ^~~~~~~~~~~~~~
../../examples/l3fwd/l3fwd_acl_scalar.h:100:41: warning: nested extern declaration of 'dump_acl6_rule' [-Wnested-externs]
../../examples/l3fwd/l3fwd_acl.c: At top level:
../../examples/l3fwd/l3fwd_acl.c:870:1: warning: conflicting types for 'dump_acl4_rule'; have 'void(struct rte_mbuf *, uint32_t)' {aka 'void(struct rte_mbuf *, unsigned int)'}
  870 | dump_acl4_rule(struct rte_mbuf *m, uint32_t sig)
      | ^~~~~~~~~~~~~~
../../examples/l3fwd/l3fwd_acl.c:870:1: error: static declaration of 'dump_acl4_rule' follows non-static declaration
In file included from ../../examples/l3fwd/l3fwd_acl.c:268:
../../examples/l3fwd/l3fwd_acl_scalar.h:98:41: note: previous implicit declaration of 'dump_acl4_rule' with type 'void(struct rte_mbuf *, uint32_t)' {aka 'void(struct rte_mbuf *, unsigned int)'}
   98 |                                         dump_acl4_rule(pkts[i], res[i]);
      |                                         ^~~~~~~~~~~~~~

../../examples/l3fwd/l3fwd_acl.c: In function 'dump_acl4_rule':
../../examples/l3fwd/l3fwd_acl.c:878:61: warning: passing argument 2 of 'inet_ntop' makes pointer from integer without a cast [-Wint-conversion]
  878 |         printf("Packet Src:%s ", inet_ntop(AF_INET, ipv4_hdr->src_addr,
      |                                                     ~~~~~~~~^~~~~~~~~~
      |                                                             |
      |                                                             rte_be32_t {aka unsigned int}
In file included from ../../lib/net/rte_ip.h:26,
                 from ../../lib/ethdev/rte_flow.h:24,
                 from ../../lib/ethdev/rte_eth_ctrl.h:11,
                 from ../../lib/ethdev/rte_ethdev.h:1492,
                 from ../../examples/l3fwd/l3fwd.h:8,
                 from ../../examples/l3fwd/l3fwd_acl.c:5:
/tools/AGRreleases/yocto/snr/snr_h_60c911d4/5.10/tools/sysroots/snr-64-intelaxxia-linux/usr/include/arpa/inet.h:64:64: note: expected 'const void * restrict' but argument is of type 'rte_be32_t' {aka 'unsigned int'}
   64 | extern const char *inet_ntop (int __af, const void *__restrict __cp,
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~
../../examples/l3fwd/l3fwd_acl.c:880:54: warning: passing argument 2 of 'inet_ntop' makes pointer from integer without a cast [-Wint-conversion]
  880 |         printf("Dst:%s ", inet_ntop(AF_INET, ipv4_hdr->dst_addr,
      |                                              ~~~~~~~~^~~~~~~~~~
      |                                                      |
      |                                                      rte_be32_t {aka unsigned int}


../../examples/l3fwd/l3fwd_acl.c: In function 'dump_acl6_rule':
../../examples/l3fwd/l3fwd_acl.c:914:39: error: 'struct <anonymous>' has no member named 'rule_ipv6'
  914 |         print_one_ipv6_rule(acl_config.rule_ipv6 + offset, 1);
      |                                       ^
../../examples/l3fwd/l3fwd_acl.c: In function 'setup_acl':
../../examples/l3fwd/l3fwd_acl.c:985:19: error: 'struct <anonymous>' has no member named 'rule_ipv4'
  985 |         acl_config.rule_ipv4 = (struct acl4_rule *)acl_base_ipv4;
      |                   ^
../../examples/l3fwd/l3fwd_acl.c:986:19: error: 'struct <anonymous>' has no member named 'rule_ipv6'
  986 |         acl_config.rule_ipv6 = (struct acl6_rule *)acl_base_ipv6;

Note You need to log in before you can comment on or make changes to this bug.