Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
authorJakub Kicinski <kuba@kernel.org>
Thu, 28 Oct 2021 17:43:58 +0000 (10:43 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Oct 2021 17:43:58 +0000 (10:43 -0700)
include/net/sock.h
  7b50ecfcc6cd ("net: Rename ->stream_memory_read to ->sock_is_readable")
  4c1e34c0dbff ("vsock: Enable y2038 safe timeval for timeout")

drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
  0daa55d033b0 ("octeontx2-af: cn10k: debugfs for dumping LMTST map table")
  e77bcdd1f639 ("octeontx2-af: Display all enabled PF VF rsrc_alloc entries.")

Adjacent code addition in both cases, keep both.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
39 files changed:
1  2 
MAINTAINERS
drivers/infiniband/hw/mlx5/mr.c
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
drivers/net/ethernet/intel/ice/ice_ptp.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
drivers/net/ethernet/microchip/lan743x_main.c
drivers/net/ethernet/nxp/lpc_eth.c
drivers/net/ethernet/realtek/r8169_main.c
drivers/net/usb/lan78xx.c
drivers/net/usb/usbnet.c
drivers/net/vmxnet3/vmxnet3_drv.c
drivers/net/xen-netfront.c
include/linux/bpf.h
include/linux/filter.h
include/net/cfg80211.h
include/net/mptcp.h
include/net/sock.h
include/net/tls.h
kernel/bpf/arraymap.c
kernel/bpf/core.c
net/batman-adv/bridge_loop_avoidance.c
net/core/dev.c
net/core/net-sysfs.c
net/core/skbuff.c
net/ipv4/tcp.c
net/mac80211/mesh.c
net/mptcp/options.c
net/smc/af_smc.c
net/smc/smc_llc.c
net/tls/tls_main.c
net/tls/tls_sw.c
net/wireless/core.c
net/wireless/scan.c
net/wireless/util.c

diff --cc MAINTAINERS
Simple merge
@@@ -1342,9 -1339,8 +1342,8 @@@ static struct mlx5_ib_mr *reg_create(st
                goto err_2;
        }
        mr->mmkey.type = MLX5_MKEY_MR;
-       mr->desc_size = sizeof(struct mlx5_mtt);
        mr->umem = umem;
 -      set_mr_fields(dev, mr, umem->length, access_flags);
 +      set_mr_fields(dev, mr, umem->length, access_flags, iova);
        kvfree(in);
  
        mlx5_ib_dbg(dev, "mkey = 0x%x\n", mr->mmkey.key);
@@@ -226,96 -226,73 +226,163 @@@ static const struct file_operations rvu
  
  static void print_nix_qsize(struct seq_file *filp, struct rvu_pfvf *pfvf);
  
 +#define LMT_MAPTBL_ENTRY_SIZE 16
 +/* Dump LMTST map table */
 +static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
 +                                             char __user *buffer,
 +                                             size_t count, loff_t *ppos)
 +{
 +      struct rvu *rvu = filp->private_data;
 +      u64 lmt_addr, val, tbl_base;
 +      int pf, vf, num_vfs, hw_vfs;
 +      void __iomem *lmt_map_base;
 +      int index = 0, off = 0;
 +      int bytes_not_copied;
 +      int buf_size = 10240;
 +      char *buf;
 +
 +      /* don't allow partial reads */
 +      if (*ppos != 0)
 +              return 0;
 +
 +      buf = kzalloc(buf_size, GFP_KERNEL);
 +      if (!buf)
 +              return -ENOSPC;
 +
 +      tbl_base = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_MAP_BASE);
 +
 +      lmt_map_base = ioremap_wc(tbl_base, 128 * 1024);
 +      if (!lmt_map_base) {
 +              dev_err(rvu->dev, "Failed to setup lmt map table mapping!!\n");
 +              kfree(buf);
 +              return false;
 +      }
 +
 +      off +=  scnprintf(&buf[off], buf_size - 1 - off,
 +                        "\n\t\t\t\t\tLmtst Map Table Entries");
 +      off +=  scnprintf(&buf[off], buf_size - 1 - off,
 +                        "\n\t\t\t\t\t=======================");
 +      off +=  scnprintf(&buf[off], buf_size - 1 - off, "\nPcifunc\t\t\t");
 +      off +=  scnprintf(&buf[off], buf_size - 1 - off, "Table Index\t\t");
 +      off +=  scnprintf(&buf[off], buf_size - 1 - off,
 +                        "Lmtline Base (word 0)\t\t");
 +      off +=  scnprintf(&buf[off], buf_size - 1 - off,
 +                        "Lmt Map Entry (word 1)");
 +      off += scnprintf(&buf[off], buf_size - 1 - off, "\n");
 +      for (pf = 0; pf < rvu->hw->total_pfs; pf++) {
 +              off += scnprintf(&buf[off], buf_size - 1 - off, "PF%d  \t\t\t",
 +                                  pf);
 +
 +              index = pf * rvu->hw->total_vfs * LMT_MAPTBL_ENTRY_SIZE;
 +              off += scnprintf(&buf[off], buf_size - 1 - off, " 0x%llx\t\t",
 +                               (tbl_base + index));
 +              lmt_addr = readq(lmt_map_base + index);
 +              off += scnprintf(&buf[off], buf_size - 1 - off,
 +                               " 0x%016llx\t\t", lmt_addr);
 +              index += 8;
 +              val = readq(lmt_map_base + index);
 +              off += scnprintf(&buf[off], buf_size - 1 - off, " 0x%016llx\n",
 +                               val);
 +              /* Reading num of VFs per PF */
 +              rvu_get_pf_numvfs(rvu, pf, &num_vfs, &hw_vfs);
 +              for (vf = 0; vf < num_vfs; vf++) {
 +                      index = (pf * rvu->hw->total_vfs * 16) +
 +                              ((vf + 1)  * LMT_MAPTBL_ENTRY_SIZE);
 +                      off += scnprintf(&buf[off], buf_size - 1 - off,
 +                                          "PF%d:VF%d  \t\t", pf, vf);
 +                      off += scnprintf(&buf[off], buf_size - 1 - off,
 +                                       " 0x%llx\t\t", (tbl_base + index));
 +                      lmt_addr = readq(lmt_map_base + index);
 +                      off += scnprintf(&buf[off], buf_size - 1 - off,
 +                                       " 0x%016llx\t\t", lmt_addr);
 +                      index += 8;
 +                      val = readq(lmt_map_base + index);
 +                      off += scnprintf(&buf[off], buf_size - 1 - off,
 +                                       " 0x%016llx\n", val);
 +              }
 +      }
 +      off +=  scnprintf(&buf[off], buf_size - 1 - off, "\n");
 +
 +      bytes_not_copied = copy_to_user(buffer, buf, off);
 +      kfree(buf);
 +
 +      iounmap(lmt_map_base);
 +      if (bytes_not_copied)
 +              return -EFAULT;
 +
 +      *ppos = off;
 +      return off;
 +}
 +
 +RVU_DEBUG_FOPS(lmtst_map_table, lmtst_map_table_display, NULL);
 +
