Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
authorDavid S. Miller <davem@davemloft.net>
Thu, 25 Mar 2021 22:31:22 +0000 (15:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Mar 2021 22:31:22 +0000 (15:31 -0700)
Signed-off-by: David S. Miller <davem@davemloft.net>
63 files changed:
1  2 
MAINTAINERS
drivers/atm/fore200e.c
drivers/net/dsa/b53/b53_common.c
drivers/net/dsa/bcm_sf2.c
drivers/net/dsa/mt7530.c
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/ice/ice_txrx.c
drivers/net/ethernet/intel/ice/ice_xsk.c
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/igb/igb_ptp.c
drivers/net/ethernet/intel/igc/igc_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
drivers/net/ethernet/mellanox/mlx5/core/sf/hw_table.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.c
drivers/net/ethernet/pensando/ionic/ionic_txrx.c
drivers/net/ethernet/realtek/r8169_main.c
drivers/net/ipa/ipa_cmd.c
drivers/net/ipa/ipa_qmi.c
drivers/net/phy/phylink.c
include/linux/bpf.h
include/linux/netdevice.h
include/linux/skbuff.h
include/net/netfilter/nf_tables.h
include/net/nexthop.h
include/uapi/linux/bpf.h
include/uapi/linux/psample.h
init/Kconfig
kernel/bpf/bpf_inode_storage.c
kernel/bpf/verifier.c
kernel/fork.c
net/core/dev.c
net/core/drop_monitor.c
net/core/filter.c
net/core/flow_dissector.c
net/ipv4/route.c
net/ipv6/route.c
net/mptcp/options.c
net/netfilter/nf_flow_table_core.c
net/netfilter/nf_tables_api.c
net/sched/cls_api.c
net/sched/cls_flower.c
net/tipc/node.c
tools/lib/bpf/Makefile
tools/lib/bpf/btf_dump.c
tools/lib/bpf/libbpf.c
tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
tools/testing/selftests/net/mptcp/mptcp_join.sh

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -682,12 -678,8 +682,13 @@@ void npc_read_mcam_entry(struct rvu *rv
                         u8 *intf, u8 *ena);
  bool is_mac_feature_supported(struct rvu *rvu, int pf, int feature);
  u32  rvu_cgx_get_fifolen(struct rvu *rvu);
+ void *rvu_first_cgx_pdata(struct rvu *rvu);
  
 +int npc_get_nixlf_mcam_index(struct npc_mcam *mcam, u16 pcifunc, int nixlf,
 +                           int type);
 +bool is_mcam_entry_enabled(struct rvu *rvu, struct npc_mcam *mcam, int blkaddr,
 +                         int index);
 +
  /* CPT APIs */
  int rvu_cpt_lf_teardown(struct rvu *rvu, u16 pcifunc, int lf, int slot);
  
@@@ -2314,49 -2295,17 +2314,59 @@@ static int __parse_cls_flower(struct ml
                if (match.mask->flags)
                        *match_level = MLX5_MATCH_L4;
        }
 +      if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ICMP)) {
 +              struct flow_match_icmp match;
  
 +              flow_rule_match_icmp(rule, &match);
 +              switch (ip_proto) {
 +              case IPPROTO_ICMP:
 +                      if (!(MLX5_CAP_GEN(priv->mdev, flex_parser_protocols) &
 +                            MLX5_FLEX_PROTO_ICMP))
 +                              return -EOPNOTSUPP;
 +                      MLX5_SET(fte_match_set_misc3, misc_c_3, icmp_type,
 +                               match.mask->type);
 +                      MLX5_SET(fte_match_set_misc3, misc_v_3, icmp_type,
 +                               match.key->type);
 +                      MLX5_SET(fte_match_set_misc3, misc_c_3, icmp_code,
 +                               match.mask->code);
 +                      MLX5_SET(fte_match_set_misc3, misc_v_3, icmp_code,
 +                               match.key->code);
 +                      break;
 +              case IPPROTO_ICMPV6:
 +                      if (!(MLX5_CAP_GEN(priv->mdev, flex_parser_protocols) &
 +                            MLX5_FLEX_PROTO_ICMPV6))
 +                              return -EOPNOTSUPP;
 +                      MLX5_SET(fte_match_set_misc3, misc_c_3, icmpv6_type,
 +                               match.mask->type);
 +                      MLX5_SET(fte_match_set_misc3, misc_v_3, icmpv6_type,
 +                               match.key->type);
 +                      MLX5_SET(fte_match_set_misc3, misc_c_3, icmpv6_code,
 +                               match.mask->code);
 +                      MLX5_SET(fte_match_set_misc3, misc_v_3, icmpv6_code,
 +                               match.key->code);
 +                      break;
 +              default:
 +                      NL_SET_ERR_MSG_MOD(extack,
 +                                         "Code and type matching only with ICMP and ICMPv6");
 +                      netdev_err(priv->netdev,
 +                                 "Code and type matching only with ICMP and ICMPv6\n");
 +                      return -EINVAL;
 +              }
 +              if (match.mask->code || match.mask->type) {
 +                      *match_level = MLX5_MATCH_L4;
 +                      spec->match_criteria_enable |= MLX5_MATCH_MISC_PARAMETERS_3;
 +              }
 +      }
