Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
authorJakub Kicinski <kuba@kernel.org>
Thu, 22 Oct 2020 16:51:41 +0000 (09:51 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 Oct 2020 16:51:41 +0000 (09:51 -0700)
Daniel Borkmann says:

====================
pull-request: bpf 2020-10-22

1) Fix enforcing NULL check in verifier for new helper return types of
   RET_PTR_TO_{BTF_ID,MEM_OR_BTF_ID}_OR_NULL, from Martin KaFai Lau.

2) Fix bpf_redirect_neigh() helper API before it becomes frozen by adding
   nexthop information as argument, from Toke Høiland-Jørgensen.

3) Guard & fix compilation of bpf_tail_call_static() when __bpf__ arch is
   not defined by compiler or clang too old, from Daniel Borkmann.

4) Remove misplaced break after return in attach_type_to_prog_type(), from
   Tom Rix.
====================

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
36 files changed:
Documentation/devicetree/bindings/net/socionext-netsec.txt
drivers/net/dsa/bcm_sf2.c
drivers/net/dsa/ocelot/seville_vsc9953.c
drivers/net/ethernet/aquantia/atlantic/aq_nic.c
drivers/net/ethernet/chelsio/inline_crypto/Kconfig
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
drivers/net/ethernet/cisco/enic/enic_ethtool.c
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c
drivers/net/ethernet/korina.c
drivers/net/ethernet/mediatek/Kconfig
drivers/net/ethernet/realtek/r8169_main.c
drivers/net/ethernet/sfc/efx_common.c
drivers/net/ethernet/sfc/rx_common.c
drivers/net/ethernet/socionext/netsec.c
drivers/net/virtio_net.c
drivers/net/wan/hdlc.c
drivers/net/wan/hdlc_raw_eth.c
drivers/net/wan/lmc/lmc_proto.c
drivers/nfc/st21nfca/core.c
drivers/nfc/trf7970a.c
include/linux/netlink.h
net/core/rtnetlink.c
net/dsa/tag_ksz.c
net/ipv4/nexthop.c
net/mpls/mpls_iptunnel.c
net/mptcp/Kconfig
net/mptcp/options.c
net/nfc/netlink.c
net/sched/act_ct.c
net/sched/act_tunnel_key.c
net/sched/cls_api.c
tools/testing/selftests/net/config
tools/testing/selftests/net/mptcp/config
tools/testing/selftests/net/rtnetlink.sh

index 9d6c9fe..a3c1dff 100644 (file)
@@ -30,7 +30,9 @@ Optional properties: (See ethernet.txt file in the same directory)
 - max-frame-size: See ethernet.txt in the same directory.
 
 The MAC address will be determined using the optional properties
