Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
78764f45
Commit
78764f45
authored
Oct 01, 2021
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge tag 'mlx5-fixes-2021-09-30' of
git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux
mlx5-fixes-2021-09-30
parents
5abab498
3bf1742f
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
194 additions
and
105 deletions
+194
-105
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en.h
+5
-7
drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
+3
-3
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c
+1
-2
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h
+2
-0
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+11
-0
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+130
-48
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+1
-2
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+1
-6
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
+6
-5
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c
...ers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c
+8
-4
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_lgcy.c
...rs/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_lgcy.c
+3
-1
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
+2
-2
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
+16
-21
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
+5
-4
No files found.
drivers/net/ethernet/mellanox/mlx5/core/en.h
View file @
78764f45
...
...
@@ -252,6 +252,7 @@ struct mlx5e_params {
struct
{
u16
mode
;
u8
num_tc
;
struct
netdev_tc_txq
tc_to_txq
[
TC_MAX_QUEUE
];
}
mqprio
;
bool
rx_cqe_compress_def
;
bool
tunneled_offload_en
;
...
...
@@ -845,6 +846,7 @@ struct mlx5e_priv {
struct
mlx5e_channel_stats
channel_stats
[
MLX5E_MAX_NUM_CHANNELS
];
struct
mlx5e_channel_stats
trap_stats
;
struct
mlx5e_ptp_stats
ptp_stats
;
u16
stats_nch
;
u16
max_nch
;
u8
max_opened_tc
;
bool
tx_ptp_opened
;
...
...
@@ -1100,12 +1102,6 @@ int mlx5e_ethtool_set_pauseparam(struct mlx5e_priv *priv,
struct
ethtool_pauseparam
*
pauseparam
);
/* mlx5e generic netdev management API */
static
inline
unsigned
int
mlx5e_calc_max_nch
(
struct
mlx5e_priv
*
priv
,
const
struct
mlx5e_profile
*
profile
)
{
return
priv
->
netdev
->
num_rx_queues
/
max_t
(
u8
,
profile
->
rq_groups
,
1
);
}
static
inline
bool
mlx5e_tx_mpwqe_supported
(
struct
mlx5_core_dev
*
mdev
)
{
...
...
@@ -1114,11 +1110,13 @@ mlx5e_tx_mpwqe_supported(struct mlx5_core_dev *mdev)
}
int
mlx5e_priv_init
(
struct
mlx5e_priv
*
priv
,
const
struct
mlx5e_profile
*
profile
,
struct
net_device
*
netdev
,
struct
mlx5_core_dev
*
mdev
);
void
mlx5e_priv_cleanup
(
struct
mlx5e_priv
*
priv
);
struct
net_device
*
mlx5e_create_netdev
(
struct
mlx5_core_dev
*
mdev
,
unsigned
int
txqs
,
unsigned
int
rxqs
);
mlx5e_create_netdev
(
struct
mlx5_core_dev
*
mdev
,
const
struct
mlx5e_profile
*
profile
,
unsigned
int
txqs
,
unsigned
int
rxqs
);
int
mlx5e_attach_netdev
(
struct
mlx5e_priv
*
priv
);
void
mlx5e_detach_netdev
(
struct
mlx5e_priv
*
priv
);
void
mlx5e_destroy_netdev
(
struct
mlx5e_priv
*
priv
);
...
...
drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
View file @
78764f45
...
...
@@ -35,7 +35,7 @@ static void mlx5e_hv_vhca_fill_stats(struct mlx5e_priv *priv, void *data,
{
int
ch
,
i
=
0
;
for
(
ch
=
0
;
ch
<
priv
->
max
_nch
;
ch
++
)
{
for
(
ch
=
0
;
ch
<
priv
->
stats
_nch
;
ch
++
)
{
void
*
buf
=
data
+
i
;
if
(
WARN_ON_ONCE
(
buf
+
...
...
@@ -51,7 +51,7 @@ static void mlx5e_hv_vhca_fill_stats(struct mlx5e_priv *priv, void *data,
static
int
mlx5e_hv_vhca_stats_buf_size
(
struct
mlx5e_priv
*
priv
)
{
return
(
sizeof
(
struct
mlx5e_hv_vhca_per_ring_stats
)
*
priv
->
max
_nch
);
priv
->
stats
_nch
);
}
static
void
mlx5e_hv_vhca_stats_work
(
struct
work_struct
*
work
)
...
...
@@ -100,7 +100,7 @@ static void mlx5e_hv_vhca_stats_control(struct mlx5_hv_vhca_agent *agent,
sagent
=
&
priv
->
stats_agent
;
block
->
version
=
MLX5_HV_VHCA_STATS_VERSION
;
block
->
rings
=
priv
->
max
_nch
;
block
->
rings
=
priv
->
stats
_nch
;
if
(
!
block
->
command
)
{
cancel_delayed_work_sync
(
&
priv
->
stats_agent
.
work
);
...
...
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c
View file @
78764f45
...
...
@@ -13,8 +13,6 @@ struct mlx5e_ptp_fs {
bool
valid
;
};
#define MLX5E_PTP_CHANNEL_IX 0
struct
mlx5e_ptp_params
{
struct
mlx5e_params
params
;
struct
mlx5e_sq_param
txq_sq_param
;
...
...
@@ -509,6 +507,7 @@ static int mlx5e_init_ptp_rq(struct mlx5e_ptp *c, struct mlx5e_params *params,
rq
->
mdev
=
mdev
;
rq
->
hw_mtu
=
MLX5E_SW2HW_MTU
(
params
,
params
->
sw_mtu
);
rq
->
stats
=
&
c
->
priv
->
ptp_stats
.
rq
;
rq
->
ix
=
MLX5E_PTP_CHANNEL_IX
;
rq
->
ptp_cyc2time
=
mlx5_rq_ts_translator
(
mdev
);
err
=
mlx5e_rq_set_handlers
(
rq
,
params
,
false
);
if
(
err
)
...
...
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h
View file @
78764f45
...
...
@@ -8,6 +8,8 @@
#include "en_stats.h"
#include <linux/ptp_classify.h>
#define MLX5E_PTP_CHANNEL_IX 0
struct
mlx5e_ptpsq
{
struct
mlx5e_txqsq
txqsq
;
struct
mlx5e_cq
ts_cq
;
...
...
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
View file @
78764f45
...
...
@@ -2036,6 +2036,17 @@ static int set_pflag_tx_port_ts(struct net_device *netdev, bool enable)
}
new_params
=
priv
->
channels
.
params
;
/* Don't allow enabling TX-port-TS if MQPRIO mode channel offload is
* active, since it defines explicitly which TC accepts the packet.
* This conflicts with TX-port-TS hijacking the PTP traffic to a specific
* HW TX-queue.
*/
if
(
enable
&&
new_params
.
mqprio
.
mode
==
TC_MQPRIO_MODE_CHANNEL
)
{
netdev_err
(
priv
->
netdev
,
"%s: MQPRIO mode channel offload is active, cannot set the TX-port-TS
\n
"
,
__func__
);
return
-
EINVAL
;
}
MLX5E_SET_PFLAG
(
&
new_params
,
MLX5E_PFLAG_TX_PORT_TS
,
enable
);
/* No need to verify SQ stop room as
* ptpsq.txqsq.stop_room <= generic_sq->stop_room, and both
...
...
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
View file @
78764f45
This diff is collapsed.
Click to expand it.
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
View file @
78764f45
...
...
@@ -596,7 +596,6 @@ static void mlx5e_build_rep_params(struct net_device *netdev)
MLX5_CQ_PERIOD_MODE_START_FROM_CQE
:
MLX5_CQ_PERIOD_MODE_START_FROM_EQE
;
priv
->
max_nch
=
mlx5e_calc_max_nch
(
priv
,
priv
->
profile
);
params
=
&
priv
->
channels
.
params
;
params
->
num_channels
=
MLX5E_REP_PARAMS_DEF_NUM_CHANNELS
;
...
...
@@ -1169,7 +1168,7 @@ mlx5e_vport_vf_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
nch
=
mlx5e_get_max_num_channels
(
dev
);
txqs
=
nch
*
profile
->
max_tc
;
rxqs
=
nch
*
profile
->
rq_groups
;
netdev
=
mlx5e_create_netdev
(
dev
,
txqs
,
rxqs
);
netdev
=
mlx5e_create_netdev
(
dev
,
profile
,
txqs
,
rxqs
);
if
(
!
netdev
)
{
mlx5_core_warn
(
dev
,
"Failed to create representor netdev for vport %d
\n
"
,
...
...
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
View file @
78764f45
...
...
@@ -1001,14 +1001,9 @@ static inline void mlx5e_handle_csum(struct net_device *netdev,
goto
csum_unnecessary
;
if
(
likely
(
is_last_ethertype_ip
(
skb
,
&
network_depth
,
&
proto
)))
{
u8
ipproto
=
get_ip_proto
(
skb
,
network_depth
,
proto
);
if
(
unlikely
(
ipproto
==
IPPROTO_SCTP
))
if
(
unlikely
(
get_ip_proto
(
skb
,
network_depth
,
proto
)
==
IPPROTO_SCTP
))
goto
csum_unnecessary
;
if
(
unlikely
(
mlx5_ipsec_is_rx_flow
(
cqe
)))
goto
csum_none
;
stats
->
csum_complete
++
;
skb
->
ip_summed
=
CHECKSUM_COMPLETE
;
skb
->
csum
=
csum_unfold
((
__force
__sum16
)
cqe
->
check_sum
);
...
...
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
View file @
78764f45
...
...
@@ -34,6 +34,7 @@
#include "en.h"
#include "en_accel/tls.h"
#include "en_accel/en_accel.h"
#include "en/ptp.h"
static
unsigned
int
stats_grps_num
(
struct
mlx5e_priv
*
priv
)
{
...
...
@@ -450,7 +451,7 @@ static MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS(sw)
memset
(
s
,
0
,
sizeof
(
*
s
));
for
(
i
=
0
;
i
<
priv
->
max
_nch
;
i
++
)
{
for
(
i
=
0
;
i
<
priv
->
stats
_nch
;
i
++
)
{
struct
mlx5e_channel_stats
*
channel_stats
=
&
priv
->
channel_stats
[
i
];
int
j
;
...
...
@@ -2076,7 +2077,7 @@ static MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS(ptp)
if
(
priv
->
rx_ptp_opened
)
{
for
(
i
=
0
;
i
<
NUM_PTP_RQ_STATS
;
i
++
)
sprintf
(
data
+
(
idx
++
)
*
ETH_GSTRING_LEN
,
ptp_rq_stats_desc
[
i
].
format
);
ptp_rq_stats_desc
[
i
].
format
,
MLX5E_PTP_CHANNEL_IX
);
}
return
idx
;
}
...
...
@@ -2119,7 +2120,7 @@ static MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS(ptp) { return; }
static
MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS
(
channels
)
{
int
max_nch
=
priv
->
max
_nch
;
int
max_nch
=
priv
->
stats
_nch
;
return
(
NUM_RQ_STATS
*
max_nch
)
+
(
NUM_CH_STATS
*
max_nch
)
+
...
...
@@ -2133,7 +2134,7 @@ static MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS(channels)
static
MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS
(
channels
)
{
bool
is_xsk
=
priv
->
xsk
.
ever_used
;
int
max_nch
=
priv
->
max
_nch
;
int
max_nch
=
priv
->
stats
_nch
;
int
i
,
j
,
tc
;
for
(
i
=
0
;
i
<
max_nch
;
i
++
)
...
...
@@ -2175,7 +2176,7 @@ static MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS(channels)
static
MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS
(
channels
)
{
bool
is_xsk
=
priv
->
xsk
.
ever_used
;
int
max_nch
=
priv
->
max
_nch
;
int
max_nch
=
priv
->
stats
_nch
;
int
i
,
j
,
tc
;
for
(
i
=
0
;
i
<
max_nch
;
i
++
)
...
...
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c
View file @
78764f45
...
...
@@ -79,12 +79,16 @@ int esw_acl_egress_lgcy_setup(struct mlx5_eswitch *esw,
int
dest_num
=
0
;
int
err
=
0
;
if
(
MLX5_CAP_ESW_EGRESS_ACL
(
esw
->
dev
,
flow_counter
))
{
if
(
vport
->
egress
.
legacy
.
drop_counter
)
{
drop_counter
=
vport
->
egress
.
legacy
.
drop_counter
;
}
else
if
(
MLX5_CAP_ESW_EGRESS_ACL
(
esw
->
dev
,
flow_counter
))
{
drop_counter
=
mlx5_fc_create
(
esw
->
dev
,
false
);
if
(
IS_ERR
(
drop_counter
))
if
(
IS_ERR
(
drop_counter
))
{
esw_warn
(
esw
->
dev
,
"vport[%d] configure egress drop rule counter err(%ld)
\n
"
,
vport
->
vport
,
PTR_ERR
(
drop_counter
));
drop_counter
=
NULL
;
}
vport
->
egress
.
legacy
.
drop_counter
=
drop_counter
;
}
...
...
@@ -123,7 +127,7 @@ int esw_acl_egress_lgcy_setup(struct mlx5_eswitch *esw,
flow_act
.
action
=
MLX5_FLOW_CONTEXT_ACTION_DROP
;
/* Attach egress drop flow counter */
if
(
!
IS_ERR_OR_NULL
(
drop_counter
)
)
{
if
(
drop_counter
)
{
flow_act
.
action
|=
MLX5_FLOW_CONTEXT_ACTION_COUNT
;
drop_ctr_dst
.
type
=
MLX5_FLOW_DESTINATION_TYPE_COUNTER
;
drop_ctr_dst
.
counter_id
=
mlx5_fc_id
(
drop_counter
);
...
...
@@ -162,7 +166,7 @@ void esw_acl_egress_lgcy_cleanup(struct mlx5_eswitch *esw,
esw_acl_egress_table_destroy
(
vport
);
clean_drop_counter:
if
(
!
IS_ERR_OR_NULL
(
vport
->
egress
.
legacy
.
drop_counter
)
)
{
if
(
vport
->
egress
.
legacy
.
drop_counter
)
{
mlx5_fc_destroy
(
esw
->
dev
,
vport
->
egress
.
legacy
.
drop_counter
);
vport
->
egress
.
legacy
.
drop_counter
=
NULL
;
}
...
...
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_lgcy.c
View file @
78764f45
...
...
@@ -160,7 +160,9 @@ int esw_acl_ingress_lgcy_setup(struct mlx5_eswitch *esw,
esw_acl_ingress_lgcy_rules_destroy
(
vport
);
if
(
MLX5_CAP_ESW_INGRESS_ACL
(
esw
->
dev
,
flow_counter
))
{
if
(
vport
->
ingress
.
legacy
.
drop_counter
)
{
counter
=
vport
->
ingress
.
legacy
.
drop_counter
;
}
else
if
(
MLX5_CAP_ESW_INGRESS_ACL
(
esw
->
dev
,
flow_counter
))
{
counter
=
mlx5_fc_create
(
esw
->
dev
,
false
);
if
(
IS_ERR
(
counter
))
{
esw_warn
(
esw
->
dev
,
...
...
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
View file @
78764f45
...
...
@@ -113,7 +113,7 @@ static void mlx5i_grp_sw_update_stats(struct mlx5e_priv *priv)
struct
mlx5e_sw_stats
s
=
{
0
};
int
i
,
j
;
for
(
i
=
0
;
i
<
priv
->
max
_nch
;
i
++
)
{
for
(
i
=
0
;
i
<
priv
->
stats
_nch
;
i
++
)
{
struct
mlx5e_channel_stats
*
channel_stats
;
struct
mlx5e_rq_stats
*
rq_stats
;
...
...
@@ -711,7 +711,7 @@ static int mlx5_rdma_setup_rn(struct ib_device *ibdev, u32 port_num,
goto
destroy_ht
;
}
err
=
mlx5e_priv_init
(
epriv
,
netdev
,
mdev
);
err
=
mlx5e_priv_init
(
epriv
,
prof
,
netdev
,
mdev
);
if
(
err
)
goto
destroy_mdev_resources
;
...
...
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
View file @
78764f45
...
...
@@ -448,22 +448,20 @@ static u64 find_target_cycles(struct mlx5_core_dev *mdev, s64 target_ns)
return
cycles_now
+
cycles_delta
;
}
static
u64
perout_conf_internal_timer
(
struct
mlx5_core_dev
*
mdev
,
s64
sec
,
u32
nsec
)
static
u64
perout_conf_internal_timer
(
struct
mlx5_core_dev
*
mdev
,
s64
sec
)
{
struct
timespec64
ts
;
struct
timespec64
ts
=
{}
;
s64
target_ns
;
ts
.
tv_sec
=
sec
;
ts
.
tv_nsec
=
nsec
;
target_ns
=
timespec64_to_ns
(
&
ts
);
return
find_target_cycles
(
mdev
,
target_ns
);
}
static
u64
perout_conf_real_time
(
s64
sec
,
u32
nsec
)
static
u64
perout_conf_real_time
(
s64
sec
)
{
return
(
u64
)
nsec
|
(
u64
)
sec
<<
32
;
return
(
u64
)
sec
<<
32
;
}
static
int
mlx5_perout_configure
(
struct
ptp_clock_info
*
ptp
,
...
...
@@ -474,6 +472,7 @@ static int mlx5_perout_configure(struct ptp_clock_info *ptp,
container_of
(
ptp
,
struct
mlx5_clock
,
ptp_info
);
struct
mlx5_core_dev
*
mdev
=
container_of
(
clock
,
struct
mlx5_core_dev
,
clock
);
bool
rt_mode
=
mlx5_real_time_mode
(
mdev
);
u32
in
[
MLX5_ST_SZ_DW
(
mtpps_reg
)]
=
{
0
};
struct
timespec64
ts
;
u32
field_select
=
0
;
...
...
@@ -501,8 +500,10 @@ static int mlx5_perout_configure(struct ptp_clock_info *ptp,
if
(
on
)
{
bool
rt_mode
=
mlx5_real_time_mode
(
mdev
);
u32
nsec
;
s64
sec
;
s64
sec
=
rq
->
perout
.
start
.
sec
;
if
(
rq
->
perout
.
start
.
nsec
)
return
-
EINVAL
;
pin_mode
=
MLX5_PIN_MODE_OUT
;
pattern
=
MLX5_OUT_PATTERN_PERIODIC
;
...
...
@@ -513,14 +514,11 @@ static int mlx5_perout_configure(struct ptp_clock_info *ptp,
if
((
ns
>>
1
)
!=
500000000LL
)
return
-
EINVAL
;
nsec
=
rq
->
perout
.
start
.
nsec
;
sec
=
rq
->
perout
.
start
.
sec
;
if
(
rt_mode
&&
sec
>
U32_MAX
)
return
-
EINVAL
;
time_stamp
=
rt_mode
?
perout_conf_real_time
(
sec
,
nsec
)
:
perout_conf_internal_timer
(
mdev
,
sec
,
nsec
);
time_stamp
=
rt_mode
?
perout_conf_real_time
(
sec
)
:
perout_conf_internal_timer
(
mdev
,
sec
);
field_select
|=
MLX5_MTPPS_FS_PIN_MODE
|
MLX5_MTPPS_FS_PATTERN
|
...
...
@@ -538,6 +536,9 @@ static int mlx5_perout_configure(struct ptp_clock_info *ptp,
if
(
err
)
return
err
;
if
(
rt_mode
)
return
0
;
return
mlx5_set_mtppse
(
mdev
,
pin
,
0
,
MLX5_EVENT_MODE_REPETETIVE
&
on
);
}
...
...
@@ -705,20 +706,14 @@ static void ts_next_sec(struct timespec64 *ts)
static
u64
perout_conf_next_event_timer
(
struct
mlx5_core_dev
*
mdev
,
struct
mlx5_clock
*
clock
)
{
bool
rt_mode
=
mlx5_real_time_mode
(
mdev
);
struct
timespec64
ts
;
s64
target_ns
;
if
(
rt_mode
)
ts
=
mlx5_ptp_gettimex_real_time
(
mdev
,
NULL
);
else
mlx5_ptp_gettimex
(
&
clock
->
ptp_info
,
&
ts
,
NULL
);
mlx5_ptp_gettimex
(
&
clock
->
ptp_info
,
&
ts
,
NULL
);
ts_next_sec
(
&
ts
);
target_ns
=
timespec64_to_ns
(
&
ts
);
return
rt_mode
?
perout_conf_real_time
(
ts
.
tv_sec
,
ts
.
tv_nsec
)
:
find_target_cycles
(
mdev
,
target_ns
);
return
find_target_cycles
(
mdev
,
target_ns
);
}
static
int
mlx5_pps_event
(
struct
notifier_block
*
nb
,
...
...
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
View file @
78764f45
...
...
@@ -13,8 +13,8 @@
#endif
#define MLX5_MAX_IRQ_NAME (32)
/* max irq_index is 2
55. three
chars */
#define MLX5_MAX_IRQ_IDX_CHARS (
3
)
/* max irq_index is 2
047, so four
chars */
#define MLX5_MAX_IRQ_IDX_CHARS (
4
)
#define MLX5_SFS_PER_CTRL_IRQ 64
#define MLX5_IRQ_CTRL_SF_MAX 8
...
...
@@ -633,8 +633,9 @@ void mlx5_irq_table_destroy(struct mlx5_core_dev *dev)
int
mlx5_irq_table_get_sfs_vec
(
struct
mlx5_irq_table
*
table
)
{
if
(
table
->
sf_comp_pool
)
return
table
->
sf_comp_pool
->
xa_num_irqs
.
max
-
table
->
sf_comp_pool
->
xa_num_irqs
.
min
+
1
;
return
min_t
(
int
,
num_online_cpus
(),
table
->
sf_comp_pool
->
xa_num_irqs
.
max
-
table
->
sf_comp_pool
->
xa_num_irqs
.
min
+
1
);
else
return
mlx5_irq_table_get_num_comp
(
table
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment