Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
9c0bda64
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
9c0bda64
编写于
2月 05, 2019
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge tag 'mlx5-fixes-2019-02-05' of
git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux
mlx5-fixes-2019-02-05
上级
f09bef61
1651925d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
37 addition
and
20 deletion
+37
-20
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
+3
-1
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
+1
-1
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+17
-10
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
+6
-0
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
+1
-0
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+9
-8
未找到文件。
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
浏览文件 @
9c0bda64
...
@@ -612,16 +612,18 @@ int mlx5e_tc_tun_parse(struct net_device *filter_dev,
...
@@ -612,16 +612,18 @@ int mlx5e_tc_tun_parse(struct net_device *filter_dev,
struct
mlx5_flow_spec
*
spec
,
struct
mlx5_flow_spec
*
spec
,
struct
tc_cls_flower_offload
*
f
,
struct
tc_cls_flower_offload
*
f
,
void
*
headers_c
,
void
*
headers_c
,
void
*
headers_v
)
void
*
headers_v
,
u8
*
match_level
)
{
{
int
tunnel_type
;
int
tunnel_type
;
int
err
=
0
;
int
err
=
0
;
tunnel_type
=
mlx5e_tc_tun_get_type
(
filter_dev
);
tunnel_type
=
mlx5e_tc_tun_get_type
(
filter_dev
);
if
(
tunnel_type
==
MLX5E_TC_TUNNEL_TYPE_VXLAN
)
{
if
(
tunnel_type
==
MLX5E_TC_TUNNEL_TYPE_VXLAN
)
{
*
match_level
=
MLX5_MATCH_L4
;
err
=
mlx5e_tc_tun_parse_vxlan
(
priv
,
spec
,
f
,
err
=
mlx5e_tc_tun_parse_vxlan
(
priv
,
spec
,
f
,
headers_c
,
headers_v
);
headers_c
,
headers_v
);
}
else
if
(
tunnel_type
==
MLX5E_TC_TUNNEL_TYPE_GRETAP
)
{
}
else
if
(
tunnel_type
==
MLX5E_TC_TUNNEL_TYPE_GRETAP
)
{
*
match_level
=
MLX5_MATCH_L3
;
err
=
mlx5e_tc_tun_parse_gretap
(
priv
,
spec
,
f
,
err
=
mlx5e_tc_tun_parse_gretap
(
priv
,
spec
,
f
,
headers_c
,
headers_v
);
headers_c
,
headers_v
);
}
else
{
}
else
{
...
...
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
浏览文件 @
9c0bda64
...
@@ -39,6 +39,6 @@ int mlx5e_tc_tun_parse(struct net_device *filter_dev,
...
@@ -39,6 +39,6 @@ int mlx5e_tc_tun_parse(struct net_device *filter_dev,
struct
mlx5_flow_spec
*
spec
,
struct
mlx5_flow_spec
*
spec
,
struct
tc_cls_flower_offload
*
f
,
struct
tc_cls_flower_offload
*
f
,
void
*
headers_c
,
void
*
headers_c
,
void
*
headers_v
);
void
*
headers_v
,
u8
*
match_level
);
#endif //__MLX5_EN_TC_TUNNEL_H__
#endif //__MLX5_EN_TC_TUNNEL_H__
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
浏览文件 @
9c0bda64
...
@@ -1302,7 +1302,7 @@ static void mlx5e_tc_del_flow(struct mlx5e_priv *priv,
...
@@ -1302,7 +1302,7 @@ static void mlx5e_tc_del_flow(struct mlx5e_priv *priv,
static
int
parse_tunnel_attr
(
struct
mlx5e_priv
*
priv
,
static
int
parse_tunnel_attr
(
struct
mlx5e_priv
*
priv
,
struct
mlx5_flow_spec
*
spec
,
struct
mlx5_flow_spec
*
spec
,
struct
tc_cls_flower_offload
*
f
,
struct
tc_cls_flower_offload
*
f
,
struct
net_device
*
filter_dev
)
struct
net_device
*
filter_dev
,
u8
*
match_level
)
{
{
struct
netlink_ext_ack
*
extack
=
f
->
common
.
extack
;
struct
netlink_ext_ack
*
extack
=
f
->
common
.
extack
;
void
*
headers_c
=
MLX5_ADDR_OF
(
fte_match_param
,
spec
->
match_criteria
,
void
*
headers_c
=
MLX5_ADDR_OF
(
fte_match_param
,
spec
->
match_criteria
,
...
@@ -1317,7 +1317,7 @@ static int parse_tunnel_attr(struct mlx5e_priv *priv,
...
@@ -1317,7 +1317,7 @@ static int parse_tunnel_attr(struct mlx5e_priv *priv,
int
err
=
0
;
int
err
=
0
;
err
=
mlx5e_tc_tun_parse
(
filter_dev
,
priv
,
spec
,
f
,
err
=
mlx5e_tc_tun_parse
(
filter_dev
,
priv
,
spec
,
f
,
headers_c
,
headers_v
);
headers_c
,
headers_v
,
match_level
);
if
(
err
)
{
if
(
err
)
{
NL_SET_ERR_MSG_MOD
(
extack
,
NL_SET_ERR_MSG_MOD
(
extack
,
"failed to parse tunnel attributes"
);
"failed to parse tunnel attributes"
);
...
@@ -1426,7 +1426,7 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
...
@@ -1426,7 +1426,7 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
struct
mlx5_flow_spec
*
spec
,
struct
mlx5_flow_spec
*
spec
,
struct
tc_cls_flower_offload
*
f
,
struct
tc_cls_flower_offload
*
f
,
struct
net_device
*
filter_dev
,
struct
net_device
*
filter_dev
,
u8
*
match_level
)
u8
*
match_level
,
u8
*
tunnel_match_level
)
{
{
struct
netlink_ext_ack
*
extack
=
f
->
common
.
extack
;
struct
netlink_ext_ack
*
extack
=
f
->
common
.
extack
;
void
*
headers_c
=
MLX5_ADDR_OF
(
fte_match_param
,
spec
->
match_criteria
,
void
*
headers_c
=
MLX5_ADDR_OF
(
fte_match_param
,
spec
->
match_criteria
,
...
@@ -1477,7 +1477,7 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
...
@@ -1477,7 +1477,7 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
switch
(
key
->
addr_type
)
{
switch
(
key
->
addr_type
)
{
case
FLOW_DISSECTOR_KEY_IPV4_ADDRS
:
case
FLOW_DISSECTOR_KEY_IPV4_ADDRS
:
case
FLOW_DISSECTOR_KEY_IPV6_ADDRS
:
case
FLOW_DISSECTOR_KEY_IPV6_ADDRS
:
if
(
parse_tunnel_attr
(
priv
,
spec
,
f
,
filter_dev
))
if
(
parse_tunnel_attr
(
priv
,
spec
,
f
,
filter_dev
,
tunnel_match_level
))
return
-
EOPNOTSUPP
;
return
-
EOPNOTSUPP
;
break
;
break
;
default:
default:
...
@@ -1826,11 +1826,11 @@ static int parse_cls_flower(struct mlx5e_priv *priv,
...
@@ -1826,11 +1826,11 @@ static int parse_cls_flower(struct mlx5e_priv *priv,
struct
mlx5_core_dev
*
dev
=
priv
->
mdev
;
struct
mlx5_core_dev
*
dev
=
priv
->
mdev
;
struct
mlx5_eswitch
*
esw
=
dev
->
priv
.
eswitch
;
struct
mlx5_eswitch
*
esw
=
dev
->
priv
.
eswitch
;
struct
mlx5e_rep_priv
*
rpriv
=
priv
->
ppriv
;
struct
mlx5e_rep_priv
*
rpriv
=
priv
->
ppriv
;
u8
match_level
,
tunnel_match_level
=
MLX5_MATCH_NONE
;
struct
mlx5_eswitch_rep
*
rep
;
struct
mlx5_eswitch_rep
*
rep
;
u8
match_level
;
int
err
;
int
err
;
err
=
__parse_cls_flower
(
priv
,
spec
,
f
,
filter_dev
,
&
match_level
);
err
=
__parse_cls_flower
(
priv
,
spec
,
f
,
filter_dev
,
&
match_level
,
&
tunnel_match_level
);
if
(
!
err
&&
(
flow
->
flags
&
MLX5E_TC_FLOW_ESWITCH
))
{
if
(
!
err
&&
(
flow
->
flags
&
MLX5E_TC_FLOW_ESWITCH
))
{
rep
=
rpriv
->
rep
;
rep
=
rpriv
->
rep
;
...
@@ -1846,10 +1846,12 @@ static int parse_cls_flower(struct mlx5e_priv *priv,
...
@@ -1846,10 +1846,12 @@ static int parse_cls_flower(struct mlx5e_priv *priv,
}
}
}
}
if
(
flow
->
flags
&
MLX5E_TC_FLOW_ESWITCH
)
if
(
flow
->
flags
&
MLX5E_TC_FLOW_ESWITCH
)
{
flow
->
esw_attr
->
match_level
=
match_level
;
flow
->
esw_attr
->
match_level
=
match_level
;
else
flow
->
esw_attr
->
tunnel_match_level
=
tunnel_match_level
;
}
else
{
flow
->
nic_attr
->
match_level
=
match_level
;
flow
->
nic_attr
->
match_level
=
match_level
;
}
return
err
;
return
err
;
}
}
...
@@ -2179,6 +2181,7 @@ static bool csum_offload_supported(struct mlx5e_priv *priv,
...
@@ -2179,6 +2181,7 @@ static bool csum_offload_supported(struct mlx5e_priv *priv,
static
bool
modify_header_match_supported
(
struct
mlx5_flow_spec
*
spec
,
static
bool
modify_header_match_supported
(
struct
mlx5_flow_spec
*
spec
,
struct
tcf_exts
*
exts
,
struct
tcf_exts
*
exts
,
u32
actions
,
struct
netlink_ext_ack
*
extack
)
struct
netlink_ext_ack
*
extack
)
{
{
const
struct
tc_action
*
a
;
const
struct
tc_action
*
a
;
...
@@ -2188,7 +2191,11 @@ static bool modify_header_match_supported(struct mlx5_flow_spec *spec,
...
@@ -2188,7 +2191,11 @@ static bool modify_header_match_supported(struct mlx5_flow_spec *spec,
u16
ethertype
;
u16
ethertype
;
int
nkeys
,
i
;
int
nkeys
,
i
;
headers_v
=
MLX5_ADDR_OF
(
fte_match_param
,
spec
->
match_value
,
outer_headers
);
if
(
actions
&
MLX5_FLOW_CONTEXT_ACTION_DECAP
)
headers_v
=
MLX5_ADDR_OF
(
fte_match_param
,
spec
->
match_value
,
inner_headers
);
else
headers_v
=
MLX5_ADDR_OF
(
fte_match_param
,
spec
->
match_value
,
outer_headers
);
ethertype
=
MLX5_GET
(
fte_match_set_lyr_2_4
,
headers_v
,
ethertype
);
ethertype
=
MLX5_GET
(
fte_match_set_lyr_2_4
,
headers_v
,
ethertype
);
/* for non-IP we only re-write MACs, so we're okay */
/* for non-IP we only re-write MACs, so we're okay */
...
@@ -2245,7 +2252,7 @@ static bool actions_match_supported(struct mlx5e_priv *priv,
...
@@ -2245,7 +2252,7 @@ static bool actions_match_supported(struct mlx5e_priv *priv,
if
(
actions
&
MLX5_FLOW_CONTEXT_ACTION_MOD_HDR
)
if
(
actions
&
MLX5_FLOW_CONTEXT_ACTION_MOD_HDR
)
return
modify_header_match_supported
(
&
parse_attr
->
spec
,
exts
,
return
modify_header_match_supported
(
&
parse_attr
->
spec
,
exts
,
extack
);
actions
,
extack
);
return
true
;
return
true
;
}
}
...
...
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
浏览文件 @
9c0bda64
...
@@ -387,8 +387,14 @@ netdev_tx_t mlx5e_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb,
...
@@ -387,8 +387,14 @@ netdev_tx_t mlx5e_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb,
num_wqebbs
=
DIV_ROUND_UP
(
ds_cnt
,
MLX5_SEND_WQEBB_NUM_DS
);
num_wqebbs
=
DIV_ROUND_UP
(
ds_cnt
,
MLX5_SEND_WQEBB_NUM_DS
);
contig_wqebbs_room
=
mlx5_wq_cyc_get_contig_wqebbs
(
wq
,
pi
);
contig_wqebbs_room
=
mlx5_wq_cyc_get_contig_wqebbs
(
wq
,
pi
);
if
(
unlikely
(
contig_wqebbs_room
<
num_wqebbs
))
{
if
(
unlikely
(
contig_wqebbs_room
<
num_wqebbs
))
{
#ifdef CONFIG_MLX5_EN_IPSEC
struct
mlx5_wqe_eth_seg
cur_eth
=
wqe
->
eth
;
#endif
mlx5e_fill_sq_frag_edge
(
sq
,
wq
,
pi
,
contig_wqebbs_room
);
mlx5e_fill_sq_frag_edge
(
sq
,
wq
,
pi
,
contig_wqebbs_room
);
mlx5e_sq_fetch_wqe
(
sq
,
&
wqe
,
&
pi
);
mlx5e_sq_fetch_wqe
(
sq
,
&
wqe
,
&
pi
);
#ifdef CONFIG_MLX5_EN_IPSEC
wqe
->
eth
=
cur_eth
;
#endif
}
}
/* fill wqe */
/* fill wqe */
...
...
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
浏览文件 @
9c0bda64
...
@@ -312,6 +312,7 @@ struct mlx5_esw_flow_attr {
...
@@ -312,6 +312,7 @@ struct mlx5_esw_flow_attr {
}
dests
[
MLX5_MAX_FLOW_FWD_VPORTS
];
}
dests
[
MLX5_MAX_FLOW_FWD_VPORTS
];
u32
mod_hdr_id
;
u32
mod_hdr_id
;
u8
match_level
;
u8
match_level
;
u8
tunnel_match_level
;
struct
mlx5_fc
*
counter
;
struct
mlx5_fc
*
counter
;
u32
chain
;
u32
chain
;
u16
prio
;
u16
prio
;
...
...
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
浏览文件 @
9c0bda64
...
@@ -160,14 +160,15 @@ mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw,
...
@@ -160,14 +160,15 @@ mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw,
MLX5_SET_TO_ONES
(
fte_match_set_misc
,
misc
,
MLX5_SET_TO_ONES
(
fte_match_set_misc
,
misc
,
source_eswitch_owner_vhca_id
);
source_eswitch_owner_vhca_id
);
if
(
attr
->
match_level
==
MLX5_MATCH_NONE
)
spec
->
match_criteria_enable
=
MLX5_MATCH_MISC_PARAMETERS
;
spec
->
match_criteria_enable
=
MLX5_MATCH_MISC_PARAMETERS
;
if
(
flow_act
.
action
&
MLX5_FLOW_CONTEXT_ACTION_DECAP
)
{
else
if
(
attr
->
tunnel_match_level
!=
MLX5_MATCH_NONE
)
spec
->
match_criteria_enable
=
MLX5_MATCH_OUTER_HEADERS
|
spec
->
match_criteria_enable
|=
MLX5_MATCH_OUTER_HEADERS
;
MLX5_MATCH_MISC_PARAMETERS
;
if
(
attr
->
match_level
!=
MLX5_MATCH_NONE
)
spec
->
match_criteria_enable
|=
MLX5_MATCH_INNER_HEADERS
;
if
(
flow_act
.
action
&
MLX5_FLOW_CONTEXT_ACTION_DECAP
)
}
else
if
(
attr
->
match_level
!=
MLX5_MATCH_NONE
)
{
spec
->
match_criteria_enable
|=
MLX5_MATCH_INNER_HEADERS
;
spec
->
match_criteria_enable
|=
MLX5_MATCH_OUTER_HEADERS
;
}
if
(
flow_act
.
action
&
MLX5_FLOW_CONTEXT_ACTION_MOD_HDR
)
if
(
flow_act
.
action
&
MLX5_FLOW_CONTEXT_ACTION_MOD_HDR
)
flow_act
.
modify_id
=
attr
->
mod_hdr_id
;
flow_act
.
modify_id
=
attr
->
mod_hdr_id
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录