+ static void get_lf_str_list(struct rvu_block block, int pcifunc,
+                           char *lfs)
+ {
+       int lf = 0, seq = 0, len = 0, prev_lf = block.lf.max;
+       for_each_set_bit(lf, block.lf.bmap, block.lf.max) {
+               if (lf >= block.lf.max)
+                       break;
+               if (block.fn_map[lf] != pcifunc)
+                       continue;
+               if (lf == prev_lf + 1) {
+                       prev_lf = lf;
+                       seq = 1;
+                       continue;
+               }
+               if (seq)
+                       len += sprintf(lfs + len, "-%d,%d", prev_lf, lf);
+               else
+                       len += (len ? sprintf(lfs + len, ",%d", lf) :
+                                     sprintf(lfs + len, "%d", lf));
+               prev_lf = lf;
+               seq = 0;
+       }
+       if (seq)
+               len += sprintf(lfs + len, "-%d", prev_lf);
+       lfs[len] = '\0';
+ }
+ static int get_max_column_width(struct rvu *rvu)
+ {
+       int index, pf, vf, lf_str_size = 12, buf_size = 256;
+       struct rvu_block block;
+       u16 pcifunc;
+       char *buf;
+       buf = kzalloc(buf_size, GFP_KERNEL);
+       if (!buf)
+               return -ENOMEM;
+       for (pf = 0; pf < rvu->hw->total_pfs; pf++) {
+               for (vf = 0; vf <= rvu->hw->total_vfs; vf++) {
+                       pcifunc = pf << 10 | vf;
+                       if (!pcifunc)
+                               continue;
+                       for (index = 0; index < BLK_COUNT; index++) {
+                               block = rvu->hw->block[index];
+                               if (!strlen(block.name))
+                                       continue;
+                               get_lf_str_list(block, pcifunc, buf);
+                               if (lf_str_size <= strlen(buf))
+                                       lf_str_size = strlen(buf) + 1;
+                       }
+               }
+       }
+       kfree(buf);
+       return lf_str_size;
+ }
  /* Dumps current provisioning status of all RVU block LFs */
  static ssize_t rvu_dbg_rsrc_attach_status(struct file *filp,
                                          char __user *buffer,
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1210,10 -1207,8 +1210,10 @@@ struct proto 
        unsigned int            inuse_idx;
  #endif
  
 +      int                     (*forward_alloc_get)(const struct sock *sk);
 +
        bool                    (*stream_memory_free)(const struct sock *sk, int wake);
-       bool                    (*stream_memory_read)(const struct sock *sk);
+       bool                    (*sock_is_readable)(struct sock *sk);
        /* Memory pressure */
        void                    (*enter_memory_pressure)(struct sock *sk);
        void                    (*leave_memory_pressure)(struct sock *sk);
@@@ -2850,8 -2820,10 +2850,14 @@@ void sock_set_sndtimeo(struct sock *sk
  
  int sock_bind_add(struct sock *sk, struct sockaddr *addr, int addr_len);
  
 +int sock_get_timeout(long timeo, void *optval, bool old_timeval);
 +int sock_copy_user_timeval(struct __kernel_sock_timeval *tv,
 +                         sockptr_t optval, int optlen, bool old_timeval);
 +
+ static inline bool sk_is_readable(struct sock *sk)
+ {
+       if (sk->sk_prot->sock_is_readable)
+               return sk->sk_prot->sock_is_readable(sk);
+       return false;
+ }
  #endif        /* _SOCK_H */
Simple merge
Simple merge
Simple merge
diff --cc net/core/dev.c
Simple merge
Simple merge
Simple merge
diff --cc net/ipv4/tcp.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge