IB/opa_vnic: Add debugfs interface
cover IB/opa_vnic: Add debugfs interface
Hi Doug,
Here are the other two patches for opa_vnic. This adds a debugfs interface and that is why I'm sending it as a separate series apart from the rest of our submissions. The goal is to support view/modify of the VESW port config.
Patches can can also be found in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.15
---
Niranjana Vishwanathapura (2):
IB/opa_vnic: Add debugfs support to OPA VNIC IB/opa_vnic: Support adding OPA VNIC vports through debug interface
drivers/infiniband/ulp/opa_vnic/Makefile | 1 drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.c | 667 ++++++++++++++++++++ drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.h | 70 ++ .../infiniband/ulp/opa_vnic/opa_vnic_internal.h | 36 + drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 47 + 5 files changed, 789 insertions(+), 32 deletions(-) create mode 100644 drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.c create mode 100644 drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.h
--
-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170926140714.18110.74689.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org
PATCH 1/2 IB/opa_vnic: Add debugfs support to OPA VNIC
From: Niranjana Vishwanathapura <niranjana.vishwanathapura-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Add debugfs support to view/modify the VESW port configuration information including MAC to DLID translation table.
--- drivers/infiniband/ulp/opa_vnic/Makefile | 1 drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.c | 620 ++++++++++++++++++++ drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.h | 66 ++ .../infiniband/ulp/opa_vnic/opa_vnic_internal.h | 6 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 11 5 files changed, 700 insertions(+), 4 deletions(-) create mode 100644 drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.c create mode 100644 drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.h
drivers/infiniband/ulp/opa_vnic/Makefile +1 -0
@@ -5,3 +5,4 @@ obj-$(CONFIG_INFINIBAND_OPA_VNIC) += opa_vnic.o opa_vnic-y := opa_vnic_netdev.o opa_vnic_encap.o opa_vnic_ethtool.o \ opa_vnic_vema.o opa_vnic_vema_iface.o +opa_vnic-$(CONFIG_DEBUG_FS) += opa_vnic_debugfs.o
drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.c new file +620 -0
620 lines not on this page · raw message
drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.h new file +66 -0
66 lines not on this page · raw message
drivers/infiniband/ulp/opa_vnic/opa_vnic_internal.h +4 -2
@@ -219,8 +219,9 @@ struct opa_vnic_adapter {u8 flow_tbl[OPA_VNIC_FLOW_TBL_SIZE ]; -unsigned long trap_timeout; -u8 trap_count; +unsigned long trap_timeout; +u8 trap_count; +struct dentry *dentry; };/* Same as opa_veswport_mactable_entry, but without bitwise attribute */
@@ -326,5 +327,6 @@ void opa_vnic_set_per_veswport_info(struct opa_vnic_adapter *adapter,void opa_vnic_set_ethtool_ops (struct net_device *netdev);void opa_vnic_vema_send_trap (struct opa_vnic_adapter *adapter,struct __opa_veswport_trap *data,u32 lid); +void vema_get_pod_values (struct opa_veswport_info *port_info);#endif /* _OPA_VNIC_INTERNAL_H */
drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c +9 -2
@@ -57,6 +57,7 @@#include <rdma/opa_port_info.h> #include "opa_vnic_internal.h" +#include "opa_vnic_debugfs.h" #define DRV_VERSION "1.0"char opa_vnic_driver_name[] ="opa_vnic" ;
@@ -177,7 +178,7 @@ static inline bool vema_mac_tbl_req_ok(struct opa_veswport_mactable *mac_tbl)* Return the power on default values in the port info structure * in big endian format as required by MAD. */ -static inline void vema_get_pod_values (struct opa_veswport_info *port_info) +void vema_get_pod_values (struct opa_veswport_info *port_info) {memset (port_info,0 ,sizeof (*port_info)); port_info->vport.max_mac_tbl_ent =
@@ -213,6 +214,7 @@ static inline void vema_get_pod_values(struct opa_veswport_info *port_info)opa_vnic_rem_netdev (adapter); adapter =ERR_PTR (rc); } +opa_vnic_dbg_vport_init (adapter); }return adapter;
@@ -857,6 +859,7 @@ static int vema_rem_vport(int id, void *p, void *data) {struct opa_vnic_adapter *adapter = p; +opa_vnic_dbg_vport_exit (adapter);opa_vnic_rem_netdev (adapter);return 0 ; }
@@ -1057,9 +1060,12 @@ static int __init opa_vnic_init(void)pr_info ("OPA Virtual Network Driver - v%s\n" , opa_vnic_driver_version); +opa_vnic_dbg_init (); rc =ib_register_client (&opa_vnic_client); -if (rc) +if (rc) {pr_err ("VNIC driver register failed %d\n" , rc); +opa_vnic_dbg_exit (); + }return rc; }
@@ -1068,6 +1074,7 @@ static int __init opa_vnic_init(void)static void opa_vnic_deinit (void ) {ib_unregister_client (&opa_vnic_client); +opa_vnic_dbg_exit (); }module_exit (opa_vnic_deinit);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 IB/opa_vnic: Support adding OPA VNIC vports through debug interface
In reply to a message not in the archiveFrom: Niranjana Vishwanathapura <niranjana.vishwanathapura-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Adds the ability to create vnic vports manually from command line using the debugfs interface.
--- drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.c | 47 ++++++++++++++++++++ drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.h | 4 ++ .../infiniband/ulp/opa_vnic/opa_vnic_internal.h | 30 +++++++++++++ drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 38 ++++------------ 4 files changed, 90 insertions(+), 29 deletions(-)
drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.c +47 -0
@@ -604,6 +604,53 @@ void opa_vnic_dbg_vport_exit(struct opa_vnic_adapter *adapter)debugfs_remove_recursive (adapter->dentry); } +static int ctrl_add_vport_set (void *data,u64 val) +{ +struct opa_vnic_vema_port *port = data; +struct opa_vnic_adapter *adapter; +u8 vport = (u8 )val; + + adapter =vema_add_vport (port, vport); +return IS_ERR (adapter); +} + +DEFINE_SIMPLE_ATTRIBUTE (ctrl_add_vport,NULL , ctrl_add_vport_set,"%llu\n" ); + +void opa_vnic_dbg_ctrl_init (struct opa_vnic_ctrl_port *cport) +{ +struct opa_vnic_vema_port *port; +int i; + +if (!opa_vnic_dbg_root) +return ; + +for (i =1 ; i <= cport->num_ports; i++) { +char name[255 ]; + + port =vema_get_port (cport, i); +if (port->dentry) +continue ; +snprintf (name,sizeof (name),"%s.%02x" , +dev_name (&cport->ibdev->dev), i); + port->dentry =debugfs_create_dir (name, opa_vnic_dbg_root); +if (port->dentry) +DEBUGFS_FILE_CREATE ("add_vport" , port->dentry, port, + &ctrl_add_vport,0200 ); + } +} + +void opa_vnic_dbg_ctrl_exit (struct opa_vnic_ctrl_port *cport) +{ +struct opa_vnic_vema_port *port; +int i; + +for (i =1 ; i <= cport->num_ports; i++) { + port =vema_get_port (cport, i); +debugfs_remove_recursive (port->dentry); + port->dentry =NULL ; + } +} +void opa_vnic_dbg_init (void ) { opa_vnic_dbg_root =debugfs_create_dir (opa_vnic_driver_name,NULL );
drivers/infiniband/ulp/opa_vnic/opa_vnic_debugfs.h +4 -0
@@ -52,11 +52,15 @@*/ #ifdef CONFIG_DEBUG_FS +void opa_vnic_dbg_ctrl_init (struct opa_vnic_ctrl_port *cport); +void opa_vnic_dbg_ctrl_exit (struct opa_vnic_ctrl_port *cport);void opa_vnic_dbg_vport_init (struct opa_vnic_adapter *adapter);void opa_vnic_dbg_vport_exit (struct opa_vnic_adapter *adapter);void opa_vnic_dbg_init (void );void opa_vnic_dbg_exit (void );#else +static void opa_vnic_dbg_ctrl_init (struct opa_vnic_ctrl_port *cport) {} +static void opa_vnic_dbg_ctrl_exit (struct opa_vnic_ctrl_port *cport) {}static inline void opa_vnic_dbg_vport_init (struct opa_vnic_adapter *adapter) {}static inline void opa_vnic_dbg_vport_exit (struct opa_vnic_adapter *adapter) {}static inline void opa_vnic_dbg_init (void ) {}
drivers/infiniband/ulp/opa_vnic/opa_vnic_internal.h +30 -0
@@ -243,6 +243,32 @@ struct opa_vnic_mac_tbl_node {struct __opa_vnic_mactable_entry entry; }; +/** +* struct opa_vnic_vema_port -- VNIC VEMA port details +* @cport: pointer to port +* @mad_agent: pointer to mad agent for port +* @class_port_info: Class port info information. +* @tid: Transaction id +* @port_num: OPA port number +* @vport_idr: vnic ports idr +* @event_handler: ib event handler +* @dentry: Pointer to port debugfs node +* @lock: adapter interface lock +*/ +struct opa_vnic_vema_port { +struct opa_vnic_ctrl_port *cport; +struct ib_mad_agent *mad_agent; +struct opa_class_port_info class_port_info; +u64 tid; +u8 port_num; +struct idr vport_idr; +struct ib_event_handler event_handler; +struct dentry *dentry; + +/* Lock to query/update network adapter */ +struct mutex lock; +}; + #define v_dbg(format, arg...) \ netdev_dbg(adapter->netdev, format, ## arg) #define v_err(format, arg...) \
@@ -328,5 +354,9 @@ void opa_vnic_set_per_veswport_info(struct opa_vnic_adapter *adapter,void opa_vnic_vema_send_trap (struct opa_vnic_adapter *adapter,struct __opa_veswport_trap *data,u32 lid);void vema_get_pod_values (struct opa_veswport_info *port_info); +struct opa_vnic_vema_port *vema_get_port (struct opa_vnic_ctrl_port *cport, +u8 port_num); +struct opa_vnic_adapter *vema_add_vport (struct opa_vnic_vema_port *port, +u8 vport_num);#endif /* _OPA_VNIC_INTERNAL_H */
drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c +9 -29
@@ -91,30 +91,6 @@/* Maximum number of VNIC ports supported */ #define OPA_VNIC_MAX_NUM_VPORT 255 -/** -* struct opa_vnic_vema_port -- VNIC VEMA port details -* @cport: pointer to port -* @mad_agent: pointer to mad agent for port -* @class_port_info: Class port info information. -* @tid: Transaction id -* @port_num: OPA port number -* @vport_idr: vnic ports idr -* @event_handler: ib event handler -* @lock: adapter interface lock -*/ -struct opa_vnic_vema_port { -struct opa_vnic_ctrl_port *cport; -struct ib_mad_agent *mad_agent; -struct opa_class_port_info class_port_info; -u64 tid; -u8 port_num; -struct idr vport_idr; -struct ib_event_handler event_handler; - -/* Lock to query/update network adapter */ -struct mutex lock; -}; -static void opa_vnic_vema_add_one (struct ib_device *device);static void opa_vnic_vema_rem_one (struct ib_device *device,void *client_data);
@@ -197,8 +173,8 @@ void vema_get_pod_values(struct opa_veswport_info *port_info)* * Return a pointer to the vnic adapter structure */ -static struct opa_vnic_adapter *vema_add_vport (struct opa_vnic_vema_port *port, -u8 vport_num) +struct opa_vnic_adapter *vema_add_vport (struct opa_vnic_vema_port *port, +u8 vport_num) {struct opa_vnic_ctrl_port *cport = port->cport;struct opa_vnic_adapter *adapter;
@@ -213,8 +189,9 @@ void vema_get_pod_values(struct opa_veswport_info *port_info)if (rc <0 ) {opa_vnic_rem_netdev (adapter); adapter =ERR_PTR (rc); + }else { +opa_vnic_dbg_vport_init (adapter); } -opa_vnic_dbg_vport_init (adapter); }return adapter;
@@ -699,7 +676,7 @@ static void vema_recv(struct ib_mad_agent *mad_agent,* Return: ptr to requested opa_vnic_vema_port strucure * if success, NULL if not */ -static struct opa_vnic_vema_port * +struct opa_vnic_vema_port *vema_get_port (struct opa_vnic_ctrl_port *cport,u8 port_num) {struct opa_vnic_vema_port *port = (void *)cport +sizeof (*cport);
@@ -1025,8 +1002,10 @@ static void opa_vnic_vema_add_one(struct ib_device *device)/* Initialize opa vnic management agent (vema) */ rc =vema_register (cport); -if (!rc) +if (!rc) { +opa_vnic_dbg_ctrl_init (cport);c_info ("VNIC client initialized\n" ); + }ib_set_client_data (device, &opa_vnic_client, cport);opa_vnic_ctrl_config_dev (cport, true);
@@ -1049,6 +1028,7 @@ static void opa_vnic_vema_rem_one(struct ib_device *device,c_info ("removing VNIC client\n" );opa_vnic_ctrl_config_dev (cport, false); +opa_vnic_dbg_ctrl_exit (cport);vema_unregister (cport);kfree (cport); }
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Dennis Dalessandro
Hi Doug,
Here are the other two patches for
opa_vnic. This adds a debugfs interface and that is why I'm sending it as a separate series apart from the rest of our submissions. The goal is to support view/modify of the VESW port config.Patches can can also be found in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.15---
Can you elaborate more on the reasons why debugfs was chosen over more generic configuration tool?
+DEBUGFS_FILE_OPS(vport_state);
Maybe, I'm too biased with rdmatool, but I don't see many reasons to introduce debugfs for the ULP.
Thanks
A message that is not in the archive (sent off-list or not yet received): 20170926174946.GA1218-U/[email protected]
Quoted 12 lines · Leon Romanovsky
Quoted 10 lines · Dennis Dalessandro
Hi Doug,
Here are the other two patches for
opa_vnic. This adds a debugfs interface and that is why I'm sending it as a separate series apart from the rest of our submissions. The goal is to support view/modify of the VESW port config.Patches can can also be found in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.15---
Quoted 7 lines
Can you elaborate more on the reasons why debugfs was chosen over more generic configuration tool?
+DEBUGFS_FILE_OPS(vport_state);
Maybe, I'm too biased with rdmatool, but I don't see many reasons to introduce debugfs for the ULP.
And honestly, netdevices have so much tools to configure them (ethtool, iproute2, e.t.c.) so I completely don't understand the rationale behind debugfs for OPA-VNIC.
Thanks
Quoted 2 lines
Thanks
A message that is not in the archive (sent off-list or not yet received): 20170926175524.GA2297-U/[email protected]
Quoted 18 lines · Leon Romanovsky
Quoted 17 lines · Leon Romanovsky
Quoted 10 lines · Dennis Dalessandro
Hi Doug,
Here are the other two patches for
opa_vnic. This adds a debugfs interface and that is why I'm sending it as a separate series apart from the rest of our submissions. The goal is to support view/modify of the VESW port config.Patches can can also be found in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.15---
Can you elaborate more on the reasons why debugfs was chosen over more generic configuration tool?
+DEBUGFS_FILE_OPS(vport_state);
Quoted 9 lines
Quoted 2 lines
Maybe, I'm too biased with rdmatool, but I don't see many reasons to introduce debugfs for the ULP.
And honestly, netdevices have so much tools to configure them (ethtool, iproute2,
e.t.c.) so I completely don't understand the rationale behind debugfs for OPA-VNIC.Thanks
Hi,
The debugfs interface here is for VNIC port encapsulation configuration. They are not related to netdevice functionality.
They are for debug purpose only and not the supported configuration mechanism. Hence, I think they probably shouldn't be in a tool like rdmatool.
Niranjana
Quoted 4 lines
Quoted 2 lines
Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170926181214.GA41364-wPcXA7LoDC+1XWohqUldA0EOCMrvLtNR@public.gmane.org
Quoted 28 lines · Niranjana
Quoted 18 lines · Leon Romanovsky
Quoted 17 lines · Leon Romanovsky
Quoted 10 lines · Dennis Dalessandro
Hi Doug,
Here are the other two patches for
opa_vnic. This adds a debugfs interface and that is why I'm sending it as a separate series apart from the rest of our submissions. The goal is to support view/modify of the VESW port config.Patches can can also be found in my GitHub repo at:
https://github.com/ddalessa/kernel/tree/for-4.15---
Can you elaborate more on the reasons why debugfs was chosen over more generic configuration tool?
+DEBUGFS_FILE_OPS(vport_state);
Quoted 9 lines
Quoted 2 lines
Maybe, I'm too biased with rdmatool, but I don't see many reasons to introduce debugfs for the ULP.
And honestly, netdevices have so much tools to configure them (ethtool, iproute2,
e.t.c.) so I completely don't understand the rationale behind debugfs for OPA-VNIC.Thanks
Quoted 7 lines
Hi,
The debugfs interface here is for VNIC port encapsulation configuration. They are not related to netdevice functionality.
They are for debug purpose only and not the supported configuration mechanism. Hence, I think they probably shouldn't be in a tool like rdmatool.
Usually, there are two types of "debug":
* One time during development and such thing shouldn't be part of upstream code.
* During the daily work to understand misconfigured system and this is usable for all users of that feature.
There are exceptions to this rule, but they are not relevant for the general ULP which is supposed to work on all OPA-capable devices.
Thanks
Quoted 9 lines
Niranjana
Quoted 4 lines
Quoted 2 lines
Thanks
Quoted 6 lines · Niranjana
The debugfs interface here is for VNIC port encapsulation configuration.
They are not related to netdevice functionality.They are for debug purpose only and not the supported configuration mechanism.
OK, if this isn't the supported configuration mechanism, then what is the supported mechanism?
Signature · 8 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Doug Ledford
Quoted 6 lines · Niranjana
The debugfs interface here is for VNIC port encapsulation configuration.
They are not related to netdevice functionality.They are for debug purpose only and not the supported configuration mechanism.
OK, if this isn't the supported configuration mechanism, then what is the supported mechanism?
The supported mechanism is the Ethernet Manager providing the encapsulation configuration (as in the opa_vnic.txt documentation) This is just a debug interface to it.
Niranjana
Quoted 4 lines
-- >Doug Ledford <[email protected]>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170928184727.GA33282-wPcXA7LoDC+1XWohqUldA0EOCMrvLtNR@public.gmane.org
Quoted 9 lines · Niranjana
Quoted 8 lines · Doug Ledford
Quoted 6 lines · Niranjana
The debugfs interface here is for VNIC port encapsulation configuration.
They are not related to netdevice functionality.They are for debug purpose only and not the supported configuration mechanism.
Quoted 7 lines
Quoted 3 lines
OK, if this isn't the supported configuration mechanism, then what is the supported mechanism?
The supported mechanism is the Ethernet Manager providing the encapsulation configuration (as in the opa_vnic.txt documentation)
This is just a debug interface to it.
Add tracepoint for that.
Quoted 7 lines
Niranjana
Quoted 4 lines
-- >Doug Ledford <[email protected]>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
A message that is not in the archive (sent off-list or not yet received): 20170928185753.GG2297-U/[email protected]
Quoted 14 lines · Leon Romanovsky
Quoted 13 lines · Niranjana
Quoted 11 lines · Doug Ledford
Quoted 6 lines · Niranjana
The debugfs interface here is for VNIC port encapsulation configuration.
They are not related to netdevice functionality.They are for debug purpose only and not the supported configuration mechanism.
OK, if this isn't the supported configuration mechanism, then what is the supported mechanism?
Quoted 6 lines
Quoted 3 lines
The supported mechanism is the Ethernet Manager providing the encapsulation configuration (as in the opa_vnic.txt documentation)
This is just a debug interface to it.Add tracepoint for that.
For some reason, I couldn't find Leon's earlier response on my mutt! Will repond here.
It is not really for tracing, but to have a simple debug read/write access to the encapsution configuration which allows us to triage issues.
We find it useful on an ongoing basis, more like some standard NICs providing debugfs interface to read/write from/to some of its registers.
It is much easier to have it upstreamed and available instead of maintaining these patches separately.
Niranjana
Quoted 7 lines
Quoted 7 lines
Niranjana
Quoted 4 lines
-- >Doug Ledford <[email protected]>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170928190502.GA33289-wPcXA7LoDC+1XWohqUldA0EOCMrvLtNR@public.gmane.org
Quoted 22 lines · Niranjana
Quoted 14 lines · Leon Romanovsky
Quoted 13 lines · Niranjana
Quoted 11 lines · Doug Ledford
Quoted 6 lines · Niranjana
The debugfs interface here is for VNIC port encapsulation configuration.
They are not related to netdevice functionality.They are for debug purpose only and not the supported configuration mechanism.
OK, if this isn't the supported configuration mechanism, then what is the supported mechanism?
Quoted 6 lines
Quoted 3 lines
The supported mechanism is the Ethernet Manager providing the encapsulation configuration (as in the opa_vnic.txt documentation)
This is just a debug interface to it.Add tracepoint for that.
Quoted 8 lines
For some reason, I couldn't find Leon's earlier response on my mutt! Will repond here.
It is not really for tracing, but to have a simple debug read/write access to the encapsution configuration which allows us to triage issues.
We find it useful on an ongoing basis, more like some standard NICs providing debugfs interface to read/write from/to some of its registers.
Usually if such interface is spotted during submission, it will be requested to drop it. Ask Salil, who lately upstreamed new ETH driver and was asked to remove it.
Quoted 3 lines
It is much easier to have it upstreamed and available instead of maintaining these patches separately.
See, I didn't hear anyone here against adding such ability, but if you want to hear such, you can always CC netdev :).
The question, we are asking is related to the interface chosen to do so - debugfs, and IMHO it is a mistake.
Thanks
Quoted 12 lines
Niranjana
Quoted 7 lines
Quoted 7 lines
Niranjana
Quoted 4 lines
-- >Doug Ledford <[email protected]>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
A message that is not in the archive (sent off-list or not yet received): 20170928193740.GH2297-U/[email protected]
Quoted 6 lines · Leon Romanovsky
Quoted 2 lines
We find it useful on an ongoing basis, more like some standard NICs providing debugfs interface to read/write from/to some of its registers.
Usually if such interface is spotted during submission, it will be requested to drop it. Ask Salil, who lately upstreamed new ETH driver and was asked to remove it.
To be fair Salil's was dropped more or less for security reasons..
I think debugfs to dump truely internal state that is not intended to be API stable is reasonable.
Promise you will not be tooling on top of this, or use it as an interface in your manager or something crazy like that. You must be happy in all cases if your distro chooses to disable debugfs.
The problem I have with reviewing all the vnic patches is that I don't have a spec for vnic or anything, and I don't really know what the data being dumped is.. eg I would have been much happier if ipoib dump'd its debugfs stuff through netlink connected to neighbor objects
- I don't know if this is something similar...
As Leon says, you should really think carefully if this needs to be something that admins are going to be told to look at when vnic isn't working properly, as the ipoib debufs is. In that case netlink is a stable API and more suitable.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170928200258.GA27343-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
Quoted 5 lines · Jason Gunthorpe
Quoted 3 lines · Leon Romanovsky
Quoted 2 lines
We find it useful on an ongoing basis, more like some standard NICs providing debugfs interface to read/write from/to some of its registers.
Quoted 8 lines
Quoted 3 lines
Usually if such interface is spotted during submission, it will be requested to drop it. Ask Salil, who lately upstreamed new ETH driver and was asked to remove it.
To be fair Salil's was dropped more or less for security reasons..
I think debugfs to dump truely internal state that is not intended to be API stable is reasonable.
Yes, it can be ripped in any point of life, despite the screaming.
Quoted 4 lines
Promise you will not be tooling on top of this, or use it as an interface in your manager or something crazy like that. You must be happy in all cases if your distro chooses to disable debugfs.
Honestly, I don't know if we can trust to Intel's promises.
Among other promises, they wrote that OmniPath Ethernet Management part will be open sourced too. It seems like it wasn't at the end.
My google searches with words "ethernet manager omni-path" revealed nothing.
Quoted 4 lines
The problem I have with reviewing all the vnic patches is that I don't have a spec for vnic or anything, and I don't really know what the data being dumped is..
My problem with those patches that they don't show whole picture and the more important you have no way to see it, if you want it.
Right now, it is legal code-sharing and not truly open-source which I would like to see.
Quoted 10 lines
eg I would have been much happier if ipoib
dump'd its debugfs stuff through netlink connected to neighbor objects
- I don't know if this is something similar...As Leon says, you should really think carefully if this needs to be something that admins are going to be told to look at when vnic isn't working properly, as the ipoib debufs is. In that case netlink is a stable API and more suitable.
Jason
A message that is not in the archive (sent off-list or not yet received): 20170929054959.GJ2297-U/[email protected]
Quoted 10 lines · Leon Romanovsky
Quoted 9 lines · Jason Gunthorpe
Quoted 6 lines · Leon Romanovsky
Quoted 2 lines
We find it useful on an ongoing basis, more like some standard NICs providing debugfs interface to read/write from/to some of its registers.
Usually if such interface is spotted during submission, it will be requested to drop it. Ask Salil, who lately upstreamed new ETH driver and was asked to remove it.
Quoted 6 lines
Quoted 4 lines
To be fair Salil's was dropped more or less for security reasons..
I think debugfs to dump truely internal state that is not intended to be API stable is reasonable.
Yes, it can be ripped in any point of life, despite the screaming.
We also can't count on debugfs always being available. To me that's the main problem with it.
Quoted 10 lines
Quoted 3 lines
Promise you will not be tooling on top of this, or use it as an interface in your manager or something crazy like that. You must be happy in all cases if your distro chooses to disable debugfs.
Honestly, I don't know if we can trust to Intel's promises.
Among other promises, they wrote that OmniPath Ethernet Management part will be open sourced too. It seems like it wasn't at the end.
My google searches with words "ethernet manager omni-path" revealed nothing.
I don't think we are "at the end" yet. The EM is a work in progress and *will* be open sourced. I don't work on that bit of code so I can't tell you when exactly.
All of this vnic stuff is a work in progress and we are incrementally pushing things out. Iterative development, involving the community and all.
Quoted 11 lines
Quoted 3 lines
The problem I have with reviewing all the vnic patches is that I don't have a spec for vnic or anything, and I don't really know what the data being dumped is..
My problem with those patches that they don't show whole picture and the more important you have no way to see it, if you want it.
Right now, it is legal code-sharing and not truly open-source which I would like to see.Quoted 3 lines
eg I would have been much happier if ipoib
dump'd its debugfs stuff through netlink connected to neighbor objects
- I don't know if this is something similar...
Sounds like a good idea to me.
Quoted 4 lines
Quoted 4 lines
As Leon says, you should really think carefully if this needs to be something that admins are going to be told to look at when vnic isn't working properly, as the ipoib debufs is. In that case netlink is a stable API and more suitable.
Suffice to say, I think we agree on that. Leon and I have talked recently and I made it clear my intention is to lessen our reliance on debugfs and rely more on netlink by way of rdma tool.
-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): cbb65789-2d1e-779e-77f8-55b435511069-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Quoted 3 lines · Dennis Dalessandro
All of this vnic stuff is a work in progress and we are incrementally pushing things out. Iterative development, involving the community and all.
Can we get OPA-VNIC specification? Can we get OPA specification?
The Documentation/infiniband/opa_vnic.txt is not enough to really implement anything on top of that or communicate with that.
For example, what are the values and relations for routing control? How is entropy calculated?
Thanks
A message that is not in the archive (sent off-list or not yet received): 20170929145950.GC2965-U/[email protected]
Quoted 5 lines · Leon Romanovsky
Quoted 3 lines · Dennis Dalessandro
All of this vnic stuff is a work in progress and we are incrementally pushing things out. Iterative development, involving the community and all.
Quoted 8 lines
Can we get OPA-VNIC specification? Can we get OPA specification?
The
Documentation/infiniband/opa_vnic.txtis not enough to really implement anything on top of that or communicate with that.For example, what are the values and relations for routing control? How is entropy calculated?
You are putting a wrong interpretation to this patch.
EM provides the encapsulation configuration as in the opa_vnic documentation. EM will be opensourced when it is ready (VNIC is development in progress).
As mentioned, this patch is a simple *debug* hook to that encapsulation configuration and no more. That is why it is put under DEBUGFS.
I do see valid reason in Jason's and your earlier comments that it should a formal support to the admins.
But this patch was not mainly for that. I don't expect DEBUGFS to be turned on in all deployments.
I understand the question whether or not this patch should be in the kernel tree.
But it is a useful debug hook for debugging/triaging issues (similar to NIC having debug hook read/write some register), and convenient to have it available in the kernel than maintaining it separately.
Niranjana
Quoted 1 line
Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170929152707.GA34521-wPcXA7LoDC+1XWohqUldA0EOCMrvLtNR@public.gmane.org
Quoted 8 lines · Niranjana
You are putting a wrong interpretation to this patch.
EM provides the encapsulation configuration as in theopa_vnicdocumentation. EM will be opensourced when it is ready (VNIC is development in progress).As mentioned, this patch is a simple *debug* hook to that encapsulation configuration and no more.
That is why it is put under DEBUGFS.
Quoted 9 lines
I do see valid reason in Jason's and your earlier comments that it should a formal support to the admins.
But this patch was not mainly for that. I don't expect DEBUGFS to be turned on in all deployments.
I understand the question whether or not this patch should be in the kernel tree.
But it is a useful debug hook for debugging/triaging issues (similar to NIC having debug hook read/write some register), and convenient to have it available in the kernel than maintaining it separately.
I want to summarize the responses:
1. If you want to know (read) which vport is configured by EM, the tracepoints/prints will be enough to achieve it and no need to provide any debugfs.
2. If you want to debug and configure (write) the vport, you should answer on two questions.
2.a. Will it be local change and won't be propagated to EM?
2.b. Will this change be propagated to EM?
Upstream is not a development playground and you should submit your code once you think that it is ready. So we are assuming that VNIC is working and you are interested to debug your EM and such code doesn't belong to the kernel.
If you still insist on 2.a, the solution should be in your company: add debugfs locally, write tests, find and fix bugs and submit them to upstream.
There is no need to add "one-time" interface to clean the code.
Thanks
Quoted 6 lines
Niranjana
Quoted 1 line
Thanks
A message that is not in the archive (sent off-list or not yet received): 20171002042323.GG2031-U/[email protected]
Quoted 3 lines · Leon Romanovsky
Upstream is not a development playground and you should submit your code once you think that it is ready. So we are assuming that VNIC is working and you are interested to debug your EM and such code doesn't belong to the kernel.
This patch aside, I do have to take some issue with this statement. While upstream is not a "playground" we should be submitting code early. I keep harping on iterative development, show your work. Granted that doesn't mean write broken code and toss it over the fence to kernel.org, but pieces that can be broken up and tested on their own are best.
Quoted 3 lines
If you still insist on 2.a, the solution should be in your company: add debugfs locally, write tests, find and fix bugs and submit them to upstream.
Now back to this patch series. debugfs vs NetLink, I don't think it really matters if the rationale for having the patch in the first place is wrong. In other words you would have still opposed this even if it were NetLink I assume? We are discussing internally but for now I think this series can be dropped.
Quoted 1 line
There is no need to add "one-time" interface to clean the code.
That I would agree to.
-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 68a08a10-5b8d-4fd7-ad06-8add423bd3cd-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Quoted 10 lines · Dennis Dalessandro
Quoted 3 lines · Leon Romanovsky
Upstream is not a development playground and you should submit your code once you think that it is ready. So we are assuming that VNIC is working and you are interested to debug your EM and such code doesn't belong to the kernel.
This patch aside, I do have to take some issue with this statement. While upstream is not a "playground" we should be submitting code early. I keep harping on iterative development, show your work. Granted that doesn't mean write broken code and toss it over the fence to kernel.org, but pieces that can be broken up and tested on their own are best.
We are talking about the same. Large feature (VNIC) was divided to sub-tasks like patches and maybe sub-features. Those sub-features were submitted early (iterative development), which is good and sounds right for me too.
But the expectation is that these building blocks are tested and working and you don't need to debug them.
For sure, there are always exceptions to the statements above and various counters, states, dumps e.t.c are good examples for such exceptions, because they add visibility to the system, but they don't change the system.
Quoted 10 lines
Quoted 4 lines
If you still insist on 2.a, the solution should be in your company: add debugfs locally, write tests, find and fix bugs and submit them to upstream.
Now back to this patch series. debugfs vs NetLink, I don't think it really matters if the rationale for having the patch in the first place is wrong. In other words you would have still opposed this even if it were NetLink I assume? We are discussing internally but for now I think this series can be dropped.
I am more than happy to see OPA-VNIC configurations in NetLink, but don't forget that it will be part of ABI and users will use it, so you need to ensure that the OPA-VNIC network won't die after one of the nodes will change vport value.
Before you are rushing to implement it via netlink, you should ask yourself WHY this functionality is needed for the users.
Quoted 6 lines
Quoted 2 lines
There is no need to add "one-time" interface to clean the code.
That I would agree to.
-Denny
A message that is not in the archive (sent off-list or not yet received): 20171003051521.GA26055-U/[email protected]
Quoted 36 lines · Leon Romanovsky
Quoted 10 lines · Dennis Dalessandro
Quoted 3 lines · Leon Romanovsky
Upstream is not a development playground and you should submit your code once you think that it is ready. So we are assuming that VNIC is working and you are interested to debug your EM and such code doesn't belong to the kernel.
This patch aside, I do have to take some issue with this statement. While upstream is not a "playground" we should be submitting code early. I keep harping on iterative development, show your work. Granted that doesn't mean write broken code and toss it over the fence to kernel.org, but pieces that can be broken up and tested on their own are best.
We are talking about the same. Large feature (VNIC) was divided to sub-tasks like patches and maybe sub-features. Those sub-features were submitted early (iterative development), which is good and sounds right for me too.
But the expectation is that these building blocks are tested and working and you don't need to debug them.
For sure, there are always exceptions to the statements above and various counters, states, dumps
e.t.care good examples for such exceptions, because they add visibility to the system, but they don't change the system.Quoted 10 lines
Quoted 4 lines
If you still insist on 2.a, the solution should be in your company: add debugfs locally, write tests, find and fix bugs and submit them to upstream.
Now back to this patch series. debugfs vs NetLink, I don't think it really matters if the rationale for having the patch in the first place is wrong. In other words you would have still opposed this even if it were NetLink I assume? We are discussing internally but for now I think this series can be dropped.
Quoted 8 lines
I am more than happy to see OPA-VNIC configurations in NetLink, but don't forget that it will be part of ABI and users will use it, so you need to ensure that the OPA-VNIC network won't die after one of the nodes will change vport value.
Before you are rushing to implement it via netlink, you should ask yourself WHY this functionality is needed for the users.
Alright, let us drop this VNIC debugfs patch series.
Niranjana
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html