struct flowi4 fl4 = {};
        char *encap_header;
        int ttl, err;
+       u8 nud_state;
 
        if (max_encap_size < ipv4_encap_size) {
                mlx5_core_warn(priv->mdev, "encap size %d too big, max supported is %d\n",
        if (err)
                goto out;
 
-       if (!(n->nud_state & NUD_VALID)) {
+       read_lock_bh(&n->lock);
+       nud_state = n->nud_state;
+       ether_addr_copy(e->h_dest, n->ha);
+       read_unlock_bh(&n->lock);
+
+       if (!(nud_state & NUD_VALID)) {
                pr_warn("%s: can't offload, neighbour to %pI4 invalid\n", __func__, &fl4.daddr);
                err = -EOPNOTSUPP;
                goto out;
        e->n = n;
        e->out_dev = out_dev;
 
-       neigh_ha_snapshot(e->h_dest, n, out_dev);
-
        switch (e->tunnel_type) {
        case MLX5_HEADER_TYPE_VXLAN:
                gen_vxlan_header_ipv4(out_dev, encap_header,
        struct flowi6 fl6 = {};
        char *encap_header;
        int err, ttl = 0;
+       u8 nud_state;
 
        if (max_encap_size < ipv6_encap_size) {
                mlx5_core_warn(priv->mdev, "encap size %d too big, max supported is %d\n",
        if (err)
                goto out;
 
-       if (!(n->nud_state & NUD_VALID)) {
+       read_lock_bh(&n->lock);
+       nud_state = n->nud_state;
+       ether_addr_copy(e->h_dest, n->ha);
+       read_unlock_bh(&n->lock);
+
+       if (!(nud_state & NUD_VALID)) {
                pr_warn("%s: can't offload, neighbour to %pI6 invalid\n", __func__, &fl6.daddr);
                err = -EOPNOTSUPP;
                goto out;
        e->n = n;
        e->out_dev = out_dev;
 
-       neigh_ha_snapshot(e->h_dest, n, out_dev);
-
        switch (e->tunnel_type) {
        case MLX5_HEADER_TYPE_VXLAN:
                gen_vxlan_header_ipv6(out_dev, encap_header,