Skip to content

Commit a95cfad

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Track alignment in BPF verifier so that legitimate programs won't be rejected on !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS architectures. 2) Make tail calls work properly in arm64 BPF JIT, from Deniel Borkmann. 3) Make the configuration and semantics Generic XDP make more sense and don't allow both generic XDP and a driver specific instance to be active at the same time. Also from Daniel. 4) Don't crash on resume in xen-netfront, from Vitaly Kuznetsov. 5) Fix use-after-free in VRF driver, from Gao Feng. 6) Use netdev_alloc_skb_ip_align() to avoid unaligned IP headers in qca_spi driver, from Stefan Wahren. 7) Always run cleanup routines in BPF samples when we get SIGTERM, from Andy Gospodarek. 8) The mdio phy code should bring PHYs out of reset using the shared GPIO lines before invoking bus->reset(). From Florian Fainelli. 9) Some USB descriptor access endian fixes in various drivers from Johan Hovold. 10) Handle PAUSE advertisements properly in mlx5 driver, from Gal Pressman. 11) Fix reversed test in mlx5e_setup_tc(), from Saeed Mahameed. 12) Cure netdev leak in AF_PACKET when using timestamping via control messages. From Douglas Caetano dos Santos. 13) netcp doesn't support HWTSTAMP_FILTER_ALl, reject it. From Miroslav Lichvar. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits) ldmvsw: stop the clean timer at beginning of remove ldmvsw: unregistering netdev before disable hardware net: netcp: fix check of requested timestamping filter ipv6: avoid dad-failures for addresses with NODAD qed: Fix uninitialized data in aRFS infrastructure mdio: mux: fix device_node_continue.cocci warnings net/packet: fix missing net_device reference release net/mlx4_core: Use min3 to select number of MSI-X vectors macvlan: Fix performance issues with vlan tagged packets net: stmmac: use correct pointer when printing normal descriptor ring net/mlx5: Use underlay QPN from the root name space net/mlx5e: IPoIB, Only support regular RQ for now net/mlx5e: Fix setup TC ndo net/mlx5e: Fix ethtool pause support and advertise reporting net/mlx5e: Use the correct pause values for ethtool advertising vmxnet3: ensure that adapter is in proper state during force_close sfc: revert changes to NIC revision numbers net: ch9200: add missing USB-descriptor endianness conversions net: irda: irda-usb: fix firmware name on big-endian hosts net: dsa: mv88e6xxx: add default case to switch ...
2 parents 1319a28 + 66f4bc8 commit a95cfad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1026
-249
lines changed

arch/arm64/net/bpf_jit_comp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,9 @@ static int emit_bpf_tail_call(struct jit_ctx *ctx)
253253
*/
254254
off = offsetof(struct bpf_array, ptrs);
255255
emit_a64_mov_i64(tmp, off, ctx);
256-
emit(A64_LDR64(tmp, r2, tmp), ctx);
257-
emit(A64_LDR64(prg, tmp, r3), ctx);
256+
emit(A64_ADD(1, tmp, r2, tmp), ctx);
257+
emit(A64_LSL(1, prg, r3, 3), ctx);
258+
emit(A64_LDR64(prg, tmp, prg), ctx);
258259
emit(A64_CBZ(1, prg, jmp_offset), ctx);
259260

