Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
authorJakub Kicinski <kuba@kernel.org>
Mon, 15 Jul 2024 20:05:05 +0000 (13:05 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jul 2024 20:19:17 +0000 (13:19 -0700)
Merge in late fixes to prepare for the 6.11 net-next PR.

Conflicts:
  93c3a96c301f ("net: pse-pd: Do not return EOPNOSUPP if config is null")
  4cddb0f15ea9 ("net: ethtool: pse-pd: Fix possible null-deref")
  30d7b6727724 ("net: ethtool: Add new power limit get and set features")
https://lore.kernel.org/20240715123204.623520bb@canb.auug.org.au/

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
15 files changed:
1  2 
drivers/net/netconsole.c
drivers/net/pse-pd/pse_core.c
include/net/xfrm.h
net/ethtool/pse-pd.c
net/ipv4/esp4.c
net/ipv4/esp4_offload.c
net/ipv4/fib_semantics.c
net/ipv6/addrconf.c
net/ipv6/ip6_output.c
net/ipv6/route.c
net/packet/af_packet.c
net/xfrm/xfrm_input.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c

Simple merge
Simple merge
Simple merge
@@@ -256,39 -172,21 +256,43 @@@ static in
  ethnl_set_pse(struct ethnl_req_info *req_info, struct genl_info *info)
  {
        struct net_device *dev = req_info->dev;
 -      struct pse_control_config config = {};
        struct nlattr **tb = info->attrs;
        struct phy_device *phydev;
 +      int ret = 0;
  
        phydev = dev->phydev;
 +
 +      if (tb[ETHTOOL_A_C33_PSE_AVAIL_PW_LIMIT]) {
 +              unsigned int pw_limit;
 +
 +              pw_limit = nla_get_u32(tb[ETHTOOL_A_C33_PSE_AVAIL_PW_LIMIT]);
 +              ret = pse_ethtool_set_pw_limit(phydev->psec, info->extack,
 +                                             pw_limit);
 +              if (ret)
 +                      return ret;
 +      }
 +
        /* These values are already validated by the ethnl_pse_set_policy */
 -      if (tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL])
 -              config.podl_admin_control = nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]);
 -      if (tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL])
 -              config.c33_admin_control = nla_get_u32(tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]);
 -
 -      /* Return errno directly - PSE has no notification
 -       * pse_ethtool_set_config() will do nothing if the config is null
 -       */
 -      return pse_ethtool_set_config(phydev->psec, info->extack, &config);
 +      if (tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL] ||
 +          tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]) {
 +              struct pse_control_config config = {};
 +
-               if (pse_has_podl(phydev->psec))
++              if (tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL])
 +                      config.podl_admin_control = nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]);
-               if (pse_has_c33(phydev->psec))
++              if (tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL])
 +                      config.c33_admin_control = nla_get_u32(tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]);
 +
++              /* pse_ethtool_set_config() will do nothing if the config
++               * is zero
++               */
 +              ret = pse_ethtool_set_config(phydev->psec, info->extack,
 +                                           &config);
 +              if (ret)
 +                      return ret;
 +      }
 +
++      /* Return errno or zero - PSE has no notification */
 +      return ret;
  }
  
  const struct ethnl_request_ops ethnl_pse_request_ops = {
diff --cc net/ipv4/esp4.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -471,15 -471,9 +471,10 @@@ int xfrm_input(struct sk_buff *skb, in
        struct xfrm_offload *xo = xfrm_offload(skb);
        struct sec_path *sp;
  
 -      if (encap_type < 0 || (xo && xo->flags & XFRM_GRO)) {
 +      if (encap_type < 0 || (xo && (xo->flags & XFRM_GRO || encap_type == 0 ||
 +                                    encap_type == UDP_ENCAP_ESPINUDP))) {
                x = xfrm_input_state(skb);
  
-               if (unlikely(x->dir && x->dir != XFRM_SA_DIR_IN)) {
-                       XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEDIRERROR);
-                       goto drop;
-               }
                if (unlikely(x->km.state != XFRM_STATE_VALID)) {
                        if (x->km.state == XFRM_STATE_ACQ)
                                XFRM_INC_STATS(net, LINUX_MIB_XFRMACQUIREERROR);
Simple merge
Simple merge
Simple merge