1. 05 4月, 2019 2 次提交
  2. 29 3月, 2019 3 次提交
  3. 27 3月, 2019 1 次提交
  4. 25 3月, 2019 6 次提交
  5. 22 3月, 2019 1 次提交
    • J
      genetlink: make policy common to family · 3b0f31f2
      Johannes Berg 提交于
      Since maxattr is common, the policy can't really differ sanely,
      so make it common as well.
      
      The only user that did in fact manage to make a non-common policy
      is taskstats, which has to be really careful about it (since it's
      still using a common maxattr!). This is no longer supported, but
      we can fake it using pre_doit.
      
      This reduces the size of e.g. nl80211.o (which has lots of commands):
      
         text	   data	    bss	    dec	    hex	filename
       398745	  14323	   2240	 415308	  6564c	net/wireless/nl80211.o (before)
       397913	  14331	   2240	 414484	  65314	net/wireless/nl80211.o (after)
      --------------------------------
         -832      +8       0    -824
      
      Which is obviously just 8 bytes for each command, and an added 8
      bytes for the new policy pointer. I'm not sure why the ops list is
      counted as .text though.
      
      Most of the code transformations were done using the following spatch:
          @ops@
          identifier OPS;
          expression POLICY;
          @@
          struct genl_ops OPS[] = {
          ...,
           {
          -	.policy = POLICY,
           },
          ...
          };
      
          @@
          identifier ops.OPS;
          expression ops.POLICY;
          identifier fam;
          expression M;
          @@
          struct genl_family fam = {
                  .ops = OPS,
                  .maxattr = M,
          +       .policy = POLICY,
                  ...
          };
      
      This also gets rid of devlink_nl_cmd_region_read_dumpit() accessing
      the cb->data as ops, which we want to change in a later genl patch.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b0f31f2
  6. 05 3月, 2019 2 次提交
  7. 02 3月, 2019 1 次提交
    • J
      devlink: fix kdoc · eeaadd82
      Jakub Kicinski 提交于
      devlink suffers from a few kdoc warnings:
      
      net/core/devlink.c:5292: warning: Function parameter or member 'dev' not described in 'devlink_register'
      net/core/devlink.c:5351: warning: Function parameter or member 'port_index' not described in 'devlink_port_register'
      net/core/devlink.c:5753: warning: Function parameter or member 'parent_resource_id' not described in 'devlink_resource_register'
      net/core/devlink.c:5753: warning: Function parameter or member 'size_params' not described in 'devlink_resource_register'
      net/core/devlink.c:5753: warning: Excess function parameter 'top_hierarchy' description in 'devlink_resource_register'
      net/core/devlink.c:5753: warning: Excess function parameter 'reload_required' description in 'devlink_resource_register'
      net/core/devlink.c:5753: warning: Excess function parameter 'parent_reosurce_id' description in 'devlink_resource_register'
      net/core/devlink.c:6451: warning: Function parameter or member 'region' not described in 'devlink_region_snapshot_create'
      net/core/devlink.c:6451: warning: Excess function parameter 'devlink_region' description in 'devlink_region_snapshot_create'
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eeaadd82
  8. 27 2月, 2019 4 次提交
  9. 22 2月, 2019 2 次提交
  10. 18 2月, 2019 2 次提交
    • J
      ethtool: add compat for flash update · 4eceba17
      Jakub Kicinski 提交于
      If driver does not support ethtool flash update operation
      call into devlink.
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4eceba17
    • J
      devlink: add flash update command · 76726ccb
      Jakub Kicinski 提交于
      Add devlink flash update command. Advanced NICs have firmware
      stored in flash and often cryptographically secured. Updating
      that flash is handled by management firmware. Ethtool has a
      flash update command which served us well, however, it has two
      shortcomings:
       - it takes rtnl_lock unnecessarily - really flash update has
         nothing to do with networking, so using a networking device
         as a handle is suboptimal, which leads us to the second one:
       - it requires a functioning netdev - in case device enters an
         error state and can't spawn a netdev (e.g. communication
         with the device fails) there is no netdev to use as a handle
         for flashing.
      
      Devlink already has the ability to report the firmware versions,
      now with the ability to update the firmware/flash we will be
      able to recover devices in bad state.
      
      To enable updates of sub-components of the FW allow passing
      component name.  This name should correspond to one of the
      versions reported in devlink info.
      
      v1: - replace target id with component name (Jiri).
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      76726ccb
  11. 15 2月, 2019 2 次提交
  12. 13 2月, 2019 2 次提交
  13. 12 2月, 2019 3 次提交
  14. 09 2月, 2019 1 次提交
    • J
      devlink: publish params only after driver init is done · 7c62cfb8
      Jiri Pirko 提交于
      Currently, user can do dump or get of param values right after the
      devlink params are registered. However the driver may not be initialized
      which is an issue. The same problem happens during notification
      upon param registration. Allow driver to publish devlink params
      whenever it is ready to handle get() ops. Note that this cannot
      be resolved by init reordering, as the "driverinit" params have
      to be available before the driver is initialized (it needs the param
      values there).
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Cc: Michael Chan <michael.chan@broadcom.com>
      Cc: Tariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c62cfb8
  15. 08 2月, 2019 8 次提交