Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dario Alcocer <dalcocer@helixd.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org
Subject: Re: Marvell switch port shows LOWERLAYERDOWN, ping fails
Date: Fri, 6 Aug 2021 09:03:15 -0700	[thread overview]
Message-ID: <de5758c6-4379-1b70-19ff-d6dd2b3ea269@helixd.com> (raw)
In-Reply-To: <fea36eed-eaff-4381-b2fd-628b60237aab@helixd.com>

I got mv88e6xxx_dump working by doing the following:

* copying nexthop.h and rtnetlink.h from /usr/include/uapi/linux to 
/usr/include/linux
* commenting out the undefined symbol references (see patch below)

diff --git a/desc-devlink.c b/desc-devlink.c
index 820121e..1876b65 100644
--- a/desc-devlink.c
+++ b/desc-devlink.c
@@ -182,24 +182,24 @@ static const struct pretty_nla_desc __attr_desc[] = {

  	NLATTR_DESC_STRING(DEVLINK_ATTR_FLASH_UPDATE_FILE_NAME),
  	NLATTR_DESC_STRING(DEVLINK_ATTR_FLASH_UPDATE_COMPONENT),
-	NLATTR_DESC_STRING(DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG),
-	NLATTR_DESC_U64(DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE),
-	NLATTR_DESC_U64(DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL),
+	//NLATTR_DESC_STRING(DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG),
+	//NLATTR_DESC_U64(DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE),
+	//NLATTR_DESC_U64(DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL),

-	NLATTR_DESC_U16(DEVLINK_ATTR_PORT_PCI_PF_NUMBER),
-	NLATTR_DESC_U16(DEVLINK_ATTR_PORT_PCI_VF_NUMBER),
+	//NLATTR_DESC_U16(DEVLINK_ATTR_PORT_PCI_PF_NUMBER),
+	//NLATTR_DESC_U16(DEVLINK_ATTR_PORT_PCI_VF_NUMBER),

  	//DEVLINK_ATTR_STATS,				/* nested */

-	NLATTR_DESC_STRING(DEVLINK_ATTR_TRAP_NAME),
-	NLATTR_DESC_U8(DEVLINK_ATTR_TRAP_ACTION),
-	NLATTR_DESC_U8(DEVLINK_ATTR_TRAP_TYPE),
-	NLATTR_DESC_FLAG(DEVLINK_ATTR_TRAP_GENERIC),
+	//NLATTR_DESC_STRING(DEVLINK_ATTR_TRAP_NAME),
+	//NLATTR_DESC_U8(DEVLINK_ATTR_TRAP_ACTION),
+	//NLATTR_DESC_U8(DEVLINK_ATTR_TRAP_TYPE),
+	//NLATTR_DESC_FLAG(DEVLINK_ATTR_TRAP_GENERIC),
  	//DEVLINK_ATTR_TRAP_METADATA,			/* nested */
-	NLATTR_DESC_STRING(DEVLINK_ATTR_TRAP_GROUP_NAME),
+	//NLATTR_DESC_STRING(DEVLINK_ATTR_TRAP_GROUP_NAME),

-	NLATTR_DESC_U8(DEVLINK_ATTR_RELOAD_FAILED),
-	NLATTR_DESC_U64(DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_NS),
+	//NLATTR_DESC_U8(DEVLINK_ATTR_RELOAD_FAILED),
+	//NLATTR_DESC_U64(DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_NS),
  };

  const struct pretty_nlmsg_desc devlink_msg_desc[] = {
@@ -264,16 +264,16 @@ const struct pretty_nlmsg_desc devlink_msg_desc[] = {
  	NLMSG_DESC(DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET, attr),
  	NLMSG_DESC(DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR, attr),
  	NLMSG_DESC(DEVLINK_CMD_FLASH_UPDATE, attr),
-	NLMSG_DESC(DEVLINK_CMD_FLASH_UPDATE_END, attr),
-	NLMSG_DESC(DEVLINK_CMD_FLASH_UPDATE_STATUS, attr),
-	NLMSG_DESC(DEVLINK_CMD_TRAP_GET, attr),
-	NLMSG_DESC(DEVLINK_CMD_TRAP_SET, attr),
-	NLMSG_DESC(DEVLINK_CMD_TRAP_NEW, attr),
-	NLMSG_DESC(DEVLINK_CMD_TRAP_DEL, attr),
-	NLMSG_DESC(DEVLINK_CMD_TRAP_GROUP_GET, attr),
-	NLMSG_DESC(DEVLINK_CMD_TRAP_GROUP_SET, attr),
-	NLMSG_DESC(DEVLINK_CMD_TRAP_GROUP_NEW, attr),
-	NLMSG_DESC(DEVLINK_CMD_TRAP_GROUP_DEL, attr),
+	//NLMSG_DESC(DEVLINK_CMD_FLASH_UPDATE_END, attr),
+	//NLMSG_DESC(DEVLINK_CMD_FLASH_UPDATE_STATUS, attr),
+	//NLMSG_DESC(DEVLINK_CMD_TRAP_GET, attr),
+	//NLMSG_DESC(DEVLINK_CMD_TRAP_SET, attr),
+	//NLMSG_DESC(DEVLINK_CMD_TRAP_NEW, attr),
+	//NLMSG_DESC(DEVLINK_CMD_TRAP_DEL, attr),
+	//NLMSG_DESC(DEVLINK_CMD_TRAP_GROUP_GET, attr),
+	//NLMSG_DESC(DEVLINK_CMD_TRAP_GROUP_SET, attr),
+	//NLMSG_DESC(DEVLINK_CMD_TRAP_GROUP_NEW, attr),
+	//NLMSG_DESC(DEVLINK_CMD_TRAP_GROUP_DEL, attr),
  };

  const unsigned int devlink_msg_n_desc = ARRAY_SIZE(devlink_msg_desc);
diff --git a/mv88e6xxx_dump.c b/mv88e6xxx_dump.c
index 09a67c1..a744a74 100644
--- a/mv88e6xxx_dump.c
+++ b/mv88e6xxx_dump.c
@@ -220,17 +220,17 @@ static const enum mnl_attr_data_type 
devlink_policy[DEVLINK_ATTR_MAX + 1] = {
  	[DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS] = MNL_TYPE_U64,
  	[DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD] = MNL_TYPE_U64,
  	[DEVLINK_ATTR_FLASH_UPDATE_COMPONENT] = MNL_TYPE_STRING,
-	[DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG] = MNL_TYPE_STRING,
-	[DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE] = MNL_TYPE_U64,
-	[DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL] = MNL_TYPE_U64,
-	[DEVLINK_ATTR_STATS] = MNL_TYPE_NESTED,
-	[DEVLINK_ATTR_TRAP_NAME] = MNL_TYPE_STRING,
-	[DEVLINK_ATTR_TRAP_ACTION] = MNL_TYPE_U8,
-	[DEVLINK_ATTR_TRAP_TYPE] = MNL_TYPE_U8,
-	[DEVLINK_ATTR_TRAP_GENERIC] = MNL_TYPE_FLAG,
-	[DEVLINK_ATTR_TRAP_METADATA] = MNL_TYPE_NESTED,
-	[DEVLINK_ATTR_TRAP_GROUP_NAME] = MNL_TYPE_STRING,
-	[DEVLINK_ATTR_RELOAD_FAILED] = MNL_TYPE_U8,
+	//[DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG] = MNL_TYPE_STRING,
+	//[DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE] = MNL_TYPE_U64,
+	//[DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL] = MNL_TYPE_U64,
+	//[DEVLINK_ATTR_STATS] = MNL_TYPE_NESTED,
+	//[DEVLINK_ATTR_TRAP_NAME] = MNL_TYPE_STRING,
+	//[DEVLINK_ATTR_TRAP_ACTION] = MNL_TYPE_U8,
+	//[DEVLINK_ATTR_TRAP_TYPE] = MNL_TYPE_U8,
+	//[DEVLINK_ATTR_TRAP_GENERIC] = MNL_TYPE_FLAG,
+	//[DEVLINK_ATTR_TRAP_METADATA] = MNL_TYPE_NESTED,
+	//[DEVLINK_ATTR_TRAP_GROUP_NAME] = MNL_TYPE_STRING,
+	//[DEVLINK_ATTR_RELOAD_FAILED] = MNL_TYPE_U8,
  };

  static int attr_cb(const struct nlattr *attr, void *data)


  reply	other threads:[~2021-08-06 16:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 22:55 Dario Alcocer
2021-07-23 13:41 ` Andrew Lunn
2021-07-23 18:21   ` Dario Alcocer
2021-07-23 18:25     ` Andrew Lunn
2021-07-23 18:36       ` Dario Alcocer
2021-07-23 21:58         ` Dario Alcocer
2021-07-24 17:34           ` Andrew Lunn
2021-07-25  2:26             ` Dario Alcocer
2021-07-25  2:36               ` Dario Alcocer
2021-07-27  1:39                 ` Dario Alcocer
2021-07-28 18:07                   ` Dario Alcocer
2021-07-28 18:23                     ` Andrew Lunn
2021-07-28 18:33                       ` Dario Alcocer
2021-07-28 19:24                         ` Andrew Lunn
2021-07-28 19:37                           ` Dario Alcocer
2021-07-28 20:47                             ` Andrew Lunn
2021-07-28 20:54                               ` Dario Alcocer
2021-07-28 21:09                             ` Andrew Lunn
2021-08-05 21:44                             ` Dario Alcocer
2021-08-06 16:03                               ` Dario Alcocer [this message]
2021-08-06 23:46                                 ` Dario Alcocer
2021-08-07 18:57                                   ` Andrew Lunn
2021-08-09 16:28                                     ` Dario Alcocer
2021-08-10 20:58                                       ` Dario Alcocer
2021-08-10 22:13                                         ` Andrew Lunn
2021-08-11 13:16                                           ` Dario Alcocer
2021-08-07 17:44                               ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de5758c6-4379-1b70-19ff-d6dd2b3ea269@helixd.com \
    --to=dalcocer@helixd.com \
    --cc=andrew@lunn.ch \
    --cc=netdev@vger.kernel.org \
    --subject='Re: Marvell switch port shows LOWERLAYERDOWN, ping fails' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).