Skip to content

Commit 5f6ed0b

Browse files
Merge pull request #206 from Mellanox/master_devel
master_devel merge to master (4.13.0)
2 parents ddb4350 + 4e8819c commit 5f6ed0b

File tree

114 files changed

+15004
-2588
lines changed

Some content is hidden

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

114 files changed

+15004
-2588
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ SUBDIRS = common mft_utils ext_libs $(TOOLS_CRYPTO) tools_layouts ${MTCR_CONF_DI
3434

3535
DIST_SUBDIRS = tracers
3636

37-
man_MANS = man/mstflint.1 man/mstconfig.1 man/mstmcra.1 man/mstmread.1 man/mstmwrite.1 man/mstmtserver.1 man/mstregdump.1 man/mstvpd.1 man/mstprivhost.1 man/mstarchive.1 man/mstreg.1 man/mstfwtrace.1 man/mstlink.1
37+
man_MANS = man/mstflint.1 man/mstconfig.1 man/mstmcra.1 man/mstmread.1 man/mstmwrite.1 man/mstmtserver.1 man/mstregdump.1 man/mstvpd.1 man/mstprivhost.1 man/mstarchive.1 man/mstreg.1 man/mstfwtrace.1 man/mstlink.1 man/mstcongestion.1 man/mstfwmanager.1 man/mstfwreset.1
3838

3939
EXTRA_DIST = \
4040
mstflint.spec \

configure.ac

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131

3232
dnl Process this file with autoconf to produce a configure script.
3333

34-
AC_INIT(mstflint, 4.12.0, [email protected])
34+
AC_INIT(mstflint, 4.13.0, [email protected])
3535

3636
AC_DEFINE_UNQUOTED([PROJECT], ["mstflint"], [Define the project name.])
3737
AC_SUBST([PROJECT])
3838

39-
AC_DEFINE_UNQUOTED([VERSION], ["4.12.0"], [Define the project version.])
39+
AC_DEFINE_UNQUOTED([VERSION], ["4.13.0"], [Define the project version.])
4040
AC_SUBST([VERSION])
4141

4242
AC_CONFIG_MACRO_DIR([m4])
@@ -142,21 +142,21 @@ AC_SUBST(ENABLE_FWMGR)
142142
# XML2
143143
AC_MSG_CHECKING(--enable-xml2 argument)
144144
AC_ARG_ENABLE(xml2,
145-
[ --enable-xml2 Enable mstflint libxml2 dependant features],
145+
[ --enable-xml2 Enable mstflint libxml2 dependent features],
146146
[enable_xml2="yes"],
147147
[enable_xml2="no"])
148148
AC_MSG_RESULT($enable_xml2)
149149
if test [ "x$enable_xml2" = "xyes" ] || [ test "x$enable_fw_mgr" = "xyes" ]; then
150150
# XML2 checks
151-
if test ! -f /usr/include/libxml2/libxml/xpath.h; then
152-
AC_MSG_NOTICE([checking for libxml2... no])
153-
AC_MSG_ERROR([libxml2: xpath.h is not found in the system PATH. make sure libxml2 headres are installed.])
154-
else
155-
AC_MSG_NOTICE([checking for libxml2... yes])
156-
XML2_INC_DIR=/usr/include/libxml2/
157-
fi
158-
AC_CHECK_LIB(xml2, xmlDocDumpFormatMemoryEnc,, AC_MSG_ERROR([cannot find xml2 xmlDocDumpFormatMemoryEnc() function. Try re-installing the library...]))
159-
AC_SUBST(XML2_INC_DIR)
151+
AC_LANG_PUSH([C++])
152+
if test "x$OS" = "xFreeBSD"; then
153+
CXXFLAGS="${CXXFLAGS} -isystem /usr/local/include/libxml2"
154+
else
155+
CXXFLAGS="${CXXFLAGS} -isystem /usr/include/libxml2"
156+
fi
157+
AC_CHECK_HEADER([libxml2/libxml/xpath.h],[],[AC_MSG_ERROR([libxml2: xpath.h is not found in the system PATH. make sure libxml2 headers are installed.])])
158+
AC_CHECK_LIB(xml2, xmlDocDumpFormatMemoryEnc,, AC_MSG_ERROR([cannot find xml2 xmlDocDumpFormatMemoryEnc() function. Try re-installing the library...]))
159+
AC_LANG_POP([C++])
160160
fi
161161

162162
AM_CONDITIONAL(DISABLE_XML2, [test "x$enable_xml2" = "xno"])

dev_mgt/tools_dev_types.c

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ enum dm_dev_type {
5454
DM_BRIDGE,
5555
DM_QSFP_CABLE,
5656
DM_SFP_CABLE,
57+
DM_LINKX // linkx chip
5758
};
5859

5960
struct device_info {
@@ -71,6 +72,13 @@ struct device_info {
7172
#define SFP_DIGITAL_DIAGNOSTIC_MONITORING_IMPLEMENTED_ADDR 92
7273
#define SFP_PAGING_IMPLEMENTED_INDICATOR_ADDR 64
7374

75+
#define ARDBEG_DEVID 0x6e
76+
#define ARDBEG_MIRRORED_DEVID 0x70
77+
#define BARITONE_DEVID 0x6b
78+
#define BARITONE_MIRRORED_DEVID 0x71
79+
#define MENHIT_DEVID 0x6f
80+
81+
7482
#ifdef CABLES_SUPP
7583
enum dm_dev_type getCableType(u_int8_t id)
7684
{
@@ -217,6 +225,15 @@ static struct device_info g_devs_info[] = {
217225
2, //port_num
218226
DM_HCA //dev_type
219227
},
228+
{
229+
DeviceBlueField2, //dm_id
230+
0x214, //hw_dev_i
231+
-1, //hw_rev_i
232+
-1, //sw_dev_i
233+
"BlueField2", //name
234+
2, //port_num
235+
DM_HCA //dev_type
236+
},
220237
{
221238
DeviceFPGANewton, //dm_id
222239
0xfff, //hw_dev_i - Dummy device ID till we have official one
@@ -307,6 +324,33 @@ static struct device_info g_devs_info[] = {
307324
80, //port_num
308325
DM_SWITCH //dev_type
309326
},
327+
{
328+
DeviceArdbeg, //dm_id
329+
0x6e, //hw_dev_i (ArdbegMirror 0x70)
330+
-1, //hw_rev_i
331+
-1, //sw_dev_i
332+
"Ardbeg", //name
333+
-1, //port_num
334+
DM_LINKX //dev_type
335+
},
336+
{
337+
DeviceBaritone, //dm_id
338+
0x6b, //hw_dev_i (BaritoneMirror 0x71)
339+
-1, //hw_rev_i
340+
-1, //sw_dev_i
341+
"Baritone", //name
342+
-1, //port_num
343+
DM_LINKX //dev_type
344+
},
345+
{
346+
DeviceMenhit, //dm_id
347+
0x6f, //hw_dev_i
348+
-1, //hw_rev_i
349+
-1, //sw_dev_i
350+
"Menhit", //name
351+
-1, //port_num
352+
DM_LINKX //dev_type
353+
},
310354
{
311355
DeviceSecureHost, //dm_id
312356
0xcafe, //hw_dev_i
@@ -316,6 +360,15 @@ static struct device_info g_devs_info[] = {
316360
-1, //port_num
317361
DM_UNKNOWN //dev_type
318362
},
363+
{
364+
DeviceSpectrum3, //dm_id
365+
0x250, //hw_dev_i
366+
-1, //hw_rev_i
367+
-1, //sw_dev_i
368+
"Spectrum3", //name
369+
128, //port_num NEED_CHECK
370+
DM_SWITCH //dev_type
371+
},
319372
{
320373
DeviceUnknown, //dm_id
321374
0, //hw_dev_i
@@ -374,6 +427,28 @@ int dm_get_device_id(mfile *mf,
374427
}
375428
#endif
376429
#ifdef CABLES_SUPP
430+
if (mf->tp == MST_LINKX_CHIP){
431+
432+
switch (mf->linkx_chip_devid){
433+
case ARDBEG_DEVID:
434+
case ARDBEG_MIRRORED_DEVID:
435+
*ptr_dm_dev_id = DeviceArdbeg;
436+
break;
437+
case BARITONE_DEVID:
438+
case BARITONE_MIRRORED_DEVID:
439+
*ptr_dm_dev_id = DeviceBaritone;
440+
break;
441+
case MENHIT_DEVID:
442+
*ptr_dm_dev_id = DeviceMenhit;
443+
break;
444+
default:
445+
return 1;
446+
break;
447+
}
448+
return 0;
449+
450+
}
451+
377452
if (mf->tp == MST_CABLE) {
378453
//printf("-D- Getting cable ID\n");
379454
if (mread4(mf, CABLEID_ADDR, &dword) != 4) {
@@ -505,11 +580,21 @@ int dm_dev_is_hca(dm_dev_id_t type)
505580
return get_entry(type)->dev_type == DM_HCA;
506581
}
507582

583+
int dm_dev_is_200g_speed_supported_hca(dm_dev_id_t type)
584+
{
585+
return (dm_dev_is_hca(type) && (get_entry(type)->hw_dev_id >= get_entry(DeviceConnectX6)->hw_dev_id));
586+
}
587+
508588
int dm_dev_is_switch(dm_dev_id_t type)
509589
{
510590
return get_entry(type)->dev_type == DM_SWITCH;
511591
}
512592

593+
int dm_dev_is_200g_speed_supported_switch(dm_dev_id_t type)
594+
{
595+
return (dm_dev_is_switch(type) && (get_entry(type)->hw_dev_id >= get_entry(DeviceQuantum)->hw_dev_id));
596+
}
597+
513598
int dm_dev_is_bridge(dm_dev_id_t type)
514599
{
515600
return get_entry(type)->dev_type == DM_BRIDGE;

dev_mgt/tools_dev_types.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ enum dm_dev_id
7979
DeviceConnectX5,
8080
DeviceConnectX6,
8181
DeviceBlueField,
82+
DeviceBlueField2,
8283
DeviceFPGA, // UnSupported
8384
DeviceSwitchIB2,
8485
DeviceFPGANewton,
@@ -88,11 +89,14 @@ enum dm_dev_id
8889
DeviceCableSFP,
8990
DeviceCableSFP51,
9091
DeviceCableSFP51Paging,
92+
DeviceArdbeg,
93+
DeviceBaritone,
94+
DeviceMenhit,
9195
DeviceSpectrum2,
9296
DeviceDummy,
9397
DeviceSecureHost,
9498
DeviceConnectX6DX,
95-
99+
DeviceSpectrum3, //Firebird
96100
DeviceEndMarker // Dummy Device - Marker for indicating end of devices when iterating
97101
};
98102

@@ -135,11 +139,21 @@ dm_dev_id_t dm_dev_str2type(const char *str);
135139
*/
136140
int dm_dev_is_hca(dm_dev_id_t type);
137141

142+
/**
143+
* A predicate returning if the hca supports 200G speed and above
144+
*/
145+
int dm_dev_is_200g_speed_supported_hca(dm_dev_id_t type);
146+
138147
/**
139148
* A predicate returning if the device is a switch
140149
*/
141150
int dm_dev_is_switch(dm_dev_id_t type);
142151

152+
/**
153+
* A predicate returning if the switch supports 200G speed and above
154+
*/
155+
int dm_dev_is_200g_speed_supported_switch(dm_dev_id_t type);
156+
143157
/**
144158
* A predicate returning if the device is a bridge
145159
*/

flint/cmd_line_parser.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,8 @@ void Flint::initCmdParser()
644644
' ',
645645
"<log_file>",
646646
"Print the burning status to the specified log file");
647+
648+
647649

648650
char flashList[FLASH_LIST_SZ] = {0};
649651
char flashParDesc[FLASH_LIST_SZ * 2];

flint/subcommands.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,6 +2339,7 @@ FlintStatus QuerySubCommand::printInfo(const fw_info_t& fwInfo, bool fullQuery)
23392339
else if (_flintParams.skip_rom_query) {
23402340
printf("Rom Info: type=UEFI version=skipped cpu=skipped\n");
23412341
printf(" type=PXE version=skipped devid=skipped cpu=skipped\n");
2342+
printf(" type=NVMe version=skipped devid=skipped cpu=skipped\n");
23422343
}
23432344

23442345
if (isFs2) {

0 commit comments

Comments
 (0)