260261
/* goto *(prog->bpf_func + prologue_size); */

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,9 @@ static uint64_t _mv88e6xxx_get_ethtool_stat(struct mv88e6xxx_chip *chip,
849849
mv88e6xxx_g1_stats_read(chip, reg, &low);
850850
if (s->sizeof_stat == 8)
851851
mv88e6xxx_g1_stats_read(chip, reg + 1, &high);
852+
break;
853+
default:
854+
return UINT64_MAX;
852855
}
853856
value = (((u64)high) << 16) | low;
854857
return value;

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,29 +200,18 @@ static int hw_atl_a0_hw_rss_set(struct aq_hw_s *self,
200200
static int hw_atl_a0_hw_offload_set(struct aq_hw_s *self,
201201
struct aq_nic_cfg_s *aq_nic_cfg)
202202
{
203-
int err = 0;
204-
205203
/* TX checksums offloads*/
206204
tpo_ipv4header_crc_offload_en_set(self, 1);
207205
tpo_tcp_udp_crc_offload_en_set(self, 1);
208-
if (err < 0)
209-
goto err_exit;
210206

211207
/* RX checksums offloads*/
212208
rpo_ipv4header_crc_offload_en_set(self, 1);
213209
rpo_tcp_udp_crc_offload_en_set(self, 1);
214-
if (err < 0)
215-
goto err_exit;
216210

217211
/* LSO offloads*/
218212
tdm_large_send_offload_en_set(self, 0xFFFFFFFFU);
219-
if (err < 0)
220-
goto err_exit;
221-
222-
err = aq_hw_err_from_flags(self);
223213

224-
err_exit:
225-
return err;
214+
return aq_hw_err_from_flags(self);
226215
}
227216

228217
static int hw_atl_a0_hw_init_tx_path(struct aq_hw_s *self)

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -200,25 +200,18 @@ static int hw_atl_b0_hw_rss_set(struct aq_hw_s *self,
200200
static int hw_atl_b0_hw_offload_set(struct aq_hw_s *self,
201201
struct aq_nic_cfg_s *aq_nic_cfg)
202202
{
203-
int err = 0;
204203
unsigned int i;
205204

206205
/* TX checksums offloads*/
207206
tpo_ipv4header_crc_offload_en_set(self, 1);
208207
tpo_tcp_udp_crc_offload_en_set(self, 1);
209-
if (err < 0)
210-
goto err_exit;
211208

212209
/* RX checksums offloads*/
213210
rpo_ipv4header_crc_offload_en_set(self, 1);
214211
rpo_tcp_udp_crc_offload_en_set(self, 1);
215-
if (err < 0)
216-
goto err_exit;
217212

218213
/* LSO offloads*/
219214
tdm_large_send_offload_en_set(self, 0xFFFFFFFFU);
220-
if (err < 0)
221-
goto err_exit;
222215

223216
/* LRO offloads */
224217
{
@@ -245,10 +238,7 @@ static int hw_atl_b0_hw_offload_set(struct aq_hw_s *self,
245238

246239
rpo_lro_en_set(self, aq_nic_cfg->is_lro ? 0xFFFFFFFFU : 0U);
247240
}
248-
err = aq_hw_err_from_flags(self);
249-
250-
err_exit:
251-
return err;
241+
return aq_hw_err_from_flags(self);
252242
}
253243

254244
static int hw_atl_b0_hw_init_tx_path(struct aq_hw_s *self)

drivers/net/ethernet/mellanox/mlx4/main.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,12 +2862,10 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev)
28622862
int port = 0;
28632863

28642864
if (msi_x) {
2865-
int nreq = dev->caps.num_ports * num_online_cpus() + 1;
2866-
2867-
nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs,
2868-
nreq);
2869-
if (nreq > MAX_MSIX)
2870-
nreq = MAX_MSIX;
2865+
int nreq = min3(dev->caps.num_ports *
2866+
(int)num_online_cpus() + 1,
2867+
dev->caps.num_eqs - dev->caps.reserved_eqs,
2868+
MAX_MSIX);
28712869

28722870
entries = kcalloc(nreq, sizeof *entries, GFP_KERNEL);
28732871
if (!entries)

drivers/net/ethernet/mellanox/mlx5/core/en.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ int mlx5e_create_direct_tirs(struct mlx5e_priv *priv);
10031003
void mlx5e_destroy_direct_tirs(struct mlx5e_priv *priv);
10041004
void mlx5e_destroy_rqt(struct mlx5e_priv *priv, struct mlx5e_rqt *rqt);
10051005

1006-
int mlx5e_create_ttc_table(struct mlx5e_priv *priv, u32 underlay_qpn);
1006+
int mlx5e_create_ttc_table(struct mlx5e_priv *priv);
10071007
void mlx5e_destroy_ttc_table(struct mlx5e_priv *priv);
10081008

10091009
int mlx5e_create_tis(struct mlx5_core_dev *mdev, int tc,

drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,6 @@ static void get_supported(u32 eth_proto_cap,
794794
ptys2ethtool_supported_port(link_ksettings, eth_proto_cap);
795795
ptys2ethtool_supported_link(supported, eth_proto_cap);
796796
ethtool_link_ksettings_add_link_mode(link_ksettings, supported, Pause);
797-
ethtool_link_ksettings_add_link_mode(link_ksettings, supported, Asym_Pause);
798797
}
799798

800799
static void get_advertising(u32 eth_proto_cap, u8 tx_pause,
@@ -804,7 +803,7 @@ static void get_advertising(u32 eth_proto_cap, u8 tx_pause,
804803
unsigned long *advertising = link_ksettings->link_modes.advertising;
805804

806805
ptys2ethtool_adver_link(advertising, eth_proto_cap);
807-
if (tx_pause)
806+
if (rx_pause)
808807
ethtool_link_ksettings_add_link_mode(link_ksettings, advertising, Pause);
809808
if (tx_pause ^ rx_pause)
810809
ethtool_link_ksettings_add_link_mode(link_ksettings, advertising, Asym_Pause);
@@ -849,6 +848,8 @@ static int mlx5e_get_link_ksettings(struct net_device *netdev,
849848
struct mlx5e_priv *priv = netdev_priv(netdev);
850849
struct mlx5_core_dev *mdev = priv->mdev;
851850
u32 out[MLX5_ST_SZ_DW(ptys_reg)] = {0};
851+
u32 rx_pause = 0;
852+
u32 tx_pause = 0;
852853
u32 eth_proto_cap;
853854
u32 eth_proto_admin;
854855
u32 eth_proto_lp;
@@ -871,11 +872,13 @@ static int mlx5e_get_link_ksettings(struct net_device *netdev,
871872
an_disable_admin = MLX5_GET(ptys_reg, out, an_disable_admin);
872873
an_status = MLX5_GET(ptys_reg, out, an_status);
873874

875+
mlx5_query_port_pause(mdev, &rx_pause, &tx_pause);
876+
874877
ethtool_link_ksettings_zero_link_mode(link_ksettings, supported);
875878
ethtool_link_ksettings_zero_link_mode(link_ksettings, advertising);
876879

877880
get_supported(eth_proto_cap, link_ksettings);
878-
get_advertising(eth_proto_admin, 0, 0, link_ksettings);
881+
get_advertising(eth_proto_admin, tx_pause, rx_pause, link_ksettings);
879882
get_speed_duplex(netdev, eth_proto_oper, link_ksettings);
880883

881884
eth_proto_oper = eth_proto_oper ? eth_proto_oper : eth_proto_cap;

drivers/net/ethernet/mellanox/mlx5/core/en_fs.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ void mlx5e_destroy_ttc_table(struct mlx5e_priv *priv)
800800
mlx5e_destroy_flow_table(&ttc->ft);
801801
}
802802

803-
int mlx5e_create_ttc_table(struct mlx5e_priv *priv, u32 underlay_qpn)
803+
int mlx5e_create_ttc_table(struct mlx5e_priv *priv)
804804
{
805805
struct mlx5e_ttc_table *ttc = &priv->fs.ttc;
806806
struct mlx5_flow_table_attr ft_attr = {};
@@ -810,7 +810,6 @@ int mlx5e_create_ttc_table(struct mlx5e_priv *priv, u32 underlay_qpn)
810810
ft_attr.max_fte = MLX5E_TTC_TABLE_SIZE;
811811
ft_attr.level = MLX5E_TTC_FT_LEVEL;
812812
ft_attr.prio = MLX5E_NIC_PRIO;
813-
ft_attr.underlay_qpn = underlay_qpn;
814813

815814
ft->t = mlx5_create_flow_table(priv->fs.ns, &ft_attr);
816815
if (IS_ERR(ft->t)) {
@@ -1147,7 +1146,7 @@ int mlx5e_create_flow_steering(struct mlx5e_priv *priv)
11471146
priv->netdev->hw_features &= ~NETIF_F_NTUPLE;
11481147
}
11491148

1150-
err = mlx5e_create_ttc_table(priv, 0);
1149+
err = mlx5e_create_ttc_table(priv);
11511150
if (err) {
11521151
netdev_err(priv->netdev, "Failed to create ttc table, err=%d\n",
11531152
err);

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2976,7 +2976,7 @@ static int mlx5e_setup_tc(struct net_device *netdev, u8 tc)
29762976
new_channels.params = priv->channels.params;
29772977
new_channels.params.num_tc = tc ? tc : 1;
29782978

2979-
if (test_bit(MLX5E_STATE_OPENED, &priv->state)) {
2979+
if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) {
29802980
priv->channels.params = new_channels.params;
29812981
goto out;
29822982
}

drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,25 @@
4040
#include "eswitch.h"
4141

4242
int mlx5_cmd_update_root_ft(struct mlx5_core_dev *dev,
43-
struct mlx5_flow_table *ft)
43+
struct mlx5_flow_table *ft, u32 underlay_qpn)
4444
{
4545
u32 in[MLX5_ST_SZ_DW(set_flow_table_root_in)] = {0};
4646
u32 out[MLX5_ST_SZ_DW(set_flow_table_root_out)] = {0};
4747

4848
if ((MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_IB) &&
49-
ft->underlay_qpn == 0)
49+
underlay_qpn == 0)
5050
return 0;
5151

5252
MLX5_SET(set_flow_table_root_in, in, opcode,
5353
MLX5_CMD_OP_SET_FLOW_TABLE_ROOT);
5454
MLX5_SET(set_flow_table_root_in, in, table_type, ft->type);
5555
MLX5_SET(set_flow_table_root_in, in, table_id, ft->id);
56+
MLX5_SET(set_flow_table_root_in, in, underlay_qpn, underlay_qpn);
5657
if (ft->vport) {
5758
MLX5_SET(set_flow_table_root_in, in, vport_number, ft->vport);
5859
MLX5_SET(set_flow_table_root_in, in, other_vport, 1);
5960
}
6061

61-
if ((MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_IB) &&
62-
ft->underlay_qpn != 0)
63-
MLX5_SET(set_flow_table_root_in, in, underlay_qpn, ft->underlay_qpn);
64-
6562
return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
6663
}
6764

0 commit comments

Comments
 (0)