+       /* Currenlty supported only for MPLS over UDP */
+       if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_MPLS) &&
+           !netif_is_bareudp(filter_dev)) {
+               NL_SET_ERR_MSG_MOD(extack,
+                                  "Matching on MPLS is supported only for MPLS over UDP");
+               netdev_err(priv->netdev,
+                          "Matching on MPLS is supported only for MPLS over UDP\n");
+               return -EOPNOTSUPP;
+       }
        return 0;
  }
  
@@@ -5,7 -5,8 +5,9 @@@
  #include "priv.h"
  #include "sf.h"
  #include "mlx5_ifc_vhca_event.h"
 +#include "ecpf.h"
+ #include "vhca_event.h"
+ #include "mlx5_core.h"
  
  struct mlx5_sf_hw {
        u32 usr_sfnum;
@@@ -1082,16 -1077,19 +1082,19 @@@ static int ionic_tx(struct ionic_queue 
  
  static int ionic_tx_descs_needed(struct ionic_queue *q, struct sk_buff *skb)
  {
 -      int sg_elems = q->lif->qtype_info[IONIC_QTYPE_TXQ].max_sg_elems;
        struct ionic_tx_stats *stats = q_to_tx_stats(q);
+       int ndescs;
        int err;
  
-       /* If TSO, need roundup(skb->len/mss) descs */
+       /* Each desc is mss long max, so a descriptor for each gso_seg */
        if (skb_is_gso(skb))
-               return (skb->len / skb_shinfo(skb)->gso_size) + 1;
+               ndescs = skb_shinfo(skb)->gso_segs;
+       else
+               ndescs = 1;
  
 -      if (skb_shinfo(skb)->nr_frags <= sg_elems)
 +      /* If non-TSO, just need 1 desc and nr_frags sg elems */
 +      if (skb_shinfo(skb)->nr_frags <= q->max_sg_elems)
-               return 1;
+               return ndescs;
  
        /* Too many frags, so linearize */
        err = skb_linearize(skb);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -11,18 -10,9 +10,16 @@@ enum 
        PSAMPLE_ATTR_GROUP_SEQ,
        PSAMPLE_ATTR_SAMPLE_RATE,
        PSAMPLE_ATTR_DATA,
-       PSAMPLE_ATTR_TUNNEL,
-       /* commands attributes */
        PSAMPLE_ATTR_GROUP_REFCOUNT,
+       PSAMPLE_ATTR_TUNNEL,
  
 +      PSAMPLE_ATTR_PAD,
 +      PSAMPLE_ATTR_OUT_TC,            /* u16 */
 +      PSAMPLE_ATTR_OUT_TC_OCC,        /* u64, bytes */
 +      PSAMPLE_ATTR_LATENCY,           /* u64, nanoseconds */
 +      PSAMPLE_ATTR_TIMESTAMP,         /* u64, nanoseconds */
 +      PSAMPLE_ATTR_PROTO,             /* u16 */
 +
        __PSAMPLE_ATTR_MAX
  };
  
diff --cc init/Kconfig
Simple merge
Simple merge
@@@ -6056,22 -5876,10 +6060,23 @@@ static int retrieve_ptr_limit(const str
                if (mask_to_left)
                        *ptr_limit = MAX_BPF_STACK + off;
                else
-                       *ptr_limit = -off;
-               return 0;
+                       *ptr_limit = -off - 1;
+               return *ptr_limit >= max ? -ERANGE : 0;
 +      case PTR_TO_MAP_KEY:
 +              /* Currently, this code is not exercised as the only use
 +               * is bpf_for_each_map_elem() helper which requires
 +               * bpf_capble. The code has been tested manually for
 +               * future use.
 +               */
 +              if (mask_to_left) {
 +                      *ptr_limit = ptr_reg->umax_value + ptr_reg->off;
 +              } else {
 +                      off = ptr_reg->smin_value + ptr_reg->off;
 +                      *ptr_limit = ptr_reg->map_ptr->key_size - off;
 +              }
 +              return 0;
        case PTR_TO_MAP_VALUE:
+               max = ptr_reg->map_ptr->value_size;
                if (mask_to_left) {
                        *ptr_limit = ptr_reg->umax_value + ptr_reg->off;
                } else {
diff --cc kernel/fork.c
Simple merge
diff --cc net/core/dev.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/tipc/node.c
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -203,14 -209,10 +209,16 @@@ struct struct_with_embedded_stuff 
        } r[5];
        struct struct_in_struct s[10];
        int t[11];
+       struct struct_in_array (*u)[2];
+       struct_in_array_t *v;
  };
  
 +struct float_struct {
 +      float f;
 +      const double *d;
 +      volatile long double *ld;
 +};
 +
  struct root_struct {
        enum e1 _1;
        enum e2 _2;