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
931dd25b
Commit
931dd25b
authored
Sep 10, 2020
by
Antoine Kaufmann
Browse files
i40e: add get phy abilities command
parent
edc03651
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
i40e_bm/i40e_adminq.cc
i40e_bm/i40e_adminq.cc
+18
-2
i40e_bm/i40e_bm.h
i40e_bm/i40e_bm.h
+1
-1
No files found.
i40e_bm/i40e_adminq.cc
View file @
931dd25b
...
@@ -37,9 +37,10 @@ void queue_admin_tx::desc_complete(struct i40e_aq_desc *d, uint32_t idx,
...
@@ -37,9 +37,10 @@ void queue_admin_tx::desc_complete(struct i40e_aq_desc *d, uint32_t idx,
}
}
void
queue_admin_tx
::
desc_complete_indir
(
struct
i40e_aq_desc
*
d
,
uint32_t
idx
,
void
queue_admin_tx
::
desc_complete_indir
(
struct
i40e_aq_desc
*
d
,
uint32_t
idx
,
uint16_t
retval
,
const
void
*
data
,
size_t
len
,
uint16_t
extra_flags
)
uint16_t
retval
,
const
void
*
data
,
size_t
len
,
uint16_t
extra_flags
,
bool
ignore_datalen
)
{
{
if
(
len
>
d
->
datalen
)
{
if
(
!
ignore_datalen
&&
len
>
d
->
datalen
)
{
std
::
cerr
<<
"queue_admin_tx::desc_complete_indir: data too long ("
std
::
cerr
<<
"queue_admin_tx::desc_complete_indir: data too long ("
<<
len
<<
") got buffer for ("
<<
d
->
datalen
<<
")"
<<
std
::
endl
;
<<
len
<<
") got buffer for ("
<<
d
->
datalen
<<
")"
<<
std
::
endl
;
abort
();
abort
();
...
@@ -139,6 +140,21 @@ void queue_admin_tx::cmd_run(void *desc, uint32_t idx, void *data)
...
@@ -139,6 +140,21 @@ void queue_admin_tx::cmd_run(void *desc, uint32_t idx, void *data)
ar
->
command_flags
=
I40E_AQC_LAN_ADDR_VALID
|
I40E_AQC_PORT_ADDR_VALID
;
ar
->
command_flags
=
I40E_AQC_LAN_ADDR_VALID
|
I40E_AQC_PORT_ADDR_VALID
;
desc_complete_indir
(
d
,
idx
,
0
,
&
ard
,
sizeof
(
ard
));
desc_complete_indir
(
d
,
idx
,
0
,
&
ard
,
sizeof
(
ard
));
}
else
if
(
d
->
opcode
==
i40e_aqc_opc_get_phy_abilities
)
{
std
::
cerr
<<
" get phy abilities"
<<
std
::
endl
;
struct
i40e_aq_get_phy_abilities_resp
par
;
memset
(
&
par
,
0
,
sizeof
(
par
));
par
.
phy_type
=
(
1ULL
<<
I40E_PHY_TYPE_40GBASE_CR4_CU
);
par
.
link_speed
=
I40E_LINK_SPEED_40GB
;
par
.
abilities
=
I40E_AQ_PHY_LINK_ENABLED
|
I40E_AQ_PHY_AN_ENABLED
;
par
.
eee_capability
=
0
;
d
->
params
.
external
.
param0
=
0
;
d
->
params
.
external
.
param1
=
0
;
desc_complete_indir
(
d
,
idx
,
0
,
&
par
,
sizeof
(
par
),
0
,
true
);
}
else
if
(
d
->
opcode
==
i40e_aqc_opc_get_link_status
)
{
}
else
if
(
d
->
opcode
==
i40e_aqc_opc_get_link_status
)
{
std
::
cerr
<<
" link status"
<<
std
::
endl
;
std
::
cerr
<<
" link status"
<<
std
::
endl
;
struct
i40e_aqc_get_link_status
*
gls
=
struct
i40e_aqc_get_link_status
*
gls
=
...
...
i40e_bm/i40e_bm.h
View file @
931dd25b
...
@@ -115,7 +115,7 @@ class queue_admin_tx : public queue_base {
...
@@ -115,7 +115,7 @@ class queue_admin_tx : public queue_base {
// complete indirect response
// complete indirect response
void
desc_complete_indir
(
struct
i40e_aq_desc
*
d
,
uint32_t
idx
,
void
desc_complete_indir
(
struct
i40e_aq_desc
*
d
,
uint32_t
idx
,
uint16_t
retval
,
const
void
*
data
,
size_t
len
,
uint16_t
retval
,
const
void
*
data
,
size_t
len
,
uint16_t
extra_flags
=
0
);
uint16_t
extra_flags
=
0
,
bool
ignore_datalen
=
false
);
// run command
// run command
virtual
void
cmd_run
(
void
*
desc
,
uint32_t
idx
,
void
*
data
);
virtual
void
cmd_run
(
void
*
desc
,
uint32_t
idx
,
void
*
data
);
...
...
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