> Hi Lorenzo, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on 734bef548a96e8774d6eef5dfa2026c6edc4e80b] > > url: https://github.com/intel-lab-lkp/linux/commits/Lorenzo-Bianconi/net-netfilter-nf_flow_table-recognize-IPv4-IPv6-in-tunnel-proto-matching/20261029-143512 > base: 734bef548a96e8774d6eef5dfa2026c6edc4e80b > patch link: https://lore.kernel.org/r/20261029-flowtable-sw-accel-ip6ip-sit-v1-5-6a17c54f9fb7%40oss.qualcomm.com > patch subject: [PATCH nf-next 5/8] net: netfilter: add IPv4 over IPv6 tunnel flowtable acceleration > config: m68k-defconfig (https://download.01.org/0day-ci/archive/20261030/202610301255.BRNUBmqH-lkp@intel.com/config) > compiler: m68k-linux-gcc (GCC) 16.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261030/202610301255.BRNUBmqH-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202610301255.BRNUBmqH-lkp@intel.com/ > > All warnings (new ones prefixed by >>): > > net/netfilter/nf_flow_table_ip.c: In function 'nf_flow_queue_xmit4': > >> net/netfilter/nf_flow_table_ip.c:891:35: warning: variable 'dst' set but not used [-Wunused-but-set-variable=] > 891 | struct dst_entry *dst; > | ^~~ > net/netfilter/nf_flow_table_ip.c: In function 'nf_flow_queue_xmit6': > net/netfilter/nf_flow_table_ip.c:1237:35: warning: variable 'dst' set but not used [-Wunused-but-set-variable=] > 1237 | struct dst_entry *dst; > | ^~~ ack, I will fix it in v2. Regards, Lorenzo > > > vim +/dst +891 net/netfilter/nf_flow_table_ip.c > > 858 > 859 static int nf_flow_queue_xmit4(struct nf_flowtable_ctx *ctx, > 860 struct sk_buff *skb, > 861 struct flow_offload_tuple_rhash *tuplehash, > 862 const struct nf_hook_state *state) > 863 { > 864 struct flow_offload_tuple *other_tuple; > 865 enum flow_offload_tuple_dir dir; > 866 struct nf_flow_xmit xmit = {}; > 867 union nf_inet_addr *ip_addr; > 868 struct flow_offload *flow; > 869 struct neighbour *neigh; > 870 struct rtable *rt; > 871 > 872 if (unlikely(tuplehash->tuple.xmit_type == FLOW_OFFLOAD_XMIT_XFRM)) { > 873 rt = dst_rtable(tuplehash->tuple.dst_cache); > 874 memset(skb->cb, 0, sizeof(struct inet_skb_parm)); > 875 IPCB(skb)->iif = skb->dev->ifindex; > 876 IPCB(skb)->flags = IPSKB_FORWARDED; > 877 return nf_flow_xmit_xfrm(skb, state, &rt->dst); > 878 } > 879 > 880 dir = tuplehash->tuple.dir; > 881 flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]); > 882 other_tuple = &flow->tuplehash[!dir].tuple; > 883 ip_addr = (union nf_inet_addr *)&other_tuple->src_v4; > 884 > 885 if (nf_flow_tunnel_push(state->net, skb, other_tuple, > 886 tuplehash->tuple.dst_cache, &ip_addr) < 0) > 887 return NF_DROP; > 888 > 889 switch (tuplehash->tuple.xmit_type) { > 890 case FLOW_OFFLOAD_XMIT_NEIGH: { > > 891 struct dst_entry *dst; > 892 > 893 xmit.outdev = dev_get_by_index_rcu(state->net, tuplehash->tuple.ifidx); > 894 if (!xmit.outdev) { > 895 flow_offload_teardown(flow); > 896 return NF_DROP; > 897 } > 898 if (other_tuple->tun.encap_proto ? > 899 other_tuple->tun.encap_proto == AF_INET6 : > 900 ctx->tun.inner_proto == IPPROTO_IPV6) { > 901 struct rt6_info *rt6; > 902 > 903 rt6 = dst_rt6_info(tuplehash->tuple.dst_cache); > 904 neigh = ip_neigh_gw6(rt6->dst.dev, > 905 rt6_nexthop(rt6, &ip_addr->in6)); > 906 dst = &rt6->dst; > 907 } else { > 908 rt = dst_rtable(tuplehash->tuple.dst_cache); > 909 neigh = ip_neigh_gw4(rt->dst.dev, > 910 rt_nexthop(rt, ip_addr->ip)); > 911 dst = &rt->dst; > 912 } > 913 if (IS_ERR(neigh)) { > 914 flow_offload_teardown(flow); > 915 return NF_DROP; > 916 } > 917 xmit.dest = neigh->ha; > 918 skb_dst_drop(skb); > 919 skb_dst_set_noref(skb, &rt->dst); > 920 break; > 921 } > 922 case FLOW_OFFLOAD_XMIT_DIRECT: > 923 xmit.outdev = dev_get_by_index_rcu(state->net, tuplehash->tuple.out.ifidx); > 924 if (!xmit.outdev) { > 925 flow_offload_teardown(flow); > 926 return NF_DROP; > 927 } > 928 xmit.dest = tuplehash->tuple.out.h_dest; > 929 xmit.source = tuplehash->tuple.out.h_source; > 930 break; > 931 default: > 932 WARN_ON_ONCE(1); > 933 return NF_DROP; > 934 } > 935 xmit.tuple = other_tuple; > 936 xmit.needs_gso_segment = tuplehash->tuple.needs_gso_segment; > 937 > 938 return nf_flow_queue_xmit(state->net, skb, &xmit); > 939 } > 940 > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests/wiki