]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
authorJakub Kicinski <kuba@kernel.org>
Thu, 12 May 2022 22:39:02 +0000 (15:39 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 May 2022 23:15:30 +0000 (16:15 -0700)
No conflicts.

Build issue in drivers/net/ethernet/sfc/ptp.c
  599018c56598 ("sfc: efx_default_channel_type APIs can be static")
  ed15b2f71594 ("net: sfc: fix memory leak due to ptp channel")
https://lore.kernel.org/all/20220510130556.52598fe2@canb.auug.org.au/

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
32 files changed:
1  2 
MAINTAINERS
drivers/net/dsa/ocelot/felix.c
drivers/net/ethernet/aquantia/atlantic/aq_ring.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/dec/tulip/tulip_core.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_idc.c
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_virtchnl.c
drivers/net/ethernet/mediatek/mtk_ppe.c
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot_vcap.c
drivers/net/ethernet/sfc/ef10.c
drivers/net/ethernet/sfc/efx_channels.c
drivers/net/ethernet/sfc/efx_channels.h
drivers/net/phy/micrel.c
drivers/net/phy/phy.c
drivers/net/wireless/mac80211_hwsim.c
net/core/skbuff.c
net/dsa/port.c
net/ipv4/ping.c
net/ipv4/route.c
net/mac80211/mlme.c
net/mac80211/rx.c
net/netlink/af_netlink.c
net/sched/act_pedit.c
net/sunrpc/xprtsock.c
net/tls/tls_device.c
net/wireless/nl80211.c
tools/testing/selftests/net/Makefile

diff --cc MAINTAINERS
Simple merge
Simple merge
index ea740210803f1026a1cc00b5b82224821ff1ef0f,8201ce7adb7777eea0390f615fe7b26b7ed06c3c..25129e723b5751078eaa77806318b378e71e6b19
@@@ -389,162 -339,13 +389,161 @@@ static void aq_rx_checksum(struct aq_ri
                __skb_incr_checksum_unnecessary(skb);
  }
  
 -#define AQ_SKB_ALIGN SKB_DATA_ALIGN(sizeof(struct skb_shared_info))
 -int aq_ring_rx_clean(struct aq_ring_s *self,
 -                   struct napi_struct *napi,
 -                   int *work_done,
 -                   int budget)
 +int aq_xdp_xmit(struct net_device *dev, int num_frames,
 +              struct xdp_frame **frames, u32 flags)
 +{
 +      struct aq_nic_s *aq_nic = netdev_priv(dev);
 +      unsigned int vec, i, drop = 0;
 +      int cpu = smp_processor_id();
 +      struct aq_nic_cfg_s *aq_cfg;
 +      struct aq_ring_s *ring;
 +
 +      aq_cfg = aq_nic_get_cfg(aq_nic);
 +      vec = cpu % aq_cfg->vecs;
 +      ring = aq_nic->aq_ring_tx[AQ_NIC_CFG_TCVEC2RING(aq_cfg, 0, vec)];
 +
 +      for (i = 0; i < num_frames; i++) {
 +              struct xdp_frame *xdpf = frames[i];
 +
 +              if (aq_nic_xmit_xdpf(aq_nic, ring, xdpf) == NETDEV_TX_BUSY)
 +                      drop++;
 +      }
 +
 +      return num_frames - drop;
 +}
 +
 +static struct sk_buff *aq_xdp_run_prog(struct aq_nic_s *aq_nic,
 +                                     struct xdp_buff *xdp,
 +                                     struct aq_ring_s *rx_ring,
 +                                     struct aq_ring_buff_s *buff)
 +{
 +      int result = NETDEV_TX_BUSY;
 +      struct aq_ring_s *tx_ring;
 +      struct xdp_frame *xdpf;
 +      struct bpf_prog *prog;
 +      u32 act = XDP_ABORTED;
 +      struct sk_buff *skb;
 +
 +      u64_stats_update_begin(&rx_ring->stats.rx.syncp);
 +      ++rx_ring->stats.rx.packets;
 +      rx_ring->stats.rx.bytes += xdp_get_buff_len(xdp);
 +      u64_stats_update_end(&rx_ring->stats.rx.syncp);
 +
 +      prog = READ_ONCE(rx_ring->xdp_prog);
 +      if (!prog)
 +              goto pass;
 +
 +      prefetchw(xdp->data_hard_start); /* xdp_frame write */
 +
 +      /* single buffer XDP program, but packet is multi buffer, aborted */
 +      if (xdp_buff_has_frags(xdp) && !prog->aux->xdp_has_frags)
 +              goto out_aborted;
 +
 +      act = bpf_prog_run_xdp(prog, xdp);
 +      switch (act) {
 +      case XDP_PASS:
 +pass:
 +              xdpf = xdp_convert_buff_to_frame(xdp);
 +              if (unlikely(!xdpf))
 +                      goto out_aborted;
 +              skb = xdp_build_skb_from_frame(xdpf, aq_nic->ndev);
 +              if (!skb)
 +                      goto out_aborted;
 +              u64_stats_update_begin(&rx_ring->stats.rx.syncp);
 +              ++rx_ring->stats.rx.xdp_pass;
 +              u64_stats_update_end(&rx_ring->stats.rx.syncp);
 +              aq_get_rxpages_xdp(buff, xdp);
 +              return skb;
 +      case XDP_TX:
 +              xdpf = xdp_convert_buff_to_frame(xdp);
 +              if (unlikely(!xdpf))
 +                      goto out_aborted;
 +              tx_ring = aq_nic->aq_ring_tx[rx_ring->idx];
 +              result = aq_nic_xmit_xdpf(aq_nic, tx_ring, xdpf);
 +              if (result == NETDEV_TX_BUSY)
 +                      goto out_aborted;
 +              u64_stats_update_begin(&rx_ring->stats.rx.syncp);
 +              ++rx_ring->stats.rx.xdp_tx;
 +              u64_stats_update_end(&rx_ring->stats.rx.syncp);
 +              aq_get_rxpages_xdp(buff, xdp);
 +              break;
 +      case XDP_REDIRECT:
 +              if (xdp_do_redirect(aq_nic->ndev, xdp, prog) < 0)
 +                      goto out_aborted;
 +              xdp_do_flush();
 +              u64_stats_update_begin(&rx_ring->stats.rx.syncp);
 +              ++rx_ring->stats.rx.xdp_redirect;
 +              u64_stats_update_end(&rx_ring->stats.rx.syncp);
 +              aq_get_rxpages_xdp(buff, xdp);
 +              break;
 +      default:
 +              fallthrough;
 +      case XDP_ABORTED:
 +out_aborted:
 +              u64_stats_update_begin(&rx_ring->stats.rx.syncp);
 +              ++rx_ring->stats.rx.xdp_aborted;
 +              u64_stats_update_end(&rx_ring->stats.rx.syncp);
 +              trace_xdp_exception(aq_nic->ndev, prog, act);
 +              bpf_warn_invalid_xdp_action(aq_nic->ndev, prog, act);
 +              break;
 +      case XDP_DROP:
 +              u64_stats_update_begin(&rx_ring->stats.rx.syncp);
 +              ++rx_ring->stats.rx.xdp_drop;
 +              u64_stats_update_end(&rx_ring->stats.rx.syncp);
 +              break;
 +      }
 +
 +      return ERR_PTR(-result);
 +}
 +
 +static bool aq_add_rx_fragment(struct device *dev,
 +                             struct aq_ring_s *ring,
 +                             struct aq_ring_buff_s *buff,
 +                             struct xdp_buff *xdp)
 +{
 +      struct skb_shared_info *sinfo = xdp_get_shared_info_from_buff(xdp);
 +      struct aq_ring_buff_s *buff_ = buff;
 +
 +      memset(sinfo, 0, sizeof(*sinfo));
 +      do {
 +              skb_frag_t *frag;
 +
 +              if (unlikely(sinfo->nr_frags >= MAX_SKB_FRAGS))
 +                      return true;
 +
 +              frag = &sinfo->frags[sinfo->nr_frags++];
 +              buff_ = &ring->buff_ring[buff_->next];
 +              dma_sync_single_range_for_cpu(dev,
 +                                            buff_->rxdata.daddr,
 +                                            buff_->rxdata.pg_off,
 +                                            buff_->len,
 +                                            DMA_FROM_DEVICE);
 +              skb_frag_off_set(frag, buff_->rxdata.pg_off);
 +              skb_frag_size_set(frag, buff_->len);
 +              sinfo->xdp_frags_size += buff_->len;
 +              __skb_frag_set_page(frag, buff_->rxdata.page);
 +
 +              buff_->is_cleaned = 1;
 +
 +              buff->is_ip_cso &= buff_->is_ip_cso;
 +              buff->is_udp_cso &= buff_->is_udp_cso;
 +              buff->is_tcp_cso &= buff_->is_tcp_cso;
 +              buff->is_cso_err |= buff_->is_cso_err;
 +
 +              if (page_is_pfmemalloc(buff_->rxdata.page))
 +                      xdp_buff_set_frag_pfmemalloc(xdp);
 +
 +      } while (!buff_->is_eop);
 +
 +      xdp_buff_set_frags_flag(xdp);
 +
 +      return false;
 +}
 +
 +static int __aq_ring_rx_clean(struct aq_ring_s *self, struct napi_struct *napi,
 +                            int *work_done, int budget)
  {
        struct net_device *ndev = aq_nic_get_ndev(self->aq_nic);
-       bool is_rsc_completed = true;
        int err = 0;
  
        for (; (self->sw_head != self->hw_head) && budget;
                       ALIGN(hdr_len, sizeof(long)));
  
                if (buff->len - hdr_len > 0) {
-                       skb_add_rx_frag(skb, 0, buff->rxdata.page,
+                       skb_add_rx_frag(skb, i++, buff->rxdata.page,
                                        buff->rxdata.pg_off + hdr_len,
                                        buff->len - hdr_len,
 -                                      AQ_CFG_RX_FRAME_MAX);
 +                                      self->frame_max);
                        page_ref_inc(buff->rxdata.page);
                }
  
Simple merge
index 7e941264ae215a3cb22dfd324bf1fe4170680693,3e3b2ed4cd5d9ec50ba46f5c14f18702505a9bcb..895c32bcc8b5e797d418191c95b17dd0ed166092
@@@ -45,8 -46,25 +46,10 @@@ void ice_send_event_to_aux(struct ice_p
        if (iadrv && iadrv->event_handler)
                iadrv->event_handler(pf, event);
        device_unlock(&pf->adev->dev);
+ finish:
+       mutex_unlock(&pf->adev_mutex);
  }
  
 -/**
 - * ice_find_vsi - Find the VSI from VSI ID
 - * @pf: The PF pointer to search in
 - * @vsi_num: The VSI ID to search for
 - */
 -static struct ice_vsi *ice_find_vsi(struct ice_pf *pf, u16 vsi_num)
 -{
 -      int i;
 -
 -      ice_for_each_vsi(pf, i)
 -              if (pf->vsi[i] && pf->vsi[i]->vsi_num == vsi_num)
 -                      return  pf->vsi[i];
 -      return NULL;
 -}
 -
  /**
   * ice_add_rdma_qset - Add Leaf Node for RDMA Qset
   * @pf: PF struct
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/dsa/port.c
Simple merge
diff --cc net/ipv4/ping.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge