Skip to content

Commit 493b580

Browse files
author
NipaLocal
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: NipaLocal <nipa@local>
2 parents 4b3529e + 56a5cf5 commit 493b580

Some content is hidden

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

54 files changed

+805
-140
lines changed

Documentation/devicetree/bindings/net/pse-pd/microchip,pd692x0.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ properties:
2424

2525
managers:
2626
type: object
27+
additionalProperties: false
2728
description:
2829
List of the PD69208T4/PD69204T4/PD69208M PSE managers. Each manager
2930
have 4 or 8 physical ports according to the chip version. No need to
@@ -47,8 +48,9 @@ properties:
4748
- "#size-cells"
4849

4950
patternProperties:
50-
"^manager@0[0-9a-b]$":
51+
"^manager@[0-9a-b]$":
5152
type: object
53+
additionalProperties: false
5254
description:
5355
PD69208T4/PD69204T4/PD69208M PSE manager exposing 4 or 8 physical
5456
ports.
@@ -69,9 +71,14 @@ properties:
6971
patternProperties:
7072
'^port@[0-7]$':
7173
type: object
74+
additionalProperties: false
75+
76+
properties:
77+
reg:
78+
maxItems: 1
79+
7280
required:
7381
- reg
74-
additionalProperties: false
7582

7683
required:
7784
- reg

Documentation/devicetree/bindings/net/pse-pd/ti,tps23881.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,31 @@ properties:
2929
of the ports conversion matrix that establishes relationship between
3030
the logical ports and the physical channels.
3131
type: object
32+
additionalProperties: false
33+
34+
properties:
35+
"#address-cells":
36+
const: 1
37+
38+
"#size-cells":
39+
const: 0
3240

3341
patternProperties:
3442
'^channel@[0-7]$':
3543
type: object
44+
additionalProperties: false
45+
46+
properties:
47+
reg:
48+
maxItems: 1
49+
3650
required:
3751
- reg
3852

53+
required:
54+
- "#address-cells"
55+
- "#size-cells"
56+
3957
unevaluatedProperties: false
4058

4159
required:

Documentation/process/maintainer-netdev.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ preferably including links to previous postings, for example::
227227
The amount of mooing will depend on packet rate so should match
228228
the diurnal cycle quite well.
229229

230-
Signed-of-by: Joe Defarmer <[email protected]>
230+
Signed-off-by: Joe Defarmer <[email protected]>
231231
---
232232
v3:
233233
- add a note about time-of-day mooing fluctuation to the commit message

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3855,6 +3855,7 @@ BPF JIT for ARM64
38553855
M: Daniel Borkmann <[email protected]>
38563856
M: Alexei Starovoitov <[email protected]>
38573857
M: Puranjay Mohan <[email protected]>
3858+
R: Xu Kuohai <[email protected]>
38583859
38593860
S: Supported
38603861
F: arch/arm64/net/

arch/arc/net/bpf_jit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
/************** Functions that the back-end must provide **************/
4141
/* Extension for 32-bit operations. */
42-
inline u8 zext(u8 *buf, u8 rd);
42+
u8 zext(u8 *buf, u8 rd);
4343
/***** Moves *****/
4444
u8 mov_r32(u8 *buf, u8 rd, u8 rs, u8 sign_ext);
4545
u8 mov_r32_i32(u8 *buf, u8 reg, s32 imm);

arch/arc/net/bpf_jit_arcv2.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ enum {
6262
* If/when we decide to add ARCv2 instructions that do use register pairs,
6363
* the mapping, hopefully, doesn't need to be revisited.
6464
*/
65-
const u8 bpf2arc[][2] = {
65+
static const u8 bpf2arc[][2] = {
6666
/* Return value from in-kernel function, and exit value from eBPF */
6767
[BPF_REG_0] = {ARC_R_8, ARC_R_9},
6868
/* Arguments from eBPF program to in-kernel function */
@@ -1302,7 +1302,7 @@ static u8 arc_b(u8 *buf, s32 offset)
13021302

13031303
/************* Packers (Deal with BPF_REGs) **************/
13041304

1305-
inline u8 zext(u8 *buf, u8 rd)
1305+
u8 zext(u8 *buf, u8 rd)
13061306
{
13071307
if (rd != BPF_REG_FP)
13081308
return arc_movi_r(buf, REG_HI(rd), 0);
@@ -2235,6 +2235,7 @@ u8 gen_swap(u8 *buf, u8 rd, u8 size, u8 endian, bool force, bool do_zext)
22352235
break;
22362236
default:
22372237
/* The caller must have handled this. */
2238+
break;
22382239
}
22392240
} else {
22402241
/*
@@ -2253,6 +2254,7 @@ u8 gen_swap(u8 *buf, u8 rd, u8 size, u8 endian, bool force, bool do_zext)
22532254
break;
22542255
default:
22552256
/* The caller must have handled this. */
2257+
break;
22562258
}
22572259
}
22582260

@@ -2517,7 +2519,7 @@ u8 arc_epilogue(u8 *buf, u32 usage, u16 frame_size)
25172519
#define JCC64_NR_OF_JMPS 3 /* Number of jumps in jcc64 template. */
25182520
#define JCC64_INSNS_TO_END 3 /* Number of insn. inclusive the 2nd jmp to end. */
25192521
#define JCC64_SKIP_JMP 1 /* Index of the "skip" jump to "end". */
2520-
const struct {
2522+
static const struct {
25212523
/*
25222524
* "jit_off" is common between all "jmp[]" and is coupled with
25232525
* "cond" of each "jmp[]" instance. e.g.:
@@ -2883,7 +2885,7 @@ u8 gen_jmp_64(u8 *buf, u8 rd, u8 rs, u8 cond, u32 curr_off, u32 targ_off)
28832885
* The "ARC_CC_SET" becomes "CC_unequal" because of the "tst"
28842886
* instruction that precedes the conditional branch.
28852887
*/
2886-
const u8 arcv2_32_jmps[ARC_CC_LAST] = {
2888+
static const u8 arcv2_32_jmps[ARC_CC_LAST] = {
28872889
[ARC_CC_UGT] = CC_great_u,
28882890
[ARC_CC_UGE] = CC_great_eq_u,
28892891
[ARC_CC_ULT] = CC_less_u,

arch/arc/net/bpf_jit_core.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ static void jit_dump(const struct jit_context *ctx)
159159
/* Initialise the context so there's no garbage. */
160160
static int jit_ctx_init(struct jit_context *ctx, struct bpf_prog *prog)
161161
{
162-
memset(ctx, 0, sizeof(ctx));
162+
memset(ctx, 0, sizeof(*ctx));
163163

164164
ctx->orig_prog = prog;
165165

166166
/* If constant blinding was requested but failed, scram. */
167167
ctx->prog = bpf_jit_blind_constants(prog);
168168
if (IS_ERR(ctx->prog))
169169
return PTR_ERR(ctx->prog);
170-
ctx->blinded = (ctx->prog == ctx->orig_prog ? false : true);
170+
ctx->blinded = (ctx->prog != ctx->orig_prog);
171171

172172
/* If the verifier doesn't zero-extend, then we have to do it. */
173173
ctx->do_zext = !ctx->prog->aux->verifier_zext;
@@ -1182,12 +1182,12 @@ static int jit_prepare(struct jit_context *ctx)
11821182
}
11831183

11841184
/*
1185-
* All the "handle_*()" functions have been called before by the
1186-
* "jit_prepare()". If there was an error, we would know by now.
1187-
* Therefore, no extra error checking at this point, other than
1188-
* a sanity check at the end that expects the calculated length
1189-
* (jit.len) to be equal to the length of generated instructions
1190-
* (jit.index).
1185+
* jit_compile() is the real compilation phase. jit_prepare() is
1186+
* invoked before jit_compile() as a dry-run to make sure everything
1187+
* will go OK and allocate the necessary memory.
1188+
*
1189+
* In the end, jit_compile() checks if it has produced the same number
1190+
* of instructions as jit_prepare() would.
11911191
*/
11921192
static int jit_compile(struct jit_context *ctx)
11931193
{
@@ -1407,9 +1407,9 @@ static struct bpf_prog *do_extra_pass(struct bpf_prog *prog)
14071407

14081408
/*
14091409
* This function may be invoked twice for the same stream of BPF
1410-
* instructions. The "extra pass" happens, when there are "call"s
1411-
* involved that their addresses are not known during the first
1412-
* invocation.
1410+
* instructions. The "extra pass" happens, when there are
1411+
* (re)locations involved that their addresses are not known
1412+
* during the first run.
14131413
*/
14141414
struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
14151415
{

drivers/net/ethernet/cisco/enic/enic_main.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,18 +1117,30 @@ static int enic_set_vf_port(struct net_device *netdev, int vf,
11171117
pp->request = nla_get_u8(port[IFLA_PORT_REQUEST]);
11181118

11191119
if (port[IFLA_PORT_PROFILE]) {
1120+
if (nla_len(port[IFLA_PORT_PROFILE]) != PORT_PROFILE_MAX) {
1121+
memcpy(pp, &prev_pp, sizeof(*pp));
1122+
return -EINVAL;
1123+
}
11201124
pp->set |= ENIC_SET_NAME;
11211125
memcpy(pp->name, nla_data(port[IFLA_PORT_PROFILE]),
11221126
PORT_PROFILE_MAX);
11231127
}
11241128

11251129
if (port[IFLA_PORT_INSTANCE_UUID]) {
1130+
if (nla_len(port[IFLA_PORT_INSTANCE_UUID]) != PORT_UUID_MAX) {
1131+
memcpy(pp, &prev_pp, sizeof(*pp));
1132+
return -EINVAL;
1133+
}
11261134
pp->set |= ENIC_SET_INSTANCE;
11271135
memcpy(pp->instance_uuid,
11281136
nla_data(port[IFLA_PORT_INSTANCE_UUID]), PORT_UUID_MAX);
11291137
}
11301138

11311139
if (port[IFLA_PORT_HOST_UUID]) {
1140+
if (nla_len(port[IFLA_PORT_HOST_UUID]) != PORT_UUID_MAX) {
1141+
memcpy(pp, &prev_pp, sizeof(*pp));
1142+
return -EINVAL;
1143+
}
11321144
pp->set |= ENIC_SET_HOST;
11331145
memcpy(pp->host_uuid,
11341146
nla_data(port[IFLA_PORT_HOST_UUID]), PORT_UUID_MAX);

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4130,6 +4130,14 @@ static int fec_enet_init(struct net_device *ndev)
41304130
return ret;
41314131
}
41324132

4133+
static void fec_enet_deinit(struct net_device *ndev)
4134+
{
4135+
struct fec_enet_private *fep = netdev_priv(ndev);
4136+
4137+
netif_napi_del(&fep->napi);
4138+
fec_enet_free_queue(ndev);
4139+
}
4140+
41334141
#ifdef CONFIG_OF
41344142
static int fec_reset_phy(struct platform_device *pdev)
41354143
{
@@ -4524,6 +4532,7 @@ fec_probe(struct platform_device *pdev)
45244532
fec_enet_mii_remove(fep);
45254533
failed_mii_init:
45264534
failed_irq:
4535+
fec_enet_deinit(ndev);
45274536
failed_init:
45284537
fec_ptp_stop(pdev);
45294538
failed_reset:
@@ -4587,6 +4596,7 @@ fec_drv_remove(struct platform_device *pdev)
45874596
pm_runtime_put_noidle(&pdev->dev);
45884597
pm_runtime_disable(&pdev->dev);
45894598

4599+
fec_enet_deinit(ndev);
45904600
free_netdev(ndev);
45914601
}
45924602

drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ int ice_vsi_add_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan)
4545
return -EINVAL;
4646

4747
err = ice_fltr_add_vlan(vsi, vlan);
48-
if (err && err != -EEXIST) {
48+
if (!err)
49+
vsi->num_vlan++;
50+
else if (err == -EEXIST)
51+
err = 0;
52+
else
4953
dev_err(ice_pf_to_dev(vsi->back), "Failure Adding VLAN %d on VSI %i, status %d\n",
5054
vlan->vid, vsi->vsi_num, err);
51-
return err;
52-
}
5355

54-
vsi->num_vlan++;
55-
return 0;
56+
return err;
5657
}
5758

5859
/**

drivers/net/ethernet/intel/idpf/idpf_lib.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,7 @@ static int idpf_vport_open(struct idpf_vport *vport, bool alloc_res)
13941394
}
13951395

13961396
idpf_rx_init_buf_tail(vport);
1397+
idpf_vport_intr_ena(vport);
13971398

13981399
err = idpf_send_config_queues_msg(vport);
13991400
if (err) {

drivers/net/ethernet/intel/idpf/idpf_txrx.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3746,9 +3746,9 @@ static void idpf_vport_intr_ena_irq_all(struct idpf_vport *vport)
37463746
*/
37473747
void idpf_vport_intr_deinit(struct idpf_vport *vport)
37483748
{
3749+
idpf_vport_intr_dis_irq_all(vport);
37493750
idpf_vport_intr_napi_dis_all(vport);
37503751
idpf_vport_intr_napi_del_all(vport);
3751-
idpf_vport_intr_dis_irq_all(vport);
37523752
idpf_vport_intr_rel_irq(vport);
37533753
}
37543754

@@ -4179,7 +4179,6 @@ int idpf_vport_intr_init(struct idpf_vport *vport)
41794179

41804180
idpf_vport_intr_map_vector_to_qs(vport);
41814181
idpf_vport_intr_napi_add_all(vport);
4182-
idpf_vport_intr_napi_ena_all(vport);
41834182

41844183
err = vport->adapter->dev_ops.reg_ops.intr_reg_init(vport);
41854184
if (err)
@@ -4193,17 +4192,20 @@ int idpf_vport_intr_init(struct idpf_vport *vport)
41934192
if (err)
41944193
goto unroll_vectors_alloc;
41954194

4196-
idpf_vport_intr_ena_irq_all(vport);
4197-
41984195
return 0;
41994196

42004197
unroll_vectors_alloc:
4201-
idpf_vport_intr_napi_dis_all(vport);
42024198
idpf_vport_intr_napi_del_all(vport);
42034199

42044200
return err;
42054201
}
42064202

4203+
void idpf_vport_intr_ena(struct idpf_vport *vport)
4204+
{
4205+
idpf_vport_intr_napi_ena_all(vport);
4206+
idpf_vport_intr_ena_irq_all(vport);
4207+
}
4208+
42074209
/**
42084210
* idpf_config_rss - Send virtchnl messages to configure RSS
42094211
* @vport: virtual port

drivers/net/ethernet/intel/idpf/idpf_txrx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,7 @@ int idpf_vport_intr_alloc(struct idpf_vport *vport);
990990
void idpf_vport_intr_update_itr_ena_irq(struct idpf_q_vector *q_vector);
991991
void idpf_vport_intr_deinit(struct idpf_vport *vport);
992992
int idpf_vport_intr_init(struct idpf_vport *vport);
993+
void idpf_vport_intr_ena(struct idpf_vport *vport);
993994
enum pkt_hash_types idpf_ptype_to_htype(const struct idpf_rx_ptype_decoded *decoded);
994995
int idpf_config_rss(struct idpf_vport *vport);
995996
int idpf_init_rss(struct idpf_vport *vport);

drivers/net/ethernet/marvell/octeontx2/nic/qos.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,10 @@ static int otx2_qos_leaf_to_inner(struct otx2_nic *pfvf, u16 classid,
14221422
otx2_qos_read_txschq_cfg(pfvf, node, old_cfg);
14231423

14241424
/* delete the txschq nodes allocated for this node */
1425+
otx2_qos_disable_sq(pfvf, qid);
1426+
otx2_qos_free_hw_node_schq(pfvf, node);
14251427
otx2_qos_free_sw_node_schq(pfvf, node);
1428+
pfvf->qos.qid_to_sqmap[qid] = OTX2_QOS_INVALID_SQ;
14261429

14271430
/* mark this node as htb inner node */
14281431
WRITE_ONCE(node->qid, OTX2_QOS_QID_INNER);
@@ -1632,6 +1635,7 @@ static int otx2_qos_leaf_del_last(struct otx2_nic *pfvf, u16 classid, bool force
16321635
dwrr_del_node = true;
16331636

16341637
/* destroy the leaf node */
1638+
otx2_qos_disable_sq(pfvf, qid);
16351639
otx2_qos_destroy_node(pfvf, node);
16361640
pfvf->qos.qid_to_sqmap[qid] = OTX2_QOS_INVALID_SQ;
16371641

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,14 @@ static inline void
102102
mlx5e_udp_gso_handle_tx_skb(struct sk_buff *skb)
103103
{
104104
int payload_len = skb_shinfo(skb)->gso_size + sizeof(struct udphdr);
105+
struct udphdr *udphdr;
105106

106-
udp_hdr(skb)->len = htons(payload_len);
107+
if (skb->encapsulation)
108+
udphdr = (struct udphdr *)skb_inner_transport_header(skb);
109+
else
110+
udphdr = udp_hdr(skb);
111+
112+
udphdr->len = htons(payload_len);
107113
}
108114

109115
struct mlx5e_accel_tx_state {

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,7 @@ static int rx_create(struct mlx5_core_dev *mdev, struct mlx5e_ipsec *ipsec,
750750
err_fs_ft:
751751
if (rx->allow_tunnel_mode)
752752
mlx5_eswitch_unblock_encap(mdev);
753-
mlx5_del_flow_rules(rx->status.rule);
754-
mlx5_modify_header_dealloc(mdev, rx->status.modify_hdr);
753+
mlx5_ipsec_rx_status_destroy(ipsec, rx);
755754
err_add:
756755
mlx5_destroy_flow_table(rx->ft.status);
757756
err_fs_ft_status:

0 commit comments

Comments
 (0)