1. 09 Jun, 2023 26 commits
  2. 08 Jun, 2023 14 commits
    • Jakub Kicinski's avatar
      Merge branch 'tools-ynl-generate-code-for-the-devlink-family' · 392c108b
      Jakub Kicinski authored
      Jakub Kicinski says:
      
      ====================
      tools: ynl: generate code for the devlink family
      
      Another chunk of changes to support more capabilities in the YNL
      code gen. Devlink brings in deep nesting and directional messages
      (requests and responses have different IDs). We need a healthy
      dose of codegen changes to support those (I wasn't planning to
      support code gen for "directional" families initially, but
      the importance of devlink and ethtool is undeniable).
      ====================
      
      Link: https://lore.kernel.org/r/20230607202403.1089925-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      392c108b
    • Jakub Kicinski's avatar
      tools: ynl: add sample for devlink · fff8660b
      Jakub Kicinski authored
      Add a sample to show off how to issue basic devlink requests.
      For added testing issue get requests while walking a dump.
      
      $ ./devlink
      netdevsim/netdevsim1:
          driver: netdevsim
          running fw:
              fw.mgmt: 10.20.30
          ...
      netdevsim/netdevsim2:
          driver: netdevsim
          running fw:
              fw.mgmt: 10.20.30
          ...
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      fff8660b
    • Jakub Kicinski's avatar
      tools: ynl: generate code for the devlink family · 5d1a30eb
      Jakub Kicinski authored
      Admittedly the devlink.yaml spec is fairly limitted,
      it only covers basic device get and info-get ops.
      That's sufficient to be useful (monitoring FW versions
      in the fleet). Plus it gives us a chance to exercise
      deep nesting and directional messaging in YNL.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5d1a30eb
    • Jakub Kicinski's avatar
      tools: ynl-gen: don't generate forward declarations for policies - regen · 0a947121
      Jakub Kicinski authored
      Renegerate code after dropping forward declarations for policies.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0a947121
    • Jakub Kicinski's avatar
      tools: ynl-gen: don't generate forward declarations for policies · 168dea20
      Jakub Kicinski authored
      Now that all nested types have structs and are sorted topologically
      there should be no need to generate forward declarations for policies.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      168dea20
    • Jakub Kicinski's avatar
      tools: ynl-gen: walk nested types in depth · eae7af21
      Jakub Kicinski authored
      So far we had only created structures for nested types nested
      directly in messages (second level of attrs so to speak).
      Walk types in depth to support deeper nesting.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      eae7af21
    • Jakub Kicinski's avatar
      tools: ynl-gen: inherit struct use info · 37487f93
      Jakub Kicinski authored
      We only render parse and netlink generation helpers as needed,
      to avoid generating dead code. Propagate the information from
      first- and second-layer attribute sets onto all children.
      Otherwise devlink won't work, it has a lot more levels of nesting.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      37487f93
    • Jakub Kicinski's avatar
      tools: ynl-gen: try to sort the types more intelligently · 6afaa0ef
      Jakub Kicinski authored
      We need to sort the structures to avoid the need for forward
      declarations. While at it remove the sort of structs when
      rendering, it doesn't do anything.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6afaa0ef
    • Jakub Kicinski's avatar
      tools: ynl-gen: enable code gen for directional specs · ff6db4b5
      Jakub Kicinski authored
      I think that user space code gen for directional specs
      works after recent changes. Let them through.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ff6db4b5
    • Jakub Kicinski's avatar
      tools: ynl-gen: refactor strmap helper generation · 6f115d45
      Jakub Kicinski authored
      Move generating strmap lookup function to a helper.
      No functional changes.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6f115d45
    • Jakub Kicinski's avatar
      tools: ynl-gen: use enum names in op strmap more carefully · 9858bfc2
      Jakub Kicinski authored
      In preparation for supporting families which use different msg
      ids to and from the kernel - make sure the ids in op strmap
      are correct. The map is expected to be used mostly for notifications,
      don't generate a separate map for the "to kernel" direction.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9858bfc2
    • Jakub Kicinski's avatar
      netlink: specs: devlink: fill in some details important for C · 8947e503
      Jakub Kicinski authored
      Python YNL is much more forgiving than the C code gen in terms
      of the spec completeness. Fill in a handful of devlink details
      to make the spec usable in C.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8947e503
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 449f6bc1
      Jakub Kicinski authored
      Cross-merge networking fixes after downstream PR.
      
      Conflicts:
      
      net/sched/sch_taprio.c
        d636fc5d ("net: sched: add rcu annotations around qdisc->qdisc_sleeping")
        dced11ef ("net/sched: taprio: don't overwrite "sch" variable in taprio_dump_class_stats()")
      
      net/ipv4/sysctl_net_ipv4.c
        e209fee4 ("net/ipv4: ping_group_range: allow GID from 2147483648 to 4294967294")
        ccce324d ("tcp: make the first N SYN RTO backoffs linear")
      https://lore.kernel.org/all/20230605100816.08d41a7b@canb.auug.org.au/
      
      No adjacent changes.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      449f6bc1
    • Linus Torvalds's avatar
      Merge tag 'net-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 25041a4c
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from can, wifi, netfilter, bluetooth and ebpf.
      
        Current release - regressions:
      
         - bpf: sockmap: avoid potential NULL dereference in
           sk_psock_verdict_data_ready()
      
         - wifi: iwlwifi: fix -Warray-bounds bug in iwl_mvm_wait_d3_notif()
      
         - phylink: actually fix ksettings_set() ethtool call
      
         - eth: dwmac-qcom-ethqos: fix a regression on EMAC < 3
      
        Current release - new code bugs:
      
         - wifi: mt76: fix possible NULL pointer dereference in
           mt7996_mac_write_txwi()
      
        Previous releases - regressions:
      
         - netfilter: fix NULL pointer dereference in nf_confirm_cthelper
      
         - wifi: rtw88/rtw89: correct PS calculation for SUPPORTS_DYNAMIC_PS
      
         - openvswitch: fix upcall counter access before allocation
      
         - bluetooth:
            - fix use-after-free in hci_remove_ltk/hci_remove_irk
            - fix l2cap_disconnect_req deadlock
      
         - nic: bnxt_en: prevent kernel panic when receiving unexpected
           PHC_UPDATE event
      
        Previous releases - always broken:
      
         - core: annotate rfs lockless accesses
      
         - sched: fq_pie: ensure reasonable TCA_FQ_PIE_QUANTUM values
      
         - netfilter: add null check for nla_nest_start_noflag() in
           nft_dump_basechain_hook()
      
         - bpf: fix UAF in task local storage
      
         - ipv4: ping_group_range: allow GID from 2147483648 to 4294967294
      
         - ipv6: rpl: fix route of death.
      
         - tcp: gso: really support BIG TCP
      
         - mptcp: fixes for user-space PM address advertisement
      
         - smc: avoid to access invalid RMBs' MRs in SMCRv1 ADD LINK CONT
      
         - can: avoid possible use-after-free when j1939_can_rx_register fails
      
         - batman-adv: fix UaF while rescheduling delayed work
      
         - eth: qede: fix scheduling while atomic
      
         - eth: ice: make writes to /dev/gnssX synchronous"
      
      * tag 'net-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (83 commits)
        bnxt_en: Implement .set_port / .unset_port UDP tunnel callbacks
        bnxt_en: Prevent kernel panic when receiving unexpected PHC_UPDATE event
        bnxt_en: Skip firmware fatal error recovery if chip is not accessible
        bnxt_en: Query default VLAN before VNIC setup on a VF
        bnxt_en: Don't issue AP reset during ethtool's reset operation
        bnxt_en: Fix bnxt_hwrm_update_rss_hash_cfg()
        net: bcmgenet: Fix EEE implementation
        eth: ixgbe: fix the wake condition
        eth: bnxt: fix the wake condition
        lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release()
        bpf: Add extra path pointer check to d_path helper
        net: sched: fix possible refcount leak in tc_chain_tmplt_add()
        net: sched: act_police: fix sparse errors in tcf_police_dump()
        net: openvswitch: fix upcall counter access before allocation
        net: sched: move rtm_tca_policy declaration to include file
        ice: make writes to /dev/gnssX synchronous
        net: sched: add rcu annotations around qdisc->qdisc_sleeping
        rfs: annotate lockless accesses to RFS sock flow table
        rfs: annotate lockless accesses to sk->sk_rxhash
        virtio_net: use control_buf for coalesce params
        ...
      25041a4c