[5/6] usertools/dpdk-devbind.py: add support for ntb
Checks
Commit Message
In order to allow binding/unbinding of devices for use by the
ntb_rawdev, we need to update the devbind script to add a new class
of device, and add device ids for the specific HW instances. And
only support skx platform right now.
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
usertools/dpdk-devbind.py | 9 +++++++++
1 file changed, 9 insertions(+)
Comments
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xiaoyun Li
> Sent: Monday, June 3, 2019 2:16 PM
> To: jingjing.wu@intel.com; keith.wiles@intel.com; cunming.liang@intel.com;
> omkar.maslekar@intel.com
> Cc: dev@dpdk.org; Xiaoyun Li <xiaoyun.li@intel.com>
> Subject: [dpdk-dev] [PATCH 5/6] usertools/dpdk-devbind.py: add support
> for ntb
>
> In order to allow binding/unbinding of devices for use by the ntb_rawdev,
> we need to update the devbind script to add a new class of device, and add
> device ids for the specific HW instances. And only support skx platform right
> now.
>
> Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
> ---
> usertools/dpdk-devbind.py | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index
> 9e79f0d28..470869ff3 100755
> --- a/usertools/dpdk-devbind.py
> +++ b/usertools/dpdk-devbind.py
> @@ -36,11 +36,15 @@
> octeontx2_npa = {'Class': '08', 'Vendor': '177d', 'Device': 'a0fb,a0fc',
> 'SVendor': None, 'SDevice': None}
>
> +intel_ntb_skx = {'Class': '06', 'Vendor': '8086', 'Device': '201c',
> + 'SVendor': None, 'SDevice': None}
> +
> network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class]
> crypto_devices = [encryption_class, intel_processor_class]
> eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso]
> mempool_devices = [cavium_fpa, octeontx2_npa] compress_devices =
> [cavium_zip]
> +ntb_devices = [intel_ntb_skx]
>
> # global dict ethernet devices present. Dictionary indexed by PCI address.
> # Each device within this is itself a dictionary of device properties @@ -595,6
> +599,9 @@ def show_status():
> if status_dev == "compress" or status_dev == "all":
> show_device_status(compress_devices , "Compress")
>
> + if status_dev == "ntb" or status_dev == "all":
> + show_device_status(ntb_devices , "NTB")
Please change ntb to some generic name. it look like it is the product name, does not reflect the
device type. How about, "communication devices" or any generic name appropriate for ntb.
OK. "communication devices" seems a good option but a little long.
Will think if there is another choice. If not, will use it. Thanks.
> -----Original Message-----
> From: Jerin Jacob Kollanukkaran [mailto:jerinj@marvell.com]
> Sent: Tuesday, June 4, 2019 15:54
> To: Li, Xiaoyun <xiaoyun.li@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Wiles, Keith <keith.wiles@intel.com>; Liang, Cunming
> <cunming.liang@intel.com>; Maslekar, Omkar <omkar.maslekar@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH 5/6] usertools/dpdk-devbind.py: add support for
> ntb
>
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Xiaoyun Li
> > Sent: Monday, June 3, 2019 2:16 PM
> > To: jingjing.wu@intel.com; keith.wiles@intel.com;
> > cunming.liang@intel.com; omkar.maslekar@intel.com
> > Cc: dev@dpdk.org; Xiaoyun Li <xiaoyun.li@intel.com>
> > Subject: [dpdk-dev] [PATCH 5/6] usertools/dpdk-devbind.py: add support
> > for ntb
> >
> > In order to allow binding/unbinding of devices for use by the
> > ntb_rawdev, we need to update the devbind script to add a new class of
> > device, and add device ids for the specific HW instances. And only
> > support skx platform right now.
> >
> > Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
> > ---
> > usertools/dpdk-devbind.py | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
> > index
> > 9e79f0d28..470869ff3 100755
> > --- a/usertools/dpdk-devbind.py
> > +++ b/usertools/dpdk-devbind.py
> > @@ -36,11 +36,15 @@
> > octeontx2_npa = {'Class': '08', 'Vendor': '177d', 'Device': 'a0fb,a0fc',
> > 'SVendor': None, 'SDevice': None}
> >
> > +intel_ntb_skx = {'Class': '06', 'Vendor': '8086', 'Device': '201c',
> > + 'SVendor': None, 'SDevice': None}
> > +
> > network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class]
> > crypto_devices = [encryption_class, intel_processor_class]
> > eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso]
> > mempool_devices = [cavium_fpa, octeontx2_npa] compress_devices =
> > [cavium_zip]
> > +ntb_devices = [intel_ntb_skx]
> >
> > # global dict ethernet devices present. Dictionary indexed by PCI address.
> > # Each device within this is itself a dictionary of device properties
> > @@ -595,6
> > +599,9 @@ def show_status():
> > if status_dev == "compress" or status_dev == "all":
> > show_device_status(compress_devices , "Compress")
> >
> > + if status_dev == "ntb" or status_dev == "all":
> > + show_device_status(ntb_devices , "NTB")
>
>
> Please change ntb to some generic name. it look like it is the product name,
> does not reflect the device type. How about, "communication devices" or any
> generic name appropriate for ntb.
@@ -36,11 +36,15 @@
octeontx2_npa = {'Class': '08', 'Vendor': '177d', 'Device': 'a0fb,a0fc',
'SVendor': None, 'SDevice': None}
+intel_ntb_skx = {'Class': '06', 'Vendor': '8086', 'Device': '201c',
+ 'SVendor': None, 'SDevice': None}
+
network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class]
crypto_devices = [encryption_class, intel_processor_class]
eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso]
mempool_devices = [cavium_fpa, octeontx2_npa]
compress_devices = [cavium_zip]
+ntb_devices = [intel_ntb_skx]
# global dict ethernet devices present. Dictionary indexed by PCI address.
# Each device within this is itself a dictionary of device properties
@@ -595,6 +599,9 @@ def show_status():
if status_dev == "compress" or status_dev == "all":
show_device_status(compress_devices , "Compress")
+ if status_dev == "ntb" or status_dev == "all":
+ show_device_status(ntb_devices , "NTB")
+
def parse_args():
'''Parses the command-line arguments given by the user and takes the
@@ -670,6 +677,7 @@ def do_arg_actions():
get_device_details(eventdev_devices)
get_device_details(mempool_devices)
get_device_details(compress_devices)
+ get_device_details(ntb_devices)
show_status()
@@ -690,6 +698,7 @@ def main():
get_device_details(eventdev_devices)
get_device_details(mempool_devices)
get_device_details(compress_devices)
+ get_device_details(ntb_devices)
do_arg_actions()
if __name__ == "__main__":