CC: [email protected] TO: "Po, Liu," <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: e7b08814b16b80a0bf76eeca16317f8c2ed23b8c commit: d29bdd69ecdd70e8e3c2268fc8e188d6ab55e54a [5305/14131] net: schedule: add action gate offloading :::::: branch date: 3 days ago :::::: commit date: 4 weeks ago config: i386-randconfig-s001-20200601 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.1-243-gc100a7ab-dirty git checkout d29bdd69ecdd70e8e3c2268fc8e188d6ab55e54a # save the attached .config to linux build tree make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <[email protected]> sparse warnings: (new ones prefixed by >>) net/sched/cls_api.c:270:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] protocol @@ got unsigned int [usertype] protocol @@ net/sched/cls_api.c:270:22: sparse: expected restricted __be16 [usertype] protocol net/sched/cls_api.c:270:22: sparse: got unsigned int [usertype] protocol net/sched/cls_api.c:1727:16: sparse: sparse: incompatible types in comparison expression (different address spaces): net/sched/cls_api.c:1727:16: sparse: struct tcf_proto * net/sched/cls_api.c:1727:16: sparse: struct tcf_proto [noderef] <asn:4> * net/sched/cls_api.c:1827:20: sparse: sparse: incompatible types in comparison expression (different address spaces): net/sched/cls_api.c:1827:20: sparse: struct tcf_proto [noderef] <asn:4> * net/sched/cls_api.c:1827:20: sparse: struct tcf_proto * net/sched/cls_api.c:1789:25: sparse: sparse: incompatible types in comparison expression (different address spaces): net/sched/cls_api.c:1789:25: sparse: struct tcf_proto [noderef] <asn:4> * net/sched/cls_api.c:1789:25: sparse: struct tcf_proto * net/sched/cls_api.c:1809:16: sparse: sparse: incompatible types in comparison expression (different address spaces): net/sched/cls_api.c:1809:16: sparse: struct tcf_proto * net/sched/cls_api.c:1809:16: sparse: struct tcf_proto [noderef] <asn:4> * net/sched/cls_api.c:1874:25: sparse: sparse: restricted __be16 degrades to integer net/sched/cls_api.c:2538:50: sparse: sparse: restricted __be16 degrades to integer >> net/sched/cls_api.c:3719:9: sparse: sparse: context imbalance in >> 'tc_setup_flow_action' - different lock contexts for basic block # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d29bdd69ecdd70e8e3c2268fc8e188d6ab55e54a git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git remote update linux-next git checkout d29bdd69ecdd70e8e3c2268fc8e188d6ab55e54a vim +/tc_setup_flow_action +3719 net/sched/cls_api.c d29bdd69ecdd70 Po Liu 2020-05-01 3550 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3551 int tc_setup_flow_action(struct flow_action *flow_action, b15e7a6e8d31d6 Vlad Buslov 2020-02-17 3552 const struct tcf_exts *exts) 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3553 { 7a47281439ba00 Vlad Buslov 2020-02-17 3554 struct tc_action *act; 9838b20a7fb28c Vlad Buslov 2019-08-26 3555 int i, j, k, err = 0; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3556 0dfb2d82af4cd7 Jakub Kicinski 2020-03-19 3557 BUILD_BUG_ON(TCA_ACT_HW_STATS_ANY != FLOW_ACTION_HW_STATS_ANY); 0dfb2d82af4cd7 Jakub Kicinski 2020-03-19 3558 BUILD_BUG_ON(TCA_ACT_HW_STATS_IMMEDIATE != FLOW_ACTION_HW_STATS_IMMEDIATE); 0dfb2d82af4cd7 Jakub Kicinski 2020-03-19 3559 BUILD_BUG_ON(TCA_ACT_HW_STATS_DELAYED != FLOW_ACTION_HW_STATS_DELAYED); 44f8658017419d Jiri Pirko 2020-03-07 3560 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3561 if (!exts) 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3562 return 0; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3563 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3564 j = 0; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3565 tcf_exts_for_each_action(i, act, exts) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3566 struct flow_action_entry *entry; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3567 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3568 entry = &flow_action->entries[j]; 7a47281439ba00 Vlad Buslov 2020-02-17 3569 spin_lock_bh(&act->tcfa_lock); 2008495d81159a Jiri Pirko 2020-02-25 3570 err = tcf_act_get_cookie(entry, act); 2008495d81159a Jiri Pirko 2020-02-25 3571 if (err) 2008495d81159a Jiri Pirko 2020-02-25 3572 goto err_out_locked; 44f8658017419d Jiri Pirko 2020-03-07 3573 0dfb2d82af4cd7 Jakub Kicinski 2020-03-19 3574 entry->hw_stats = act->hw_stats; 44f8658017419d Jiri Pirko 2020-03-07 3575 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3576 if (is_tcf_gact_ok(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3577 entry->id = FLOW_ACTION_ACCEPT; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3578 } else if (is_tcf_gact_shot(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3579 entry->id = FLOW_ACTION_DROP; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3580 } else if (is_tcf_gact_trap(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3581 entry->id = FLOW_ACTION_TRAP; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3582 } else if (is_tcf_gact_goto_chain(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3583 entry->id = FLOW_ACTION_GOTO; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3584 entry->chain_index = tcf_gact_goto_chain_index(act); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3585 } else if (is_tcf_mirred_egress_redirect(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3586 entry->id = FLOW_ACTION_REDIRECT; 1158958a218bb5 Vlad Buslov 2019-09-13 3587 tcf_mirred_get_dev(entry, act); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3588 } else if (is_tcf_mirred_egress_mirror(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3589 entry->id = FLOW_ACTION_MIRRED; 1158958a218bb5 Vlad Buslov 2019-09-13 3590 tcf_mirred_get_dev(entry, act); 48e584ac583b08 John Hurley 2019-08-04 3591 } else if (is_tcf_mirred_ingress_redirect(act)) { 48e584ac583b08 John Hurley 2019-08-04 3592 entry->id = FLOW_ACTION_REDIRECT_INGRESS; 1158958a218bb5 Vlad Buslov 2019-09-13 3593 tcf_mirred_get_dev(entry, act); 48e584ac583b08 John Hurley 2019-08-04 3594 } else if (is_tcf_mirred_ingress_mirror(act)) { 48e584ac583b08 John Hurley 2019-08-04 3595 entry->id = FLOW_ACTION_MIRRED_INGRESS; 1158958a218bb5 Vlad Buslov 2019-09-13 3596 tcf_mirred_get_dev(entry, act); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3597 } else if (is_tcf_vlan(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3598 switch (tcf_vlan_action(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3599 case TCA_VLAN_ACT_PUSH: 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3600 entry->id = FLOW_ACTION_VLAN_PUSH; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3601 entry->vlan.vid = tcf_vlan_push_vid(act); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3602 entry->vlan.proto = tcf_vlan_push_proto(act); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3603 entry->vlan.prio = tcf_vlan_push_prio(act); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3604 break; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3605 case TCA_VLAN_ACT_POP: 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3606 entry->id = FLOW_ACTION_VLAN_POP; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3607 break; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3608 case TCA_VLAN_ACT_MODIFY: 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3609 entry->id = FLOW_ACTION_VLAN_MANGLE; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3610 entry->vlan.vid = tcf_vlan_push_vid(act); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3611 entry->vlan.proto = tcf_vlan_push_proto(act); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3612 entry->vlan.prio = tcf_vlan_push_prio(act); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3613 break; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3614 default: 9838b20a7fb28c Vlad Buslov 2019-08-26 3615 err = -EOPNOTSUPP; 7a47281439ba00 Vlad Buslov 2020-02-17 3616 goto err_out_locked; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3617 } 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3618 } else if (is_tcf_tunnel_set(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3619 entry->id = FLOW_ACTION_TUNNEL_ENCAP; 1158958a218bb5 Vlad Buslov 2019-09-13 3620 err = tcf_tunnel_encap_get_tunnel(entry, act); 1158958a218bb5 Vlad Buslov 2019-09-13 3621 if (err) 7a47281439ba00 Vlad Buslov 2020-02-17 3622 goto err_out_locked; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3623 } else if (is_tcf_tunnel_release(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3624 entry->id = FLOW_ACTION_TUNNEL_DECAP; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3625 } else if (is_tcf_pedit(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3626 for (k = 0; k < tcf_pedit_nkeys(act); k++) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3627 switch (tcf_pedit_cmd(act, k)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3628 case TCA_PEDIT_KEY_EX_CMD_SET: 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3629 entry->id = FLOW_ACTION_MANGLE; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3630 break; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3631 case TCA_PEDIT_KEY_EX_CMD_ADD: 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3632 entry->id = FLOW_ACTION_ADD; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3633 break; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3634 default: 9838b20a7fb28c Vlad Buslov 2019-08-26 3635 err = -EOPNOTSUPP; 7a47281439ba00 Vlad Buslov 2020-02-17 3636 goto err_out_locked; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3637 } 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3638 entry->mangle.htype = tcf_pedit_htype(act, k); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3639 entry->mangle.mask = tcf_pedit_mask(act, k); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3640 entry->mangle.val = tcf_pedit_val(act, k); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3641 entry->mangle.offset = tcf_pedit_offset(act, k); 0dfb2d82af4cd7 Jakub Kicinski 2020-03-19 3642 entry->hw_stats = act->hw_stats; 2c4b58dc75dd29 Petr Machata 2020-03-18 3643 entry = &flow_action->entries[++j]; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3644 } 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3645 } else if (is_tcf_csum(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3646 entry->id = FLOW_ACTION_CSUM; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3647 entry->csum_flags = tcf_csum_update_flags(act); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3648 } else if (is_tcf_skbedit_mark(act)) { 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3649 entry->id = FLOW_ACTION_MARK; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3650 entry->mark = tcf_skbedit_mark(act); a7a7be6087b075 Pieter Jansen van Vuuren 2019-05-04 3651 } else if (is_tcf_sample(act)) { a7a7be6087b075 Pieter Jansen van Vuuren 2019-05-04 3652 entry->id = FLOW_ACTION_SAMPLE; a7a7be6087b075 Pieter Jansen van Vuuren 2019-05-04 3653 entry->sample.trunc_size = tcf_sample_trunc_size(act); a7a7be6087b075 Pieter Jansen van Vuuren 2019-05-04 3654 entry->sample.truncate = tcf_sample_truncate(act); a7a7be6087b075 Pieter Jansen van Vuuren 2019-05-04 3655 entry->sample.rate = tcf_sample_rate(act); 4a5da47d5cb6ab Vlad Buslov 2019-09-13 3656 tcf_sample_get_group(entry, act); 8c8cfc6ed274e6 Pieter Jansen van Vuuren 2019-05-04 3657 } else if (is_tcf_police(act)) { 8c8cfc6ed274e6 Pieter Jansen van Vuuren 2019-05-04 3658 entry->id = FLOW_ACTION_POLICE; 8c8cfc6ed274e6 Pieter Jansen van Vuuren 2019-05-04 3659 entry->police.burst = tcf_police_tcfp_burst(act); 8c8cfc6ed274e6 Pieter Jansen van Vuuren 2019-05-04 3660 entry->police.rate_bytes_ps = 8c8cfc6ed274e6 Pieter Jansen van Vuuren 2019-05-04 3661 tcf_police_rate_bytes_ps(act); b57dc7c13ea90e Paul Blakey 2019-07-09 3662 } else if (is_tcf_ct(act)) { b57dc7c13ea90e Paul Blakey 2019-07-09 3663 entry->id = FLOW_ACTION_CT; b57dc7c13ea90e Paul Blakey 2019-07-09 3664 entry->ct.action = tcf_ct_action(act); b57dc7c13ea90e Paul Blakey 2019-07-09 3665 entry->ct.zone = tcf_ct_zone(act); edd5861e597b7e Paul Blakey 2020-03-12 3666 entry->ct.flow_table = tcf_ct_ft(act); 6749d59016981b John Hurley 2019-07-23 3667 } else if (is_tcf_mpls(act)) { 6749d59016981b John Hurley 2019-07-23 3668 switch (tcf_mpls_action(act)) { 6749d59016981b John Hurley 2019-07-23 3669 case TCA_MPLS_ACT_PUSH: 6749d59016981b John Hurley 2019-07-23 3670 entry->id = FLOW_ACTION_MPLS_PUSH; 6749d59016981b John Hurley 2019-07-23 3671 entry->mpls_push.proto = tcf_mpls_proto(act); 6749d59016981b John Hurley 2019-07-23 3672 entry->mpls_push.label = tcf_mpls_label(act); 6749d59016981b John Hurley 2019-07-23 3673 entry->mpls_push.tc = tcf_mpls_tc(act); 6749d59016981b John Hurley 2019-07-23 3674 entry->mpls_push.bos = tcf_mpls_bos(act); 6749d59016981b John Hurley 2019-07-23 3675 entry->mpls_push.ttl = tcf_mpls_ttl(act); 6749d59016981b John Hurley 2019-07-23 3676 break; 6749d59016981b John Hurley 2019-07-23 3677 case TCA_MPLS_ACT_POP: 6749d59016981b John Hurley 2019-07-23 3678 entry->id = FLOW_ACTION_MPLS_POP; 6749d59016981b John Hurley 2019-07-23 3679 entry->mpls_pop.proto = tcf_mpls_proto(act); 6749d59016981b John Hurley 2019-07-23 3680 break; 6749d59016981b John Hurley 2019-07-23 3681 case TCA_MPLS_ACT_MODIFY: 6749d59016981b John Hurley 2019-07-23 3682 entry->id = FLOW_ACTION_MPLS_MANGLE; 6749d59016981b John Hurley 2019-07-23 3683 entry->mpls_mangle.label = tcf_mpls_label(act); 6749d59016981b John Hurley 2019-07-23 3684 entry->mpls_mangle.tc = tcf_mpls_tc(act); 6749d59016981b John Hurley 2019-07-23 3685 entry->mpls_mangle.bos = tcf_mpls_bos(act); 6749d59016981b John Hurley 2019-07-23 3686 entry->mpls_mangle.ttl = tcf_mpls_ttl(act); 6749d59016981b John Hurley 2019-07-23 3687 break; 6749d59016981b John Hurley 2019-07-23 3688 default: 7a47281439ba00 Vlad Buslov 2020-02-17 3689 goto err_out_locked; 6749d59016981b John Hurley 2019-07-23 3690 } fb1b775a247ee8 John Hurley 2019-08-04 3691 } else if (is_tcf_skbedit_ptype(act)) { fb1b775a247ee8 John Hurley 2019-08-04 3692 entry->id = FLOW_ACTION_PTYPE; fb1b775a247ee8 John Hurley 2019-08-04 3693 entry->ptype = tcf_skbedit_ptype(act); 2ce124109c0fe0 Petr Machata 2020-03-19 3694 } else if (is_tcf_skbedit_priority(act)) { 2ce124109c0fe0 Petr Machata 2020-03-19 3695 entry->id = FLOW_ACTION_PRIORITY; 2ce124109c0fe0 Petr Machata 2020-03-19 3696 entry->priority = tcf_skbedit_priority(act); d29bdd69ecdd70 Po Liu 2020-05-01 3697 } else if (is_tcf_gate(act)) { d29bdd69ecdd70 Po Liu 2020-05-01 3698 entry->id = FLOW_ACTION_GATE; d29bdd69ecdd70 Po Liu 2020-05-01 3699 entry->gate.index = tcf_gate_index(act); d29bdd69ecdd70 Po Liu 2020-05-01 3700 entry->gate.prio = tcf_gate_prio(act); d29bdd69ecdd70 Po Liu 2020-05-01 3701 entry->gate.basetime = tcf_gate_basetime(act); d29bdd69ecdd70 Po Liu 2020-05-01 3702 entry->gate.cycletime = tcf_gate_cycletime(act); d29bdd69ecdd70 Po Liu 2020-05-01 3703 entry->gate.cycletimeext = tcf_gate_cycletimeext(act); d29bdd69ecdd70 Po Liu 2020-05-01 3704 entry->gate.num_entries = tcf_gate_num_entries(act); d29bdd69ecdd70 Po Liu 2020-05-01 3705 err = tcf_gate_get_entries(entry, act); d29bdd69ecdd70 Po Liu 2020-05-01 3706 if (err) d29bdd69ecdd70 Po Liu 2020-05-01 3707 goto err_out; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3708 } else { 9838b20a7fb28c Vlad Buslov 2019-08-26 3709 err = -EOPNOTSUPP; 7a47281439ba00 Vlad Buslov 2020-02-17 3710 goto err_out_locked; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3711 } 7a47281439ba00 Vlad Buslov 2020-02-17 3712 spin_unlock_bh(&act->tcfa_lock); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3713 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3714 if (!is_tcf_pedit(act)) 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3715 j++; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3716 } 9838b20a7fb28c Vlad Buslov 2019-08-26 3717 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3718 err_out: 5a6ff4b13d5985 Vlad Buslov 2019-08-26 @3719 if (err) 5a6ff4b13d5985 Vlad Buslov 2019-08-26 3720 tc_cleanup_flow_action(flow_action); 5a6ff4b13d5985 Vlad Buslov 2019-08-26 3721 9838b20a7fb28c Vlad Buslov 2019-08-26 3722 return err; 7a47281439ba00 Vlad Buslov 2020-02-17 3723 err_out_locked: 7a47281439ba00 Vlad Buslov 2020-02-17 3724 spin_unlock_bh(&act->tcfa_lock); 7a47281439ba00 Vlad Buslov 2020-02-17 3725 goto err_out; 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3726 } 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3727 EXPORT_SYMBOL(tc_setup_flow_action); 3a7b68617de749 Pablo Neira Ayuso 2019-02-02 3728 :::::: The code at line 3719 was first introduced by commit :::::: 5a6ff4b13d598573fc954f672cd2a267b76a01ec net: sched: take reference to action dev before calling offloads :::::: TO: Vlad Buslov <[email protected]> :::::: CC: David S. Miller <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
