From: kernel test robot <lkp@intel.com>
To: Daniel Golle <daniel@makrotopia.org>
Cc: oe-kbuild-all@lists.linux.dev, 0day robot <lkp@intel.com>
Subject: net/netfilter/nf_flow_table_offload.c:1080:60: error: incompatible type for argument 1 of 'dev_net'
Date: Thu, 30 Apr 2026 11:55:07 +0200 [thread overview]
Message-ID: <202604301130.yR12CSul-lkp@intel.com> (raw)
tree: https://github.com/intel-lab-lkp/linux/commits/Daniel-Golle/net-flow_offload-let-drivers-report-byte-counter-semantics/20260416-222603
head: dcabaf6b4b67a90cc0e0a91709c382a82c29f182
commit: 73b3a08b530034da560fff6b3270293990e1110d nf_flow_table: convert hw byte counts and update sub-interface stats
date: 2 weeks ago
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260430/202604301130.yR12CSul-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260430/202604301130.yR12CSul-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604301130.yR12CSul-lkp@intel.com/
All errors (new ones prefixed by >>):
net/netfilter/nf_flow_table_offload.c: In function 'flow_offload_update_encap_stats':
>> net/netfilter/nf_flow_table_offload.c:1080:60: error: incompatible type for argument 1 of 'dev_net'
1080 | dev = dev_get_by_index_rcu(dev_net(flow->ct->ct_net),
| ~~~~~~~~^~~~~~~~
| |
| possible_net_t
In file included from include/linux/netfilter.h:16,
from net/netfilter/nf_flow_table_offload.c:5:
include/linux/netdevice.h:2745:46: note: expected 'const struct net_device *' but argument is of type 'possible_net_t'
2745 | struct net *dev_net(const struct net_device *dev)
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
net/netfilter/nf_flow_table_offload.c:1095:60: error: incompatible type for argument 1 of 'dev_net'
1095 | dev = dev_get_by_index_rcu(dev_net(flow->ct->ct_net),
| ~~~~~~~~^~~~~~~~
| |
| possible_net_t
include/linux/netdevice.h:2745:46: note: expected 'const struct net_device *' but argument is of type 'possible_net_t'
2745 | struct net *dev_net(const struct net_device *dev)
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
vim +/dev_net +1080 net/netfilter/nf_flow_table_offload.c
1058
1059 /* Update sub-interface (VLAN, PPPoE) stats for hw-offloaded flows.
1060 *
1061 * The driver reports L3 (IP) bytes. Each sub-interface in the
1062 * software path sees the frame with the headers of all layers
1063 * BELOW it still present, so we add back inner-layer overhead.
1064 *
1065 * encap[] is ordered outermost to innermost, so walk from the
1066 * innermost layer outward, accumulating overhead as we go.
1067 */
1068 static void flow_offload_update_encap_stats(struct flow_offload *flow,
1069 struct flow_offload_tuple *tuple,
1070 bool rx, u64 pkts, u64 bytes)
1071 {
1072 struct net_device *dev;
1073 int inner_hlen = 0;
1074 int i;
1075
1076 for (i = tuple->encap_num - 1; i >= 0; i--) {
1077 if (tuple->in_vlan_ingress & BIT(i))
1078 continue;
1079
> 1080 dev = dev_get_by_index_rcu(dev_net(flow->ct->ct_net),
1081 tuple->encap_ifidx[i]);
1082 if (dev)
1083 flow_offload_encap_netstats(dev,
1084 tuple->encap[i].proto, rx,
1085 pkts,
1086 bytes + inner_hlen * pkts);
1087
1088 inner_hlen += flow_offload_encap_hlen(tuple, i);
1089 }
1090
1091 /* Bridge device sits outside all encap layers -- it sees
1092 * L3 bytes plus the full encap overhead.
1093 */
1094 if (tuple->bridge_ifidx) {
1095 dev = dev_get_by_index_rcu(dev_net(flow->ct->ct_net),
1096 tuple->bridge_ifidx);
1097 if (dev && dev->tstats)
1098 flow_offload_encap_netstats(dev, 0, rx, pkts,
1099 bytes + inner_hlen * pkts);
1100 }
1101 }
1102
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-04-30 9:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202604301130.yR12CSul-lkp@intel.com \
--to=lkp@intel.com \
--cc=daniel@makrotopia.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.