Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
eba23d84
Commit
eba23d84
authored
Aug 29, 2020
by
Antoine Kaufmann
Browse files
i40e: add remove macvlan command
parent
cb310444
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
i40e_bm/i40e_adminq.cc
i40e_bm/i40e_adminq.cc
+13
-1
No files found.
i40e_bm/i40e_adminq.cc
View file @
eba23d84
...
@@ -227,7 +227,6 @@ void queue_admin_tx::cmd_run(void *desc, uint32_t idx, void *data)
...
@@ -227,7 +227,6 @@ void queue_admin_tx::cmd_run(void *desc, uint32_t idx, void *data)
std
::
cerr
<<
" update vsi parameters"
<<
std
::
endl
;
std
::
cerr
<<
" update vsi parameters"
<<
std
::
endl
;
/* TODO */
/* TODO */
desc_complete
(
d
,
idx
,
0
);
desc_complete
(
d
,
idx
,
0
);
/*} else if (d->opcode == i40e_aqc_opc_remove_macvlan) { std::cerr << " remove macvlan" << std::endl;*/
}
else
if
(
d
->
opcode
==
i40e_aqc_opc_set_dcb_parameters
)
{
}
else
if
(
d
->
opcode
==
i40e_aqc_opc_set_dcb_parameters
)
{
std
::
cerr
<<
" set dcb parameters"
<<
std
::
endl
;
std
::
cerr
<<
" set dcb parameters"
<<
std
::
endl
;
/* TODO */
/* TODO */
...
@@ -236,17 +235,30 @@ void queue_admin_tx::cmd_run(void *desc, uint32_t idx, void *data)
...
@@ -236,17 +235,30 @@ void queue_admin_tx::cmd_run(void *desc, uint32_t idx, void *data)
std
::
cerr
<<
" configure vsi bw limit"
<<
std
::
endl
;
std
::
cerr
<<
" configure vsi bw limit"
<<
std
::
endl
;
desc_complete
(
d
,
idx
,
0
);
desc_complete
(
d
,
idx
,
0
);
}
else
if
(
d
->
opcode
==
i40e_aqc_opc_query_vsi_bw_config
)
{
}
else
if
(
d
->
opcode
==
i40e_aqc_opc_query_vsi_bw_config
)
{
std
::
cerr
<<
" query vsi bw config"
<<
std
::
endl
;
struct
i40e_aqc_query_vsi_bw_config_resp
bwc
;
struct
i40e_aqc_query_vsi_bw_config_resp
bwc
;
memset
(
&
bwc
,
0
,
sizeof
(
bwc
));
memset
(
&
bwc
,
0
,
sizeof
(
bwc
));
for
(
size_t
i
=
0
;
i
<
8
;
i
++
)
for
(
size_t
i
=
0
;
i
<
8
;
i
++
)
bwc
.
qs_handles
[
i
]
=
0xffff
;
bwc
.
qs_handles
[
i
]
=
0xffff
;
desc_complete_indir
(
d
,
idx
,
0
,
&
bwc
,
sizeof
(
bwc
));
desc_complete_indir
(
d
,
idx
,
0
,
&
bwc
,
sizeof
(
bwc
));
}
else
if
(
d
->
opcode
==
i40e_aqc_opc_query_vsi_ets_sla_config
)
{
}
else
if
(
d
->
opcode
==
i40e_aqc_opc_query_vsi_ets_sla_config
)
{
std
::
cerr
<<
" query vsi ets sla config"
<<
std
::
endl
;
struct
i40e_aqc_query_vsi_ets_sla_config_resp
sla
;
struct
i40e_aqc_query_vsi_ets_sla_config_resp
sla
;
memset
(
&
sla
,
0
,
sizeof
(
sla
));
memset
(
&
sla
,
0
,
sizeof
(
sla
));
for
(
size_t
i
=
0
;
i
<
8
;
i
++
)
for
(
size_t
i
=
0
;
i
<
8
;
i
++
)
sla
.
share_credits
[
i
]
=
127
;
sla
.
share_credits
[
i
]
=
127
;
desc_complete_indir
(
d
,
idx
,
0
,
&
sla
,
sizeof
(
sla
));
desc_complete_indir
(
d
,
idx
,
0
,
&
sla
,
sizeof
(
sla
));
}
else
if
(
d
->
opcode
==
i40e_aqc_opc_remove_macvlan
)
{
std
::
cerr
<<
" remove macvlan"
<<
std
::
endl
;
struct
i40e_aqc_macvlan
*
m
=
reinterpret_cast
<
struct
i40e_aqc_macvlan
*>
(
d
->
params
.
raw
);
struct
i40e_aqc_remove_macvlan_element_data
*
rve
=
reinterpret_cast
<
struct
i40e_aqc_remove_macvlan_element_data
*>
(
data
);
for
(
uint16_t
i
=
0
;
i
<
m
->
num_addresses
;
i
++
)
rve
[
i
].
error_code
=
I40E_AQC_REMOVE_MACVLAN_SUCCESS
;
desc_complete_indir
(
d
,
idx
,
0
,
data
,
d
->
datalen
);
}
else
{
}
else
{
std
::
cerr
<<
" uknown opcode="
<<
d
->
opcode
<<
std
::
endl
;
std
::
cerr
<<
" uknown opcode="
<<
d
->
opcode
<<
std
::
endl
;
desc_complete
(
d
,
idx
,
I40E_AQ_RC_ESRCH
);
desc_complete
(
d
,
idx
,
I40E_AQ_RC_ESRCH
);
...
...
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