1. 10 10月, 2019 2 次提交
  2. 21 8月, 2019 1 次提交
    • J
      net/smc: make sure EPOLLOUT is raised · 4651d180
      Jason Baron 提交于
      Currently, we are only explicitly setting SOCK_NOSPACE on a write timeout
      for non-blocking sockets. Epoll() edge-trigger mode relies on SOCK_NOSPACE
      being set when -EAGAIN is returned to ensure that EPOLLOUT is raised.
      Expand the setting of SOCK_NOSPACE to non-blocking sockets as well that can
      use SO_SNDTIMEO to adjust their write timeout. This mirrors the behavior
      that Eric Dumazet introduced for tcp sockets.
      Signed-off-by: NJason Baron <jbaron@akamai.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Ursula Braun <ubraun@linux.ibm.com>
      Cc: Karsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4651d180
  3. 06 8月, 2019 2 次提交
  4. 28 6月, 2019 1 次提交
  5. 27 6月, 2019 2 次提交
  6. 03 6月, 2019 1 次提交
  7. 21 5月, 2019 2 次提交
  8. 03 5月, 2019 1 次提交
  9. 28 4月, 2019 1 次提交
    • J
      genetlink: optionally validate strictly/dumps · ef6243ac
      Johannes Berg 提交于
      Add options to strictly validate messages and dump messages,
      sometimes perhaps validating dump messages non-strictly may
      be required, so add an option for that as well.
      
      Since none of this can really be applied to existing commands,
      set the options everwhere using the following spatch:
      
          @@
          identifier ops;
          expression X;
          @@
          struct genl_ops ops[] = {
          ...,
           {
                  .cmd = X,
          +       .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
                  ...
           },
          ...
          };
      
      For new commands one should just not copy the .validate 'opt-out'
      flags and thus get strict validation.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef6243ac
  10. 13 4月, 2019 8 次提交
  11. 12 4月, 2019 5 次提交
  12. 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
  13. 01 3月, 2019 1 次提交
  14. 22 2月, 2019 6 次提交
  15. 13 2月, 2019 6 次提交