-defined in ethernet.txt.
+defined in ethernet.txt. The 'phy-mode' property is required, but may
+be set to the empty string if the PHY configuration is programmed by
+the firmware or set by hardware straps, and needs to be preserved.
 
 Example:
        eth0: ethernet@522d0000 {
index 0b5b2b3..1e9a0ad 100644 (file)
@@ -54,7 +54,7 @@ static void bcm_sf2_recalc_clock(struct dsa_switch *ds)
        unsigned long new_rate;
        unsigned int ports_active;
        /* Frequenty in Mhz */
-       const unsigned long rate_table[] = {
+       static const unsigned long rate_table[] = {
                59220000,
                60820000,
                62500000,
index 76576cf..1d420c4 100644 (file)
@@ -1181,7 +1181,7 @@ static const struct felix_info seville_info_vsc9953 = {
        .stats_layout           = vsc9953_stats_layout,
        .num_stats              = ARRAY_SIZE(vsc9953_stats_layout),
        .vcap                   = vsc9953_vcap_props,
-       .shared_queue_sz        = 2048 * 1024,
+       .shared_queue_sz        = 256 * 1024,
        .num_mact_rows          = 2048,
        .num_ports              = 10,
        .mdio_bus_alloc         = vsc9953_mdio_bus_alloc,
index 0f865da..bf5e0e9 100644 (file)
@@ -1163,7 +1163,6 @@ int aq_nic_set_link_ksettings(struct aq_nic_s *self,
                default:
                        err = -1;
                        goto err_exit;
-               break;
                }
                if (!(self->aq_nic_cfg.aq_hw_caps->link_speed_msk & rate)) {
                        err = -1;
index 7dfa573..bc06e83 100644 (file)
@@ -16,6 +16,7 @@ if CHELSIO_INLINE_CRYPTO
 config CRYPTO_DEV_CHELSIO_TLS
        tristate "Chelsio Crypto Inline TLS Driver"
        depends on CHELSIO_T4
+       depends on TLS
        depends on TLS_TOE
        help
          Support Chelsio Inline TLS with Chelsio crypto accelerator.
index 05520dc..ec4f790 100644 (file)
@@ -92,11 +92,13 @@ static void chtls_sock_release(struct kref *ref)
 static struct net_device *chtls_find_netdev(struct chtls_dev *cdev,
                                            struct sock *sk)
 {
+       struct adapter *adap = pci_get_drvdata(cdev->pdev);
        struct net_device *ndev = cdev->ports[0];
 #if IS_ENABLED(CONFIG_IPV6)
        struct net_device *temp;
        int addr_type;
 #endif
+       int i;
 
        switch (sk->sk_family) {
        case PF_INET:
@@ -127,8 +129,12 @@ static struct net_device *chtls_find_netdev(struct chtls_dev *cdev,
                return NULL;
 
        if (is_vlan_dev(ndev))
-               return vlan_dev_real_dev(ndev);
-       return ndev;
+               ndev = vlan_dev_real_dev(ndev);
+
+       for_each_port(adap, i)
+               if (cdev->ports[i] == ndev)
+                       return ndev;
+       return NULL;
 }
 
 static void assign_rxopt(struct sock *sk, unsigned int opt)
@@ -477,7 +483,6 @@ void chtls_destroy_sock(struct sock *sk)
        chtls_purge_write_queue(sk);
        free_tls_keyid(sk);
        kref_put(&csk->kref, chtls_sock_release);
-       csk->cdev = NULL;
        if (sk->sk_family == AF_INET)
                sk->sk_prot = &tcp_prot;
 #if IS_ENABLED(CONFIG_IPV6)
@@ -736,14 +741,13 @@ void chtls_listen_stop(struct chtls_dev *cdev, struct sock *sk)
 
 #if IS_ENABLED(CONFIG_IPV6)
        if (sk->sk_family == PF_INET6) {
-               struct chtls_sock *csk;
+               struct net_device *ndev = chtls_find_netdev(cdev, sk);
                int addr_type = 0;
 
-               csk = rcu_dereference_sk_user_data(sk);
                addr_type = ipv6_addr_type((const struct in6_addr *)
                                          &sk->sk_v6_rcv_saddr);
                if (addr_type != IPV6_ADDR_ANY)
-                       cxgb4_clip_release(csk->egress_dev, (const u32 *)
+                       cxgb4_clip_release(ndev, (const u32 *)
                                           &sk->sk_v6_rcv_saddr, 1);
        }
 #endif
@@ -1157,6 +1161,9 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
        ndev = n->dev;
        if (!ndev)
                goto free_dst;
+       if (is_vlan_dev(ndev))
+               ndev = vlan_dev_real_dev(ndev);
+
        port_id = cxgb4_port_idx(ndev);
 
        csk = chtls_sock_create(cdev);
index 2e9acae..9fb5ca6 100644 (file)
@@ -902,9 +902,9 @@ static int chtls_skb_copy_to_page_nocache(struct sock *sk,
        return 0;
 }
 
-static int csk_mem_free(struct chtls_dev *cdev, struct sock *sk)
+static bool csk_mem_free(struct chtls_dev *cdev, struct sock *sk)
 {
-       return (cdev->max_host_sndbuf - sk->sk_wmem_queued);
+       return (cdev->max_host_sndbuf - sk->sk_wmem_queued > 0);
 }
 
 static int csk_wait_memory(struct chtls_dev *cdev,
@@ -1240,6 +1240,7 @@ int chtls_sendpage(struct sock *sk, struct page *page,
        copied = 0;
        csk = rcu_dereference_sk_user_data(sk);
        cdev = csk->cdev;
+       lock_sock(sk);
        timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT);
 
        err = sk_stream_wait_connect(sk, &timeo);
index a4dd52b..1a9803f 100644 (file)
@@ -434,7 +434,6 @@ static int enic_grxclsrule(struct enic *enic, struct ethtool_rxnfc *cmd)
                break;
        default:
                return -EINVAL;
-               break;
        }
 
        fsp->h_u.tcp_ip4_spec.ip4src = flow_get_u32_src(&n->keys);
index 1f7fe6b..8148f79 100644 (file)
@@ -4235,8 +4235,13 @@ static int handle_change_mac_rsp(union ibmvnic_crq *crq,
                dev_err(dev, "Error %ld in CHANGE_MAC_ADDR_RSP\n", rc);
                goto out;
        }
+       /* crq->change_mac_addr.mac_addr is the requested one
+        * crq->change_mac_addr_rsp.mac_addr is the returned valid one.
+        */
        ether_addr_copy(netdev->dev_addr,
                        &crq->change_mac_addr_rsp.mac_addr[0]);
+       ether_addr_copy(adapter->mac_addr,
+                       &crq->change_mac_addr_rsp.mac_addr[0]);
 out:
        complete(&adapter->fw_done);
        return rc;
index de563cf..4b93ba1 100644 (file)
@@ -350,7 +350,6 @@ static s32 ixgbe_calc_eeprom_checksum_X540(struct ixgbe_hw *hw)
                if (ixgbe_read_eerd_generic(hw, pointer, &length)) {
                        hw_dbg(hw, "EEPROM read failed\n");
                        return IXGBE_ERR_EEPROM;
-                       break;
                }
 
                /* Skip pointer section if length is invalid. */
index af441d6..bf48f0d 100644 (file)
@@ -1113,7 +1113,7 @@ out:
        return rc;
 
 probe_err_register:
-       kfree(KSEG0ADDR(lp->td_ring));
+       kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
 probe_err_td_ring:
        iounmap(lp->tx_dma_regs);
 probe_err_dma_tx:
@@ -1133,7 +1133,7 @@ static int korina_remove(struct platform_device *pdev)
        iounmap(lp->eth_regs);
        iounmap(lp->rx_dma_regs);
        iounmap(lp->tx_dma_regs);
-       kfree(KSEG0ADDR(lp->td_ring));
+       kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
 
        unregister_netdev(bif->dev);
        free_netdev(bif->dev);
index 62a820b..3362b14 100644 (file)
@@ -17,6 +17,7 @@ config NET_MEDIATEK_SOC
 config NET_MEDIATEK_STAR_EMAC
        tristate "MediaTek STAR Ethernet MAC support"
        select PHYLIB
+       select REGMAP_MMIO
        help
          This driver supports the ethernet MAC IP first used on
          MediaTek MT85** SoCs.
index 7d366b0..3b6ddc7 100644 (file)
@@ -4694,7 +4694,7 @@ static int rtl8169_close(struct net_device *dev)
 
        phy_disconnect(tp->phydev);
 
-       pci_free_irq(pdev, 0, tp);
+       free_irq(pci_irq_vector(pdev, 0), tp);
 
        dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray,
                          tp->RxPhyAddr);
@@ -4745,8 +4745,8 @@ static int rtl_open(struct net_device *dev)
 
        rtl_request_firmware(tp);
 
-       retval = pci_request_irq(pdev, 0, rtl8169_interrupt, NULL, tp,
-                                dev->name);
+       retval = request_irq(pci_irq_vector(pdev, 0), rtl8169_interrupt,
+                            IRQF_NO_THREAD | IRQF_SHARED, dev->name, tp);
        if (retval < 0)
                goto err_release_fw_2;
 
@@ -4763,7 +4763,7 @@ out:
        return retval;
 
 err_free_irq:
-       pci_free_irq(pdev, 0, tp);
+       free_irq(pci_irq_vector(pdev, 0), tp);
 err_release_fw_2:
        rtl_release_firmware(tp);
        rtl8169_rx_clear(tp);
index 72a3f0e..de797e1 100644 (file)
@@ -1014,6 +1014,7 @@ int efx_init_struct(struct efx_nic *efx,
        efx->num_mac_stats = MC_CMD_MAC_NSTATS;
        BUILD_BUG_ON(MC_CMD_MAC_NSTATS - 1 != MC_CMD_MAC_GENERATION_END);
        mutex_init(&efx->mac_lock);
+       init_rwsem(&efx->filter_sem);
 #ifdef CONFIG_RFS_ACCEL
        mutex_init(&efx->rps_mutex);
        spin_lock_init(&efx->rps_hash_lock);
index 5e29284..19cf7ca 100644 (file)
@@ -797,7 +797,6 @@ int efx_probe_filters(struct efx_nic *efx)
 {
        int rc;
 
-       init_rwsem(&efx->filter_sem);
        mutex_lock(&efx->mac_lock);
        down_write(&efx->filter_sem);
        rc = efx->type->filter_table_probe(efx);
index 806eb65..1503cc9 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/acpi.h>
 #include <linux/of_mdio.h>
+#include <linux/of_net.h>
 #include <linux/etherdevice.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
@@ -1833,6 +1834,14 @@ static const struct net_device_ops netsec_netdev_ops = {
 static int netsec_of_probe(struct platform_device *pdev,
                           struct netsec_priv *priv, u32 *phy_addr)
 {
+       int err;
+
+       err = of_get_phy_mode(pdev->dev.of_node, &priv->phy_interface);
+       if (err) {
+               dev_err(&pdev->dev, "missing required property 'phy-mode'\n");
+               return err;
+       }
+
        priv->phy_np = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
        if (!priv->phy_np) {
                dev_err(&pdev->dev, "missing required property 'phy-handle'\n");
@@ -1859,6 +1868,14 @@ static int netsec_acpi_probe(struct platform_device *pdev,
        if (!IS_ENABLED(CONFIG_ACPI))
                return -ENODEV;
 
+       /* ACPI systems are assumed to configure the PHY in firmware, so
+        * there is really no need to discover the PHY mode from the DSDT.
+        * Since firmware is known to exist in the field that configures the
+        * PHY correctly but passes the wrong mode string in the phy-mode
+        * device property, we have no choice but to ignore it.
+        */
+       priv->phy_interface = PHY_INTERFACE_MODE_NA;
+
        ret = device_property_read_u32(&pdev->dev, "phy-channel", phy_addr);
        if (ret) {
                dev_err(&pdev->dev,
@@ -1995,13 +2012,6 @@ static int netsec_probe(struct platform_device *pdev)
        priv->msg_enable = NETIF_MSG_TX_ERR | NETIF_MSG_HW | NETIF_MSG_DRV |
                           NETIF_MSG_LINK | NETIF_MSG_PROBE;
 
-       priv->phy_interface = device_get_phy_mode(&pdev->dev);
-       if ((int)priv->phy_interface < 0) {
-               dev_err(&pdev->dev, "missing required property 'phy-mode'\n");
-               ret = -ENODEV;
-               goto free_ndev;
-       }
-
        priv->ioaddr = devm_ioremap(&pdev->dev, mmio_res->start,
                                    resource_size(mmio_res));
        if (!priv->ioaddr) {
index d2d2c4a..21b7114 100644 (file)
@@ -68,8 +68,6 @@ static const unsigned long guest_offloads[] = {
                                (1ULL << VIRTIO_NET_F_GUEST_ECN)  | \
                                (1ULL << VIRTIO_NET_F_GUEST_UFO))
 
-#define GUEST_OFFLOAD_CSUM_MASK (1ULL << VIRTIO_NET_F_GUEST_CSUM)
-
 struct virtnet_stat_desc {
        char desc[ETH_GSTRING_LEN];
        size_t offset;
@@ -2524,48 +2522,29 @@ static int virtnet_get_phys_port_name(struct net_device *dev, char *buf,
        return 0;
 }
 
-static netdev_features_t virtnet_fix_features(struct net_device *netdev,
-                                             netdev_features_t features)
-{
-       /* If Rx checksum is disabled, LRO should also be disabled. */
-       if (!(features & NETIF_F_RXCSUM))
-               features &= ~NETIF_F_LRO;
-
-       return features;
-}
-
 static int virtnet_set_features(struct net_device *dev,
                                netdev_features_t features)
 {
        struct virtnet_info *vi = netdev_priv(dev);
-       u64 offloads = vi->guest_offloads;
+       u64 offloads;
        int err;
 
-       /* Don't allow configuration while XDP is active. */
-       if (vi->xdp_queue_pairs)
-               return -EBUSY;
-
        if ((dev->features ^ features) & NETIF_F_LRO) {
+               if (vi->xdp_queue_pairs)
+                       return -EBUSY;
+
                if (features & NETIF_F_LRO)
-                       offloads |= GUEST_OFFLOAD_LRO_MASK &
-                                   vi->guest_offloads_capable;
+                       offloads = vi->guest_offloads_capable;
                else
-                       offloads &= ~GUEST_OFFLOAD_LRO_MASK;
-       }
+                       offloads = vi->guest_offloads_capable &
+                                  ~GUEST_OFFLOAD_LRO_MASK;
 
-       if ((dev->features ^ features) & NETIF_F_RXCSUM) {
-               if (features & NETIF_F_RXCSUM)
-                       offloads |= GUEST_OFFLOAD_CSUM_MASK &
-                                   vi->guest_offloads_capable;
-               else
-                       offloads &= ~GUEST_OFFLOAD_CSUM_MASK;
+               err = virtnet_set_guest_offloads(vi, offloads);
+               if (err)
+                       return err;
+               vi->guest_offloads = offloads;
        }
 
-       err = virtnet_set_guest_offloads(vi, offloads);
-       if (err)
-               return err;
-
-       vi->guest_offloads = offloads;
        return 0;
 }
 
@@ -2584,7 +2563,6 @@ static const struct net_device_ops virtnet_netdev = {
        .ndo_features_check     = passthru_features_check,
        .ndo_get_phys_port_name = virtnet_get_phys_port_name,
        .ndo_set_features       = virtnet_set_features,
-       .ndo_fix_features       = virtnet_fix_features,
 };
 
 static void virtnet_config_changed_work(struct work_struct *work)
@@ -3035,10 +3013,8 @@ static int virtnet_probe(struct virtio_device *vdev)
        if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) ||
            virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6))
                dev->features |= NETIF_F_LRO;
-       if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_GUEST_OFFLOADS)) {
-               dev->hw_features |= NETIF_F_RXCSUM;
+       if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_GUEST_OFFLOADS))
                dev->hw_features |= NETIF_F_LRO;
-       }
 
        dev->vlan_features = dev->features;
 
index 9b00708..1bdd3df 100644 (file)
@@ -46,7 +46,15 @@ static struct hdlc_proto *first_proto;
 static int hdlc_rcv(struct sk_buff *skb, struct net_device *dev,
                    struct packet_type *p, struct net_device *orig_dev)
 {
-       struct hdlc_device *hdlc = dev_to_hdlc(dev);
+       struct hdlc_device *hdlc;
+
+       /* First make sure "dev" is an HDLC device */
+       if (!(dev->priv_flags & IFF_WAN_HDLC)) {
+               kfree_skb(skb);
+               return NET_RX_SUCCESS;
+       }
+
+       hdlc = dev_to_hdlc(dev);
 
        if (!net_eq(dev_net(dev), &init_net)) {
                kfree_skb(skb);
index 08e0a46..c70a518 100644 (file)
@@ -99,6 +99,7 @@ static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr)
                old_qlen = dev->tx_queue_len;
                ether_setup(dev);
                dev->tx_queue_len = old_qlen;
+               dev->priv_flags &= ~IFF_TX_SKB_SHARING;
                eth_hw_addr_random(dev);
                call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE, dev);
                netif_dormant_off(dev);
index e8b0b90..4e9cc83 100644 (file)
@@ -89,17 +89,13 @@ __be16 lmc_proto_type(lmc_softc_t *sc, struct sk_buff *skb) /*FOLD00*/
     switch(sc->if_type){
     case LMC_PPP:
            return hdlc_type_trans(skb, sc->lmc_device);
-           break;
     case LMC_NET:
         return htons(ETH_P_802_2);
-        break;
     case LMC_RAW: /* Packet type for skbuff kind of useless */
         return htons(ETH_P_802_2);
-        break;
     default:
         printk(KERN_WARNING "%s: No protocol set for this interface, assuming 802.2 (which is wrong!!)\n", sc->name);
         return htons(ETH_P_802_2);
-        break;
     }
 }
 
index 2ce1793..6ca0d2f 100644 (file)
@@ -794,7 +794,6 @@ static int st21nfca_hci_im_transceive(struct nfc_hci_dev *hdev,
                                              skb->len,
                                              st21nfca_hci_data_exchange_cb,
                                              info);
-               break;
        default:
                return 1;
        }
index 3bd97c7..c70f62f 100644 (file)
@@ -1382,7 +1382,6 @@ static int trf7970a_is_iso15693_write_or_lock(u8 cmd)
        case ISO15693_CMD_WRITE_DSFID:
        case ISO15693_CMD_LOCK_DSFID:
                return 1;
-               break;
        default:
                return 0;
        }
index 666cd03..9f11877 100644 (file)
@@ -240,7 +240,7 @@ struct netlink_dump_control {
        int (*done)(struct netlink_callback *);
        void *data;
        struct module *module;
-       u16 min_dump_alloc;
+       u32 min_dump_alloc;
 };
 
 int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
index 68e0682..7d72236 100644 (file)
@@ -3709,13 +3709,13 @@ static int rtnl_dellinkprop(struct sk_buff *skb, struct nlmsghdr *nlh,
        return rtnl_linkprop(RTM_DELLINKPROP, skb, nlh, extack);
 }
 
-static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh)
+static u32 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh)
 {
        struct net *net = sock_net(skb->sk);
-       struct net_device *dev;
+       size_t min_ifinfo_dump_size = 0;
        struct nlattr *tb[IFLA_MAX+1];
        u32 ext_filter_mask = 0;
-       u16 min_ifinfo_dump_size = 0;
+       struct net_device *dev;
        int hdrlen;
 
        /* Same kernel<->userspace interface hack as in rtnl_dump_ifinfo. */
@@ -3735,9 +3735,8 @@ static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh)
         */
        rcu_read_lock();
        for_each_netdev_rcu(net, dev) {
-               min_ifinfo_dump_size = max_t(u16, min_ifinfo_dump_size,
-                                            if_nlmsg_size(dev,
-                                                          ext_filter_mask));
+               min_ifinfo_dump_size = max(min_ifinfo_dump_size,
+                                          if_nlmsg_size(dev, ext_filter_mask));
        }
        rcu_read_unlock();
 
@@ -5494,7 +5493,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
        if (kind == 2 && nlh->nlmsg_flags&NLM_F_DUMP) {
                struct sock *rtnl;
                rtnl_dumpit_func dumpit;
-               u16 min_dump_alloc = 0;
+               u32 min_dump_alloc = 0;
 
                link = rtnl_get_link(family, type);
                if (!link || !link->dumpit) {
index 945a9bd..0a5aa98 100644 (file)
@@ -123,6 +123,7 @@ static const struct dsa_device_ops ksz8795_netdev_ops = {
        .xmit   = ksz8795_xmit,
        .rcv    = ksz8795_rcv,
        .overhead = KSZ_INGRESS_TAG_LEN,
+       .tail_tag = true,
 };
 
 DSA_TAG_DRIVER(ksz8795_netdev_ops);
@@ -199,6 +200,7 @@ static const struct dsa_device_ops ksz9477_netdev_ops = {
        .xmit   = ksz9477_xmit,
        .rcv    = ksz9477_rcv,
        .overhead = KSZ9477_INGRESS_TAG_LEN,
+       .tail_tag = true,
 };
 
 DSA_TAG_DRIVER(ksz9477_netdev_ops);
index 8c0f17c..0dc43ad 100644 (file)
@@ -845,7 +845,7 @@ static void remove_nexthop_from_groups(struct net *net, struct nexthop *nh,
                remove_nh_grp_entry(net, nhge, nlinfo);
 
        /* make sure all see the newly published array before releasing rtnl */
-       synchronize_rcu();
+       synchronize_net();
 }
 
 static void remove_nexthop_group(struct nexthop *nh, struct nl_info *nlinfo)
index 2def857..ef59e25 100644 (file)
@@ -300,5 +300,6 @@ static void __exit mpls_iptunnel_exit(void)
 module_exit(mpls_iptunnel_exit);
 
 MODULE_ALIAS_RTNL_LWT(MPLS);
+MODULE_SOFTDEP("post: mpls_gso");
 MODULE_DESCRIPTION("MultiProtocol Label Switching IP Tunnels");
 MODULE_LICENSE("GPL v2");
index 698bc35..a014149 100644 (file)
@@ -19,14 +19,11 @@ config INET_MPTCP_DIAG
 
 config MPTCP_IPV6
        bool "MPTCP: IPv6 support for Multipath TCP"
-       select IPV6
+       depends on IPV6=y
        default y
 
-endif
-
 config MPTCP_KUNIT_TESTS
        tristate "This builds the MPTCP KUnit tests" if !KUNIT_ALL_TESTS
-       select MPTCP
        depends on KUNIT
        default KUNIT_ALL_TESTS
        help
@@ -39,3 +36,4 @@ config MPTCP_KUNIT_TESTS
 
          If unsure, say N.
 
+endif
index 092a2d4..a044dd4 100644 (file)
@@ -241,7 +241,6 @@ static void mptcp_parse_option(const struct sk_buff *skb,
                }
 
                mp_opt->add_addr = 1;
-               mp_opt->port = 0;
                mp_opt->addr_id = *ptr++;
                pr_debug("ADD_ADDR: id=%d, echo=%d", mp_opt->addr_id, mp_opt->echo);
                if (mp_opt->family == MPTCP_ADDR_IPVERSION_4) {
@@ -297,6 +296,8 @@ void mptcp_get_options(const struct sk_buff *skb,
        mp_opt->mp_capable = 0;
        mp_opt->mp_join = 0;
        mp_opt->add_addr = 0;
+       mp_opt->ahmac = 0;
+       mp_opt->port = 0;
        mp_opt->rm_addr = 0;
        mp_opt->dss = 0;
 
index e894254..8709f3d 100644 (file)
@@ -1217,7 +1217,7 @@ static int nfc_genl_fw_download(struct sk_buff *skb, struct genl_info *info)
        u32 idx;
        char firmware_name[NFC_FIRMWARE_NAME_MAXSIZE + 1];
 
-       if (!info->attrs[NFC_ATTR_DEVICE_INDEX])
+       if (!info->attrs[NFC_ATTR_DEVICE_INDEX] || !info->attrs[NFC_ATTR_FIRMWARE_NAME])
                return -EINVAL;
 
        idx = nla_get_u32(info->attrs[NFC_ATTR_DEVICE_INDEX]);
index 9c79fb9..aba3cd8 100644 (file)
@@ -156,11 +156,11 @@ tcf_ct_flow_table_add_action_nat_udp(const struct nf_conntrack_tuple *tuple,
        __be16 target_dst = target.dst.u.udp.port;
 
        if (target_src != tuple->src.u.udp.port)
-               tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_TCP,
+               tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_UDP,
                                         offsetof(struct udphdr, source),
                                         0xFFFF, be16_to_cpu(target_src));
        if (target_dst != tuple->dst.u.udp.port)
-               tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_TCP,
+               tcf_ct_add_mangle_action(action, FLOW_ACT_MANGLE_HDR_TYPE_UDP,
                                         offsetof(struct udphdr, dest),
                                         0xFFFF, be16_to_cpu(target_dst));
 }
index a229751..85c0d0d 100644 (file)
@@ -459,7 +459,7 @@ static int tunnel_key_init(struct net *net, struct nlattr *nla,
 
                        metadata = __ipv6_tun_set_dst(&saddr, &daddr, tos, ttl, dst_port,
                                                      0, flags,
-                                                     key_id, 0);
+                                                     key_id, opts_len);
                } else {
                        NL_SET_ERR_MSG(extack, "Missing either ipv4 or ipv6 src and dst");
                        ret = -EINVAL;
index 41a55c6..faeabff 100644 (file)
@@ -3712,7 +3712,7 @@ int tc_setup_flow_action(struct flow_action *flow_action,
                        entry->gate.num_entries = tcf_gate_num_entries(act);
                        err = tcf_gate_get_entries(entry, act);
                        if (err)
-                               goto err_out;
+                               goto err_out_locked;
                } else {
                        err = -EOPNOTSUPP;
                        goto err_out_locked;
index 4364924..4d5df8e 100644 (file)
@@ -33,3 +33,4 @@ CONFIG_KALLSYMS=y
 CONFIG_TRACEPOINTS=y
 CONFIG_NET_DROP_MONITOR=m
 CONFIG_NETDEVSIM=m
+CONFIG_NET_FOU=m
index 8df5cb8..741a1c4 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_MPTCP=y
+CONFIG_IPV6=y
 CONFIG_MPTCP_IPV6=y
 CONFIG_INET_DIAG=m
 CONFIG_INET_MPTCP_DIAG=m
index 8a2fe6d..c9ce3df 100755 (executable)
@@ -520,6 +520,11 @@ kci_test_encap_fou()
                return $ksft_skip
        fi
 
+       if ! /sbin/modprobe -q -n fou; then
+               echo "SKIP: module fou is not found"
+               return $ksft_skip
+       fi
+       /sbin/modprobe -q fou
        ip -netns "$testns" fou add port 7777 ipproto 47 2>/dev/null
        if [ $? -ne 0 ];then
                echo "FAIL: can't add fou port 7777, skipping test"