1. 03 Apr, 2024 5 commits
    • Alexander Lobakin's avatar
      page_pool: check for PP direct cache locality later · 4a96a4e8
      Alexander Lobakin authored
      Since we have pool->p.napi (Jakub) and pool->cpuid (Lorenzo) to check
      whether it's safe to use direct recycling, we can use both globally for
      each page instead of relying solely on @allow_direct argument.
      Let's assume that @allow_direct means "I'm sure it's local, don't waste
      time rechecking this" and when it's false, try the mentioned params to
      still recycle the page directly. If neither is true, we'll lose some
      CPU cycles, but then it surely won't be hotpath. On the other hand,
      paths where it's possible to use direct cache, but not possible to
      safely set @allow_direct, will benefit from this move.
      The whole propagation of @napi_safe through a dozen of skb freeing
      functions can now go away, which saves us some stack space.
      Signed-off-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
      Link: https://lore.kernel.org/r/20240329165507.3240110-2-aleksander.lobakin@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4a96a4e8
    • Jonathan Neuschäfer's avatar
      rhashtable: Improve grammar · 8db2509f
      Jonathan Neuschäfer authored
      Change "a" to "an" according to the usual rules, fix an "if" that
      was mistyped as "in", improve grammar in "considerable slow" ->
      "considerably slower".
      Signed-off-by: default avatarJonathan Neuschäfer <j.neuschaefer@gmx.net>
      Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Link: https://lore.kernel.org/r/20240329-misc-rhashtable-v1-1-5862383ff798@gmx.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8db2509f
    • Jakub Kicinski's avatar
      tools: ynl: add ynl_dump_empty() helper · d6d647d7
      Jakub Kicinski authored
      Checking if dump is empty requires a couple of casts.
      Add a convenient wrapper.
      
      Add an example use in the netdev sample, loopback is always
      present so an empty dump is an error.
      Reviewed-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Link: https://lore.kernel.org/r/20240329181651.319326-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d6d647d7
    • Gustavo A. R. Silva's avatar
      nfp: Avoid -Wflex-array-member-not-at-end warnings · d88cabfd
      Gustavo A. R. Silva authored
      -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
      ready to enable it globally.
      
      There is currently an object (`tl`), at the beginning of multiple
      structures, that contains a flexible structure (`struct nfp_dump_tl`),
      for example:
      
      struct nfp_dumpspec_csr {
              struct nfp_dump_tl tl;
      
              ...
      
              __be32 register_width;  /* in bits */
      };
      
      So, in order to avoid ending up with flexible-array members in the
      middle of multiple other structs, we use the `struct_group_tagged()`
      helper to separate the flexible array from the rest of the members
      in the flexible structure:
      
      struct nfp_dump_tl {
      	struct_group_tagged(nfp_dump_tl_hdr, hdr,
      
      	... the rest of members
      
      	);
              char data[];
      };
      
      With the change described above, we now declare objects of the type of
      the tagged struct, in this case `struct nfp_dump_tl_hdr`, without
      embedding flexible arrays in the middle of another struct:
      
      struct nfp_dumpspec_csr {
              struct nfp_dump_tl_hdr tl;
      
      	...
      
              __be32 register_width;  /* in bits */
      };
      
      Also, use `container_of()` whenever we need to retrieve a pointer to
      the flexible structure, through which we can access the flexible
      array if needed.
      
      So, with these changes, fix 33 of the following warnings:
      drivers/net/ethernet/netronome/nfp/nfp_net_debugdump.c:58:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
      drivers/net/ethernet/netronome/nfp/nfp_net_debugdump.c:64:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
      drivers/net/ethernet/netronome/nfp/nfp_net_debugdump.c:70:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
      drivers/net/ethernet/netronome/nfp/nfp_net_debugdump.c:78:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
      drivers/net/ethernet/netronome/nfp/nfp_net_debugdump.c:87:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
      drivers/net/ethernet/netronome/nfp/nfp_net_debugdump.c:92:28: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
      
      Link: https://github.com/KSPP/linux/issues/202Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Link: https://lore.kernel.org/r/ZgYWlkxdrrieDYIu@neatSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d88cabfd
    • Paweł Owoc's avatar
      net: phy: aquantia: add support for AQR114C PHY ID · c278ec64
      Paweł Owoc authored
      Add support for AQR114C PHY ID. This PHY advertise 10G speed:
      SPEED(0x04): 0x6031
        capabilities: -400g +5g +2.5g -200g -25g -10g-xr -100g -40g -10g/1g -10
                      +100 +1000 -10-ts -2-tl +10g
      EXTABLE(0x0B): 0x40fc
        capabilities: -10g-cx4 -10g-lrm +10g-t +10g-kx4 +10g-kr +1000-t +1000-kx
                      +100-tx -10-t -p2mp -40g/100g -1000/100-t1 -25g -200g/400g
                      +2.5g/5g -1000-h
      
      but supports only up to 5G speed (as with AQR111/111B0).
      AQR111 init config is used to set max speed 5G.
      Signed-off-by: default avatarPaweł Owoc <frut3k7@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20240401145114.1699451-1-frut3k7@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c278ec64
  2. 02 Apr, 2024 12 commits
  3. 01 Apr, 2024 23 commits