Message ID | 1510657185-5791-1-git-send-email-michalx.weglicki@intel.com |
---|---|
State | Accepted |
Delegated to: | Ian Stokes |
Headers | show |
Series | [ovs-dev,v6,1/2] netdev-dpdk: extend netdev_dpdk_get_status to include if_type and if_descr | expand |
Hello Ben, I've added missing missing documentation as suggested in your comment. If there is something else you would like me to do, just let me know. Br, Michal. > -----Original Message----- > From: Weglicki, MichalX > Sent: Tuesday, November 14, 2017 12:00 PM > To: dev@openvswitch.org > Cc: Weglicki, MichalX <michalx.weglicki@intel.com>; Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> > Subject: [PATCH v6 1/2] netdev-dpdk: extend netdev_dpdk_get_status to include if_type and if_descr > > This commit extends netdev_dpdk_get_status API to include additional > driver-related information: if_type and if_descr. > > v2->v3: Code rebase. > v3->v4: Minor comments applied. > v5->v6: Adds DPDK port specific description in documentation. > > Co-authored-by: Michal Weglicki <michalx.weglicki@intel.com> > Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> > Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> > --- > lib/netdev-dpdk.c | 9 ++++++++ > vswitchd/vswitch.xml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 73 insertions(+) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > index 76e79be..3560bdd 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -36,6 +36,7 @@ > #include <rte_meter.h> > #include <rte_pci.h> > #include <rte_vhost.h> > +#include <rte_version.h> > > #include "dirs.h" > #include "dp-packet.h" > @@ -2509,6 +2510,14 @@ netdev_dpdk_get_status(const struct netdev *netdev, struct smap *args) > smap_add_format(args, "max_vfs", "%u", dev_info.max_vfs); > smap_add_format(args, "max_vmdq_pools", "%u", dev_info.max_vmdq_pools); > > + /* Querying the DPDK library for iftype may be done in future, pending > + * support; cf. RFC 3635 Section 3.2.4. */ > + enum { IF_TYPE_ETHERNETCSMACD = 6 }; > + > + smap_add_format(args, "if_type", "%"PRIu32, IF_TYPE_ETHERNETCSMACD); > + smap_add_format(args, "if_descr", "%s %s", rte_version(), > + dev_info.driver_name); > + > if (dev_info.pci_dev) { > smap_add_format(args, "pci-vendor_id", "0x%u", > dev_info.pci_dev->id.vendor_id); > diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml > index c145e1a..72cf353 100644 > --- a/vswitchd/vswitch.xml > +++ b/vswitchd/vswitch.xml > @@ -2815,6 +2815,70 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ > Whether carrier is detected on <ref column="status" > key="tunnel_egress_iface"/>. > </column> > + > + <group title="dpdk"> > + <p> > + DPDK specific interface status options. > + </p> > + > + <column name="status" key="port_no"> > + DPDK port ID. > + </column> > + > + <column name="status" key="numa_id"> > + NUMA socket ID to which an Ethernet device is connected. > + </column> > + > + <column name="status" key="min_rx_bufsize"> > + Minimum size of RX buffer. > + </column> > + > + <column name="status" key="max_rx_pktlen"> > + Maximum configurable length of RX pkt. > + </column> > + > + <column name="status" key="max_rx_queues"> > + Maximum number of RX queues. > + </column> > + > + <column name="status" key="max_tx_queues"> > + Maximum number of TX queues. > + </column> > + > + <column name="status" key="max_mac_addrs"> > + Maximum number of MAC addresses. > + </column> > + > + <column name="status" key="max_hash_mac_addrs"> > + Maximum number of hash MAC addresses for MTA and UTA. > + </column> > + > + <column name="status" key="max_vfs"> > + Maximum number of hash MAC addresses for MTA and UTA. > + Maximum number of VFs. > + </column> > + > + <column name="status" key="max_vmdq_pools"> > + Maximum number of VMDq pools. > + </column> > + > + <column name="status" key="if_type"> > + Interface type ID according to IANA ifTYPE MIB definitions. > + </column> > + > + <column name="status" key="if_descr"> > + Interface description string. > + </column> > + > + <column name="status" key="pci-vendor_id"> > + Vendor ID of PCI device. > + </column> > + > + <column name="status" key="pci-device_id"> > + Device ID of PCI device. > + </column> > + > + </group> > </group> > > <group title="Statistics"> > -- > 1.8.3.1
I've given my feedback so now I'd hope that Ian Stokes will review this and consider this for the dpdk_merge branch. On Tue, Nov 28, 2017 at 02:45:07PM +0000, Weglicki, MichalX wrote: > Hello Ben, > > I've added missing missing documentation as suggested in your comment. If there is something else you would like me to do, just let me know. > > Br, > Michal. > > > -----Original Message----- > > From: Weglicki, MichalX > > Sent: Tuesday, November 14, 2017 12:00 PM > > To: dev@openvswitch.org > > Cc: Weglicki, MichalX <michalx.weglicki@intel.com>; Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> > > Subject: [PATCH v6 1/2] netdev-dpdk: extend netdev_dpdk_get_status to include if_type and if_descr > > > > This commit extends netdev_dpdk_get_status API to include additional > > driver-related information: if_type and if_descr. > > > > v2->v3: Code rebase. > > v3->v4: Minor comments applied. > > v5->v6: Adds DPDK port specific description in documentation. > > > > Co-authored-by: Michal Weglicki <michalx.weglicki@intel.com> > > Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> > > Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> > > --- > > lib/netdev-dpdk.c | 9 ++++++++ > > vswitchd/vswitch.xml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 73 insertions(+) > > > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > > index 76e79be..3560bdd 100644 > > --- a/lib/netdev-dpdk.c > > +++ b/lib/netdev-dpdk.c > > @@ -36,6 +36,7 @@ > > #include <rte_meter.h> > > #include <rte_pci.h> > > #include <rte_vhost.h> > > +#include <rte_version.h> > > > > #include "dirs.h" > > #include "dp-packet.h" > > @@ -2509,6 +2510,14 @@ netdev_dpdk_get_status(const struct netdev *netdev, struct smap *args) > > smap_add_format(args, "max_vfs", "%u", dev_info.max_vfs); > > smap_add_format(args, "max_vmdq_pools", "%u", dev_info.max_vmdq_pools); > > > > + /* Querying the DPDK library for iftype may be done in future, pending > > + * support; cf. RFC 3635 Section 3.2.4. */ > > + enum { IF_TYPE_ETHERNETCSMACD = 6 }; > > + > > + smap_add_format(args, "if_type", "%"PRIu32, IF_TYPE_ETHERNETCSMACD); > > + smap_add_format(args, "if_descr", "%s %s", rte_version(), > > + dev_info.driver_name); > > + > > if (dev_info.pci_dev) { > > smap_add_format(args, "pci-vendor_id", "0x%u", > > dev_info.pci_dev->id.vendor_id); > > diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml > > index c145e1a..72cf353 100644 > > --- a/vswitchd/vswitch.xml > > +++ b/vswitchd/vswitch.xml > > @@ -2815,6 +2815,70 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ > > Whether carrier is detected on <ref column="status" > > key="tunnel_egress_iface"/>. > > </column> > > + > > + <group title="dpdk"> > > + <p> > > + DPDK specific interface status options. > > + </p> > > + > > + <column name="status" key="port_no"> > > + DPDK port ID. > > + </column> > > + > > + <column name="status" key="numa_id"> > > + NUMA socket ID to which an Ethernet device is connected. > > + </column> > > + > > + <column name="status" key="min_rx_bufsize"> > > + Minimum size of RX buffer. > > + </column> > > + > > + <column name="status" key="max_rx_pktlen"> > > + Maximum configurable length of RX pkt. > > + </column> > > + > > + <column name="status" key="max_rx_queues"> > > + Maximum number of RX queues. > > + </column> > > + > > + <column name="status" key="max_tx_queues"> > > + Maximum number of TX queues. > > + </column> > > + > > + <column name="status" key="max_mac_addrs"> > > + Maximum number of MAC addresses. > > + </column> > > + > > + <column name="status" key="max_hash_mac_addrs"> > > + Maximum number of hash MAC addresses for MTA and UTA. > > + </column> > > + > > + <column name="status" key="max_vfs"> > > + Maximum number of hash MAC addresses for MTA and UTA. > > + Maximum number of VFs. > > + </column> > > + > > + <column name="status" key="max_vmdq_pools"> > > + Maximum number of VMDq pools. > > + </column> > > + > > + <column name="status" key="if_type"> > > + Interface type ID according to IANA ifTYPE MIB definitions. > > + </column> > > + > > + <column name="status" key="if_descr"> > > + Interface description string. > > + </column> > > + > > + <column name="status" key="pci-vendor_id"> > > + Vendor ID of PCI device. > > + </column> > > + > > + <column name="status" key="pci-device_id"> > > + Device ID of PCI device. > > + </column> > > + > > + </group> > > </group> > > > > <group title="Statistics"> > > -- > > 1.8.3.1 >
> I've given my feedback so now I'd hope that Ian Stokes will review this > and consider this for the dpdk_merge branch. Thanks Ben, @Michal, this is on my list to review as its ben here a while, will take a look over the coming week. Thanks Ian > > On Tue, Nov 28, 2017 at 02:45:07PM +0000, Weglicki, MichalX wrote: > > Hello Ben, > > > > I've added missing missing documentation as suggested in your comment. > If there is something else you would like me to do, just let me know. > > > > Br, > > Michal. > > > > > -----Original Message----- > > > From: Weglicki, MichalX > > > Sent: Tuesday, November 14, 2017 12:00 PM > > > To: dev@openvswitch.org > > > Cc: Weglicki, MichalX <michalx.weglicki@intel.com>; Przemyslaw > > > Szczerbik <przemyslawx.szczerbik@intel.com> > > > Subject: [PATCH v6 1/2] netdev-dpdk: extend netdev_dpdk_get_status > > > to include if_type and if_descr > > > > > > This commit extends netdev_dpdk_get_status API to include additional > > > driver-related information: if_type and if_descr. > > > > > > v2->v3: Code rebase. > > > v3->v4: Minor comments applied. > > > v5->v6: Adds DPDK port specific description in documentation. > > > > > > Co-authored-by: Michal Weglicki <michalx.weglicki@intel.com> > > > Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> > > > Signed-off-by: Przemyslaw Szczerbik > > > <przemyslawx.szczerbik@intel.com> > > > --- > > > lib/netdev-dpdk.c | 9 ++++++++ > > > vswitchd/vswitch.xml | 64 > > > ++++++++++++++++++++++++++++++++++++++++++++++++++++ > > > 2 files changed, 73 insertions(+) > > > > > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index > > > 76e79be..3560bdd 100644 > > > --- a/lib/netdev-dpdk.c > > > +++ b/lib/netdev-dpdk.c > > > @@ -36,6 +36,7 @@ > > > #include <rte_meter.h> > > > #include <rte_pci.h> > > > #include <rte_vhost.h> > > > +#include <rte_version.h> > > > > > > #include "dirs.h" > > > #include "dp-packet.h" > > > @@ -2509,6 +2510,14 @@ netdev_dpdk_get_status(const struct netdev > *netdev, struct smap *args) > > > smap_add_format(args, "max_vfs", "%u", dev_info.max_vfs); > > > smap_add_format(args, "max_vmdq_pools", "%u", > > > dev_info.max_vmdq_pools); > > > > > > + /* Querying the DPDK library for iftype may be done in future, > pending > > > + * support; cf. RFC 3635 Section 3.2.4. */ > > > + enum { IF_TYPE_ETHERNETCSMACD = 6 }; > > > + > > > + smap_add_format(args, "if_type", "%"PRIu32, > IF_TYPE_ETHERNETCSMACD); > > > + smap_add_format(args, "if_descr", "%s %s", rte_version(), > > > + > > > + dev_info.driver_name); > > > + > > > if (dev_info.pci_dev) { > > > smap_add_format(args, "pci-vendor_id", "0x%u", > > > dev_info.pci_dev->id.vendor_id); diff --git > > > a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index c145e1a..72cf353 > > > 100644 > > > --- a/vswitchd/vswitch.xml > > > +++ b/vswitchd/vswitch.xml > > > @@ -2815,6 +2815,70 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 > type=patch options:peer=p1 \ > > > Whether carrier is detected on <ref column="status" > > > key="tunnel_egress_iface"/>. > > > </column> > > > + > > > + <group title="dpdk"> > > > + <p> > > > + DPDK specific interface status options. > > > + </p> > > > + > > > + <column name="status" key="port_no"> > > > + DPDK port ID. > > > + </column> > > > + > > > + <column name="status" key="numa_id"> > > > + NUMA socket ID to which an Ethernet device is connected. > > > + </column> > > > + > > > + <column name="status" key="min_rx_bufsize"> > > > + Minimum size of RX buffer. > > > + </column> > > > + > > > + <column name="status" key="max_rx_pktlen"> > > > + Maximum configurable length of RX pkt. > > > + </column> > > > + > > > + <column name="status" key="max_rx_queues"> > > > + Maximum number of RX queues. > > > + </column> > > > + > > > + <column name="status" key="max_tx_queues"> > > > + Maximum number of TX queues. > > > + </column> > > > + > > > + <column name="status" key="max_mac_addrs"> > > > + Maximum number of MAC addresses. > > > + </column> > > > + > > > + <column name="status" key="max_hash_mac_addrs"> > > > + Maximum number of hash MAC addresses for MTA and UTA. > > > + </column> > > > + > > > + <column name="status" key="max_vfs"> > > > + Maximum number of hash MAC addresses for MTA and UTA. > > > + Maximum number of VFs. > > > + </column> > > > + > > > + <column name="status" key="max_vmdq_pools"> > > > + Maximum number of VMDq pools. > > > + </column> > > > + > > > + <column name="status" key="if_type"> > > > + Interface type ID according to IANA ifTYPE MIB > definitions. > > > + </column> > > > + > > > + <column name="status" key="if_descr"> > > > + Interface description string. > > > + </column> > > > + > > > + <column name="status" key="pci-vendor_id"> > > > + Vendor ID of PCI device. > > > + </column> > > > + > > > + <column name="status" key="pci-device_id"> > > > + Device ID of PCI device. > > > + </column> > > > + > > > + </group> > > > </group> > > > > > > <group title="Statistics"> > > > -- > > > 1.8.3.1 > >
> This commit extends netdev_dpdk_get_status API to include additional > driver-related information: if_type and if_descr. > Thanks for working on this Michal, looks LGTM, have verified and validated. Will put this in the queue for the DPDK merge branch. Thanks Ian > v2->v3: Code rebase. > v3->v4: Minor comments applied. > v5->v6: Adds DPDK port specific description in documentation. > > Co-authored-by: Michal Weglicki <michalx.weglicki@intel.com> > Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> > Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> > --- > lib/netdev-dpdk.c | 9 ++++++++ > vswitchd/vswitch.xml | 64 > ++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 73 insertions(+) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 76e79be..3560bdd > 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -36,6 +36,7 @@ > #include <rte_meter.h> > #include <rte_pci.h> > #include <rte_vhost.h> > +#include <rte_version.h> > > #include "dirs.h" > #include "dp-packet.h" > @@ -2509,6 +2510,14 @@ netdev_dpdk_get_status(const struct netdev *netdev, > struct smap *args) > smap_add_format(args, "max_vfs", "%u", dev_info.max_vfs); > smap_add_format(args, "max_vmdq_pools", "%u", > dev_info.max_vmdq_pools); > > + /* Querying the DPDK library for iftype may be done in future, > pending > + * support; cf. RFC 3635 Section 3.2.4. */ > + enum { IF_TYPE_ETHERNETCSMACD = 6 }; > + > + smap_add_format(args, "if_type", "%"PRIu32, IF_TYPE_ETHERNETCSMACD); > + smap_add_format(args, "if_descr", "%s %s", rte_version(), > + dev_info.driver_name); > + > if (dev_info.pci_dev) { > smap_add_format(args, "pci-vendor_id", "0x%u", > dev_info.pci_dev->id.vendor_id); diff --git > a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index c145e1a..72cf353 > 100644 > --- a/vswitchd/vswitch.xml > +++ b/vswitchd/vswitch.xml > @@ -2815,6 +2815,70 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 > type=patch options:peer=p1 \ > Whether carrier is detected on <ref column="status" > key="tunnel_egress_iface"/>. > </column> > + > + <group title="dpdk"> > + <p> > + DPDK specific interface status options. > + </p> > + > + <column name="status" key="port_no"> > + DPDK port ID. > + </column> > + > + <column name="status" key="numa_id"> > + NUMA socket ID to which an Ethernet device is connected. > + </column> > + > + <column name="status" key="min_rx_bufsize"> > + Minimum size of RX buffer. > + </column> > + > + <column name="status" key="max_rx_pktlen"> > + Maximum configurable length of RX pkt. > + </column> > + > + <column name="status" key="max_rx_queues"> > + Maximum number of RX queues. > + </column> > + > + <column name="status" key="max_tx_queues"> > + Maximum number of TX queues. > + </column> > + > + <column name="status" key="max_mac_addrs"> > + Maximum number of MAC addresses. > + </column> > + > + <column name="status" key="max_hash_mac_addrs"> > + Maximum number of hash MAC addresses for MTA and UTA. > + </column> > + > + <column name="status" key="max_vfs"> > + Maximum number of hash MAC addresses for MTA and UTA. > + Maximum number of VFs. > + </column> > + > + <column name="status" key="max_vmdq_pools"> > + Maximum number of VMDq pools. > + </column> > + > + <column name="status" key="if_type"> > + Interface type ID according to IANA ifTYPE MIB definitions. > + </column> > + > + <column name="status" key="if_descr"> > + Interface description string. > + </column> > + > + <column name="status" key="pci-vendor_id"> > + Vendor ID of PCI device. > + </column> > + > + <column name="status" key="pci-device_id"> > + Device ID of PCI device. > + </column> > + > + </group> > </group> > > <group title="Statistics"> > -- > 1.8.3.1 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 76e79be..3560bdd 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -36,6 +36,7 @@ #include <rte_meter.h> #include <rte_pci.h> #include <rte_vhost.h> +#include <rte_version.h> #include "dirs.h" #include "dp-packet.h" @@ -2509,6 +2510,14 @@ netdev_dpdk_get_status(const struct netdev *netdev, struct smap *args) smap_add_format(args, "max_vfs", "%u", dev_info.max_vfs); smap_add_format(args, "max_vmdq_pools", "%u", dev_info.max_vmdq_pools); + /* Querying the DPDK library for iftype may be done in future, pending + * support; cf. RFC 3635 Section 3.2.4. */ + enum { IF_TYPE_ETHERNETCSMACD = 6 }; + + smap_add_format(args, "if_type", "%"PRIu32, IF_TYPE_ETHERNETCSMACD); + smap_add_format(args, "if_descr", "%s %s", rte_version(), + dev_info.driver_name); + if (dev_info.pci_dev) { smap_add_format(args, "pci-vendor_id", "0x%u", dev_info.pci_dev->id.vendor_id); diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index c145e1a..72cf353 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -2815,6 +2815,70 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ Whether carrier is detected on <ref column="status" key="tunnel_egress_iface"/>. </column> + + <group title="dpdk"> + <p> + DPDK specific interface status options. + </p> + + <column name="status" key="port_no"> + DPDK port ID. + </column> + + <column name="status" key="numa_id"> + NUMA socket ID to which an Ethernet device is connected. + </column> + + <column name="status" key="min_rx_bufsize"> + Minimum size of RX buffer. + </column> + + <column name="status" key="max_rx_pktlen"> + Maximum configurable length of RX pkt. + </column> + + <column name="status" key="max_rx_queues"> + Maximum number of RX queues. + </column> + + <column name="status" key="max_tx_queues"> + Maximum number of TX queues. + </column> + + <column name="status" key="max_mac_addrs"> + Maximum number of MAC addresses. + </column> + + <column name="status" key="max_hash_mac_addrs"> + Maximum number of hash MAC addresses for MTA and UTA. + </column> + + <column name="status" key="max_vfs"> + Maximum number of hash MAC addresses for MTA and UTA. + Maximum number of VFs. + </column> + + <column name="status" key="max_vmdq_pools"> + Maximum number of VMDq pools. + </column> + + <column name="status" key="if_type"> + Interface type ID according to IANA ifTYPE MIB definitions. + </column> + + <column name="status" key="if_descr"> + Interface description string. + </column> + + <column name="status" key="pci-vendor_id"> + Vendor ID of PCI device. + </column> + + <column name="status" key="pci-device_id"> + Device ID of PCI device. + </column> + + </group> </group> <group title="Statistics">