Defined in 3 files as a function:
- include/net/ip_fib.h, line 316 (as a function)
- include/net/ip_fib.h, line 374 (as a function)
- tools/testing/selftests/bpf/progs/fib_lookup.c, line 18 (as a function)
Referenced in 11 files:
- drivers/infiniband/core/cma.c, line 1616
- drivers/net/ethernet/marvell/prestera/prestera_router.c, line 257
- include/uapi/linux/bpf.h, line 6046
- net/core/filter.c, line 6342
- net/ipv4/fib_frontend.c
- net/ipv4/fib_semantics.c, line 1233
- net/ipv4/netfilter/ipt_rpfilter.c, line 38
- net/ipv4/netfilter/nft_fib_ipv4.c, line 133
- net/ipv4/route.c
- tools/include/uapi/linux/bpf.h, line 6046
- tools/testing/selftests/bpf/prog_tests/fib_lookup.c
Smatch caller information:
net/ipv4/fib_frontend.c __fib_validate_source() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | net | 4096-ptr_max |
| PARAM_VALUE | 1 | flp | 3126066341975281664 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_dscp | 0,4-252 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_iif | s32min-(-1),1-s32max |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_oif | 0 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_scope | 0 |
| PARAM_VALUE | 1 | flp->daddr | 1-4294967294 |
| PARAM_VALUE | 2 | res | 2602186971906322432 |
| PARAM_VALUE | 3 | flags | 0 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| USER_DATA | 1 | flp->__fl_common.flowic_dscp | 0,4-252[c] |
| UNITS | 0 | net | unit_byte |
| HALF_LOCKED2 | rcu_read |
net/ipv4/fib_frontend.c __fib_validate_source() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | net | 4096-ptr_max |
| PARAM_VALUE | 1 | flp | 3126066341975281664 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_dscp | 0,4-252 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_iif | s32min-(-1),1-s32max |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_scope | 0 |
| PARAM_VALUE | 1 | flp->daddr | 1-4294967294 |
| PARAM_VALUE | 2 | res | 2602186971906322432 |
| PARAM_VALUE | 2 | res->fi | 4096-ptr_max |
| PARAM_VALUE | 2 | res->nhc | 4096-ptr_max |
| PARAM_VALUE | 2 | res->type | 1-2 |
| PARAM_VALUE | 3 | flags | 2 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| USER_DATA | 1 | flp->__fl_common.flowic_dscp | 0,4-252[c] |
| UNITS | 0 | net | unit_byte |
| HALF_LOCKED2 | rcu_read |
net/ipv4/fib_frontend.c fib_compute_spec_dst() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 1 | flp | 3378410442382344192 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_dscp | 0,4-252 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_iif | 1 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_oif | 0 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_scope | 0 |
| PARAM_VALUE | 1 | flp->saddr | 0 |
| PARAM_VALUE | 2 | res | 2826639845108072448 |
| PARAM_VALUE | 3 | flags | 0 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| UNITS | 0 | net | unit_byte |
| HALF_LOCKED2 | bh |
drivers/infiniband/core/cma.c validate_ipv4_net_dev() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 1 | flp | 3184021617337679872 |
| PARAM_VALUE | 1 | flp->daddr | 1-4294967294 |
| PARAM_VALUE | 1 | flp->saddr | 1-4294967294 |
| PARAM_VALUE | 2 | res | 3163209054265364480 |
| PARAM_VALUE | 3 | flags | 0 |
| MEM_ZERO | 1 | flp | |
| TASK_NOT_RUNNING | |||
| LOCK2 | global &lock | ||
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &pool->lock |
net/core/filter.c bpf_ipv4_fib_lookup() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | net | 4096-ptr_max |
| PARAM_VALUE | 0 | net->user_ns | 4096-ptr_max |
| PARAM_VALUE | 1 | flp | 8899565637439016960 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_dscp | 0,4-252 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_scope | 0 |
| PARAM_VALUE | 2 | res | 7934135933787738112 |
| PARAM_VALUE | 3 | flags | 1 |
| CAPPED_DATA | 0 | net->user_ns->uid_map.nr_extents | 1 |
| DATA_SOURCE | 0 | net | $0 |
| UNITS | 0 | net | unit_byte |
net/ipv4/fib_semantics.c fib_check_nh_v4_gw() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 1 | flp | 7310024992303976448 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_dscp | 0 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_iif | 1 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_scope | 253-254 |
| PARAM_VALUE | 1 | flp->saddr | 0 |
| PARAM_VALUE | 2 | res | 2092853150581448704 |
| PARAM_VALUE | 3 | flags | 2 |
| DATA_SOURCE | 0 | net | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| USER_DATA | 1 | flp->__fl_common.flowic_oif | s32min-s32max |
| UNITS | 0 | net | unit_byte |
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | global &rtnl_mutex | ||
| HALF_LOCKED2 | 0 | &net->rtnl_mutex |
drivers/net/ethernet/marvell/prestera/prestera_router.c prestera_util_kern_get_route() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | net | 1824583183996030976 |
| PARAM_VALUE | 1 | flp | 5389390310833381376 |
| PARAM_VALUE | 2 | res | 2653457679283806208 |
| PARAM_VALUE | 3 | flags | 0 |
| DATA_SOURCE | 2 | res | $0 |
| MEM_ZERO | 1 | flp | |
| LOCK2 | &pool->lock | ||
| LOCK2 | global &rtnl_mutex |
net/ipv4/netfilter/nft_fib_ipv4.c nft_fib4_eval() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 1 | flp | 7300944142296932352 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_dscp | 0,4-252 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_oif | 0 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_scope | 0 |
| PARAM_VALUE | 1 | flp->saddr | 0-4294967294 |
| PARAM_VALUE | 2 | res | 6972221991158444032 |
| PARAM_VALUE | 3 | flags | 2 |
net/ipv4/netfilter/ipt_rpfilter.c rpfilter_lookup_reverse() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 1 | flp | 7372093485568909312 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_dscp | 0,4-252 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_iif | 1 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_scope | 0 |
| PARAM_VALUE | 1 | flp->saddr | 0-4294967294 |
| PARAM_VALUE | 2 | res | 604639393722220544 |
| PARAM_VALUE | 3 | flags | 2 |
| DATA_SOURCE | 0 | net | $0 |
| DATA_SOURCE | 1 | flp | $1 |
| MEM_ZERO | 1 | flp | |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &table->lock | ||
| HALF_LOCKED2 | bh | ||
| HALF_LOCKED2 | rcu_read |
net/ipv4/route.c __ip_do_redirect() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 1 | flp | 13317736350126080,296812173255839744,4338008797665587200 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_dscp | 0,4-252 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_flags | 0 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_iif | 1 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_l3mdev | 0 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_multipath_hash | 0 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_scope | 0,253 |
| PARAM_VALUE | 1 | flp->uli.ports.dport | 0 |
| PARAM_VALUE | 1 | flp->uli.ports.sport | 0 |
| PARAM_VALUE | 2 | res | 4240960965415747584 |
| PARAM_VALUE | 3 | flags | 0 |
| DATA_SOURCE | 1 | flp | $2 |
| NOSPEC | 1 | flp->saddr | |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| USER_DATA | 1 | flp->__fl_common.flowic_dscp | 0,4-252[c] |
| USER_DATA | 1 | flp->daddr | 0-u32max[u] |
| USER_DATA | 1 | flp->saddr | 0-u32max |
| UNITS | 0 | net | unit_byte |
net/ipv4/route.c __ip_rt_update_pmtu() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | net | 4096-ptr_max |
| PARAM_VALUE | 1 | flp | 2162147593913135104,2492317193869529088,2953694614799618048,4751902985513521152 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_dscp | 0,4-252 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_flags | 0-1 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_iif | 1 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_l3mdev | 0 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_multipath_hash | 0 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_scope | 0,253 |
| PARAM_VALUE | 1 | flp->uli.ports.dport | 0 |
| PARAM_VALUE | 1 | flp->uli.ports.sport | 0 |
| PARAM_VALUE | 2 | res | 7684502420953772032 |
| PARAM_VALUE | 3 | flags | 0 |
| CAPPED_DATA | 0 | net->ipv4.ip_rt_min_pmtu | 1 |
| DATA_SOURCE | 0 | net | r dst_dev_net_rcu |
| DATA_SOURCE | 1 | flp | $1 |
| NOSPEC | 1 | flp->saddr | |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| USER_DATA | 1 | flp->__fl_common.flowic_dscp | 0,4-252[c] |
| USER_DATA | 1 | flp->daddr | 0-u32max[u] |
| USER_DATA | 1 | flp->saddr | 0-u32max |
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | &sk->sk_lock.slock |
net/ipv4/route.c ip_route_input_slow() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | net | 4096-ptr_max |
| PARAM_VALUE | 0 | net->ipv4.fib_rules_require_fldissect | 0 |
| PARAM_VALUE | 1 | flp | 7958795568858234880 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_dscp | 0,4-252 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_oif | 0 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_scope | 0 |
| PARAM_VALUE | 1 | flp->daddr | 1-4294967294 |
| PARAM_VALUE | 1 | flp->saddr | 1-4294967294 |
| PARAM_VALUE | 2 | res | 1393448695251062784,8909405672440926208 |
| PARAM_VALUE | 2 | res->fi | 0 |
| PARAM_VALUE | 2 | res->table | 0 |
| PARAM_VALUE | 3 | flags | 0 |
| DATA_SOURCE | 2 | res | $5 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| USER_DATA | 1 | flp->__fl_common.flowic_dscp | 0,4-252[c] |
| UNITS | 0 | net | unit_byte |
| LOCK2 | rcu_read |
net/ipv4/route.c ip_route_output_key_hash_rcu() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | net->ipv4.fqdir->f->frag_expire | 0,663510801442193408,1753052602134376448,4007388366431105024,8876081723503042560 |
| PARAM_VALUE | 0 | net->ipv4.fqdir->f->qsize | 0,304,320 |
| PARAM_VALUE | 0 | net->loopback_dev->rtnl_link_ops->maxtype | 0-6,8-10,15,18,20,22,24,34,50 |
| PARAM_VALUE | 1 | flp | 4096-ptr_max |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_iif | 1 |
| PARAM_VALUE | 1 | flp->daddr | 1-u32max |
| PARAM_VALUE | 2 | res | 429988801965383680,8909405672440926208 |
| PARAM_VALUE | 2 | res->dscp | 0 |
| PARAM_VALUE | 2 | res->fa_head | 0 |
| PARAM_VALUE | 2 | res->fi | 0 |
| PARAM_VALUE | 2 | res->nh_sel | 0 |
| PARAM_VALUE | 2 | res->nhc | 0 |
| PARAM_VALUE | 2 | res->prefix | 0 |
| PARAM_VALUE | 2 | res->prefixlen | 0 |
| PARAM_VALUE | 2 | res->scope | 0 |
| PARAM_VALUE | 2 | res->table | 0 |
| PARAM_VALUE | 2 | res->tclassid | 0 |
| PARAM_VALUE | 2 | res->type | 0 |
| PARAM_VALUE | 3 | flags | 0 |
| BUF_SIZE | 0 | net | (-1),1-s32max |
| BUF_SIZE | 0 | net | (-1),1-s32max |
| CAPPED_DATA | 1 | flp->__fl_common.flowic_oif | 1 |
| DATA_SOURCE | 0 | net | $0 |
| DATA_SOURCE | 1 | flp | $1 |
| DATA_SOURCE | 2 | res | $2 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HOST_DATA | 1 | flp->uli.ports.sport | 0-u16max[c] |
| USER_DATA | 1 | flp->__fl_common.flowic_dscp | 0,4-252[c] |
| USER_DATA | 1 | flp->__fl_common.flowic_oif | s32min-(-1),1-s32max[c] |
| USER_DATA | 1 | flp->__fl_common.flowic_proto | 0-255 |
| USER_DATA | 1 | flp->daddr | 1-u32max |
| USER_DATA | 1 | flp->saddr | 0-4294967294 |
| USER_DATA | 1 | flp->uli.ports.dport | 0-u16max |
| USER_DATA | 1 | flp->uli.ports.sport | 0-u16max[u] |
| UNITS | 0 | net | unit_byte |
| LOCK2 | rcu_read | ||
| HALF_LOCKED2 | 0 | &net->ipv4.mfc_mutex | |
| HALF_LOCKED2 | 0 | &net->ipv6.mfc_mutex | |
| HALF_LOCKED2 | 0 | &net->rtnl_mutex |
net/ipv4/route.c ip_rt_get_source() -> fib_lookup()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 1 | flp | 7328118558744899584 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_dscp | 0,4-252 |
| PARAM_VALUE | 1 | flp->__fl_common.flowic_scope | 0 |
| PARAM_VALUE | 2 | res | 7985481728897236992 |
| PARAM_VALUE | 3 | flags | 0 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| UNITS | 0 | net | unit_byte |
| LOCK2 | rcu_read |