Re: [PATCH v3 01/10] Add auxiliary bus support

2020-11-09 Thread Oded Gabbay
On Fri, Nov 06, 2020 at 07:35:37PM +, Mark Brown wrote: > On Thu, Nov 05, 2020 at 08:37:14PM +, Parav Pandit wrote: > > > > > This example describes the mlx5 PCI subfunction use case. > > > > I didn't follow your question about 'explicit example'. > > > > What part is missing to identify i

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-20 Thread Oded Gabbay
On Sun, Sep 20, 2020 at 11:47 AM Greg Kroah-Hartman wrote: > > On Sat, Sep 19, 2020 at 04:22:35PM -0300, Jason Gunthorpe wrote: > > On Sat, Sep 19, 2020 at 07:27:30PM +0200, Greg Kroah-Hartman wrote: > > > > It's probably heresy, but why do I need to integrate into the RDMA > > > > subsystem ? >

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-19 Thread Oded Gabbay
On Sat, Sep 19, 2020 at 11:30 AM Greg Kroah-Hartman wrote: > > On Sat, Sep 19, 2020 at 11:20:03AM +0300, Leon Romanovsky wrote: > > On Sat, Sep 19, 2020 at 08:40:20AM +0200, Greg Kroah-Hartman wrote: > > > On Fri, Sep 18, 2020 at 03:19:05PM +0300, Leon Romanovsky wrote: > > > > > So we do have an

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 6:07 PM Jason Gunthorpe wrote: > > On Fri, Sep 18, 2020 at 05:45:21PM +0300, Oded Gabbay wrote: > > > Any access by the device's engines to the host memory is done via our > > device's MMU. Our MMU supports multiple ASIDs - Address Spac

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 5:19 PM Jason Gunthorpe wrote: > > On Fri, Sep 18, 2020 at 05:12:04PM +0300, Oded Gabbay wrote: > > On Fri, Sep 18, 2020 at 4:59 PM Jason Gunthorpe wrote: > > > > > > On Fri, Sep 18, 2020 at 04:49:25PM +0300, Oded Gabbay wrote: > >

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 4:59 PM Jason Gunthorpe wrote: > > On Fri, Sep 18, 2020 at 04:49:25PM +0300, Oded Gabbay wrote: > > On Fri, Sep 18, 2020 at 4:26 PM Jason Gunthorpe wrote: > > > > > > On Fri, Sep 18, 2020 at 04:02:24PM +0300, Oded Gabbay wrote: > > &

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 4:26 PM Jason Gunthorpe wrote: > > On Fri, Sep 18, 2020 at 04:02:24PM +0300, Oded Gabbay wrote: > > > The problem with MR is that the API doesn't let us return a new VA. It > > forces us to use the original VA that the Host OS allocated. >

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 3:50 PM Jason Gunthorpe wrote: > > On Fri, Sep 18, 2020 at 03:34:54PM +0300, Oded Gabbay wrote: > > > > Another example is that the submission of WQ is done through our QMAN > > > > mechanism and is NOT mapped to userspace (due to the rest

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 3:16 PM Jason Gunthorpe wrote: > > On Fri, Sep 18, 2020 at 02:59:28PM +0300, Oded Gabbay wrote: > > On Fri, Sep 18, 2020 at 2:56 PM Jason Gunthorpe wrote: > > > > > > On Fri, Sep 18, 2020 at 02:36:10PM +0300, Gal Pressman wrote: >

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 3:19 PM Leon Romanovsky wrote: > > On Fri, Sep 18, 2020 at 03:07:19PM +0300, Oded Gabbay wrote: > > On Fri, Sep 18, 2020 at 3:03 PM Leon Romanovsky wrote: > > > > > > On Fri, Sep 18, 2020 at 02:56:09PM +0300, Oded Gabbay wrote: > > >

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 2:36 PM Gal Pressman wrote: > > On 17/09/2020 20:18, Jason Gunthorpe wrote: > > On Tue, Sep 15, 2020 at 11:46:58PM +0300, Oded Gabbay wrote: > >> infrastructure for communication between multiple accelerators. Same > >> as Nvidia uses NV

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 3:03 PM Leon Romanovsky wrote: > > On Fri, Sep 18, 2020 at 02:56:09PM +0300, Oded Gabbay wrote: > > On Fri, Sep 18, 2020 at 2:52 PM Leon Romanovsky wrote: > > > > > > On Fri, Sep 18, 2020 at 02:36:10PM +0300, Gal Pressman wrote: >

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 3:00 PM Jason Gunthorpe wrote: > > > On Tue, Sep 15, 2020 at 08:10:08PM +0300, Oded Gabbay wrote: > > Hello, > > > > This is the second version of the patch-set to upstream the GAUDI NIC code > > into the habanalabs driver. > > >

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 2:56 PM Jason Gunthorpe wrote: > > On Fri, Sep 18, 2020 at 02:36:10PM +0300, Gal Pressman wrote: > > On 17/09/2020 20:18, Jason Gunthorpe wrote: > > > On Tue, Sep 15, 2020 at 11:46:58PM +0300, Oded Gabbay wrote: > > >> infrastructure f

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Oded Gabbay
On Fri, Sep 18, 2020 at 2:52 PM Leon Romanovsky wrote: > > On Fri, Sep 18, 2020 at 02:36:10PM +0300, Gal Pressman wrote: > > On 17/09/2020 20:18, Jason Gunthorpe wrote: > > > On Tue, Sep 15, 2020 at 11:46:58PM +0300, Oded Gabbay wrote: > > >> infrastructure f

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-16 Thread Oded Gabbay
On Wed, Sep 16, 2020 at 11:21 AM Greg Kroah-Hartman wrote: > > On Wed, Sep 16, 2020 at 11:02:39AM +0300, Oded Gabbay wrote: > > On Wed, Sep 16, 2020 at 10:41 AM Greg Kroah-Hartman > > wrote: > > > > > > On Wed, Sep 16, 2020 at 09:36:23AM +0300, Oded Gabbay wr

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-16 Thread Oded Gabbay
On Wed, Sep 16, 2020 at 10:41 AM Greg Kroah-Hartman wrote: > > On Wed, Sep 16, 2020 at 09:36:23AM +0300, Oded Gabbay wrote: > > On Wed, Sep 16, 2020 at 9:25 AM Greg Kroah-Hartman > > wrote: > > > > > > On Tue, Sep 15, 2020 at 11:49:12PM +0300, Oded Gabbay wr

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-15 Thread Oded Gabbay
On Wed, Sep 16, 2020 at 9:25 AM Greg Kroah-Hartman wrote: > > On Tue, Sep 15, 2020 at 11:49:12PM +0300, Oded Gabbay wrote: > > On Tue, Sep 15, 2020 at 11:42 PM David Miller wrote: > > > > > > From: Oded Gabbay > > > Date: Tue, 15 Sep 2020 20:10:08 +0300 &

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-15 Thread Oded Gabbay
On Wed, Sep 16, 2020 at 1:34 AM David Miller wrote: > > From: Oded Gabbay > Date: Wed, 16 Sep 2020 00:20:12 +0300 > > > I completely understand but you didn't answer my question. How come > > there are drivers which create netdev objects, and specifically sgi-xp >

Re: [PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-15 Thread Oded Gabbay
On Mon, Sep 14, 2020 at 7:50 PM Jakub Kicinski wrote: > > On Mon, 14 Sep 2020 13:48:14 + Omer Shpigelman wrote: > > On Thu, Sep 10, 2020 at 11:31 PM Jakub Kicinski wrote: > > > On Thu, 10 Sep 2020 23:17:59 +0300 Oded Gabbay wrote: > > > > > Doesn

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-15 Thread Oded Gabbay
On Wed, Sep 16, 2020 at 12:37 AM Andrew Lunn wrote: > > > I completely understand but you didn't answer my question. How come > > there are drivers which create netdev objects, and specifically sgi-xp > > in misc (but I also saw it in usb drivers) that live outside > > drivers/net ? Why doesn't yo

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-15 Thread Oded Gabbay
On Wed, Sep 16, 2020 at 12:04 AM Jakub Kicinski wrote: > > On Tue, 15 Sep 2020 23:46:58 +0300 Oded Gabbay wrote: > > On Tue, Sep 15, 2020 at 11:35 PM Jakub Kicinski wrote: > > > On Tue, 15 Sep 2020 20:10:08 +0300 Oded Gabbay wrote: > > > > Hello, > > > &

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-15 Thread Oded Gabbay
On Tue, Sep 15, 2020 at 11:42 PM David Miller wrote: > > From: Oded Gabbay > Date: Tue, 15 Sep 2020 20:10:08 +0300 > > > This is the second version of the patch-set to upstream the GAUDI NIC code > > into the habanalabs driver. > > > > The only modification fr

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-15 Thread Oded Gabbay
On Tue, Sep 15, 2020 at 11:35 PM Jakub Kicinski wrote: > > On Tue, 15 Sep 2020 20:10:08 +0300 Oded Gabbay wrote: > > Hello, > > > > This is the second version of the patch-set to upstream the GAUDI NIC code > > into the habanalabs driver. > > > > The o

[PATCH v3 07/14] habanalabs/gaudi: allow user to get MAC addresses in INFO IOCTL

2020-09-15 Thread Oded Gabbay
From: Omer Shpigelman The user needs this information when working in a distributed environment with master/slave configuration. All the slaves get their MAC addresses from the driver and send them to the master. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded

[PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-15 Thread Oded Gabbay
Hello, This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver. The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message. Link to v2 cover letter: https://lkml.org/lkml/2020/9/12/201 Thanks, Oded

[PATCH v3 09/14] habanalabs/gaudi: add CQ control operations

2020-09-15 Thread Oded Gabbay
Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/device.c | 6 +- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 20 +- drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/gaudi/gaudiP.h

[PATCH v3 10/14] habanalabs/gaudi: add WQ control operations

2020-09-15 Thread Oded Gabbay
HW. The user should provide the device virtual address of the WQ. - Unset WQ: reset the WQ configuration in the HW. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/common/habanalabs_ioctl.c | 10 +- drivers/misc/habanalabs

[PATCH v3 08/14] habanalabs/gaudi: add a new IOCTL for NIC control operations

2020-09-15 Thread Oded Gabbay
ed opcodes are: - Create a QP - Set requester context - Set responder context - Destroy a QP Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 98

[PATCH v3 02/14] habanalabs/gaudi: add NIC firmware-related definitions

2020-09-15 Thread Oded Gabbay
From: Omer Shpigelman Add new structures and messages that the driver use to interact with the firmware to receive information and events (errors) about GAUDI's NIC. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/include/c

[PATCH v3 04/14] habanalabs/gaudi: add support for NIC QMANs

2020-09-15 Thread Oded Gabbay
on QMAN errors from the firmware. However, the nic_ports_mask is still initialized to 0. That means this code won't initialize the QMANs just yet. That will be in a later patch. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/haban

[PATCH v3 05/14] habanalabs/gaudi: add NIC Ethernet support

2020-09-15 Thread Oded Gabbay
the beginning of the reset flow. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/context.c |1 + drivers/misc/habanalabs/common/firmware_if.c | 44 + drivers/misc/habanalabs/common/habanalabs.h | 13 +- .../misc

[PATCH v3 14/14] habanalabs/gaudi: add NIC init/fini calls from common code

2020-09-15 Thread Oded Gabbay
From: Omer Shpigelman Finally, enable the NIC engines. Initialize the NIC ports mask variable with full mask so all ports will be initialized. Call the NIC init/fini from the common code. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc

[PATCH v3 11/14] habanalabs/gaudi: add QP error handling

2020-09-15 Thread Oded Gabbay
). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/gaudi.c | 13 drivers/misc/habanalabs/gaudi/gaudiP.h| 1 + drivers/misc/habanalabs/gaudi/gaudi_nic.c | 95 +++ 3 files changed, 109

[PATCH v3 12/14] habanalabs/gaudi: Add ethtool support using coresight

2020-09-15 Thread Oded Gabbay
nters strings. - get_sset_count: get counters number. - get_ethtool_stats: get counters values. - get_module_info: get EEPROM type and length. - get_module_eeprom: get EEPROM (supported in raw mode only). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Chang

[PATCH v3 13/14] habanalabs/gaudi: support DCB protocol

2020-09-15 Thread Oded Gabbay
elman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/Makefile| 2 +- drivers/misc/habanalabs/gaudi/gaudi_nic.c | 3 + .../misc/habanalabs/gaudi/gaudi_nic_dcbnl.c | 108 ++ 3 files changed, 112 insertions(+), 1 deletion(-) create

[PATCH v3 06/14] habanalabs/gaudi: add NIC PHY code

2020-09-15 Thread Oded Gabbay
quality improvement) and not for setting the transmission parameters. As a result, the Auto-negotiation is currently supported only between Gaudi cards. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/Makefile|2

Re: [PATCH v2 12/14] habanalabs/gaudi: Add ethtool support using coresight

2020-09-14 Thread Oded Gabbay
On Mon, Sep 14, 2020 at 11:07 PM Jakub Kicinski wrote: > > On Mon, 14 Sep 2020 03:24:13 +0200 Andrew Lunn wrote: > > > +static void gaudi_nic_get_internal_stats(struct net_device *netdev, u64 > > > *data) > > > +{ > > > + struct gaudi_nic_device **ptr = netdev_priv(netdev); > > > + struct gau

Re: [PATCH v2 12/14] habanalabs/gaudi: Add ethtool support using coresight

2020-09-13 Thread Oded Gabbay
On Mon, Sep 14, 2020 at 4:37 AM Andrew Lunn wrote: > > > +static int gaudi_nic_get_module_eeprom(struct net_device *netdev, > > + struct ethtool_eeprom *ee, u8 *data) > > +{ > > + struct gaudi_nic_device **ptr = netdev_priv(netdev); > > + struct gaudi_ni

Re: [PATCH v2 12/14] habanalabs/gaudi: Add ethtool support using coresight

2020-09-13 Thread Oded Gabbay
On Mon, Sep 14, 2020 at 4:39 AM Florian Fainelli wrote: > > > > On 9/12/2020 7:41 AM, Oded Gabbay wrote: > > From: Omer Shpigelman > > > > The driver supports ethtool callbacks and provides statistics using the > > device's profiling infrastructure (cores

Re: [PATCH v2 08/14] habanalabs/gaudi: add a new IOCTL for NIC control operations

2020-09-12 Thread Oded Gabbay
On Sat, Sep 12, 2020 at 6:07 PM Randy Dunlap wrote: > > Hi, > > On 9/12/20 7:41 AM, Oded Gabbay wrote: > > +#define HL_IOCTL_NIC _IOWR('H', 0x07, struct hl_nic_args) > > > ioctl numbers ('H') should be documented in > Documentation/userspace-api/i

[PATCH v2 04/14] habanalabs/gaudi: add support for NIC QMANs

2020-09-12 Thread Oded Gabbay
on QMAN errors from the firmware. However, the nic_ports_mask is still initialized to 0. That means this code won't initialize the QMANs just yet. That will be in a later patch. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/haban

[PATCH v2 05/14] habanalabs/gaudi: add NIC Ethernet support

2020-09-12 Thread Oded Gabbay
the beginning of the reset flow. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Remove nic_debugfs_reset flag - Remove kernel parameter of nic_rx_poll - Fix all instances of reverse Christmas tree - Remove obsolete TODOs - Add

[PATCH v2 02/14] habanalabs/gaudi: add NIC firmware-related definitions

2020-09-12 Thread Oded Gabbay
From: Omer Shpigelman Add new structures and messages that the driver use to interact with the firmware to receive information and events (errors) about GAUDI's NIC. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/include/c

[PATCH v2 07/14] habanalabs/gaudi: allow user to get MAC addresses in INFO IOCTL

2020-09-12 Thread Oded Gabbay
From: Omer Shpigelman The user needs this information when working in a distributed environment with master/slave configuration. All the slaves get their MAC addresses from the driver and send them to the master. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded

[PATCH v2 10/14] habanalabs/gaudi: add WQ control operations

2020-09-12 Thread Oded Gabbay
HW. The user should provide the device virtual address of the WQ. - Unset WQ: reset the WQ configuration in the HW. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse Christmas tree .../misc

[PATCH v2 09/14] habanalabs/gaudi: add CQ control operations

2020-09-12 Thread Oded Gabbay
Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse Christmas tree drivers/misc/habanalabs/common/device.c | 6 +- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 20 +- drivers/misc/habanalabs/gaudi

[PATCH v2 12/14] habanalabs/gaudi: Add ethtool support using coresight

2020-09-12 Thread Oded Gabbay
nters strings. - get_sset_count: get counters number. - get_ethtool_stats: get counters values. - get_module_info: get EEPROM type and length. - get_module_eeprom: get EEPROM (supported in raw mode only). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Chang

[PATCH v2 14/14] habanalabs/gaudi: add NIC init/fini calls from common code

2020-09-12 Thread Oded Gabbay
From: Omer Shpigelman Finally, enable the NIC engines. Initialize the NIC ports mask variable with full mask so all ports will be initialized. Call the NIC init/fini from the common code. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc

[PATCH v2 11/14] habanalabs/gaudi: add QP error handling

2020-09-12 Thread Oded Gabbay
). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse Christmas tree drivers/misc/habanalabs/gaudi/gaudi.c | 13 drivers/misc/habanalabs/gaudi/gaudiP.h| 1 + drivers/misc/habanalabs/gaudi

[PATCH v2 13/14] habanalabs/gaudi: support DCB protocol

2020-09-12 Thread Oded Gabbay
elman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse Christmas tree drivers/misc/habanalabs/gaudi/Makefile| 2 +- drivers/misc/habanalabs/gaudi/gaudi_nic.c | 3 + .../misc/habanalabs/gaudi/gaudi_nic_dcbnl.c | 108

[PATCH v2 08/14] habanalabs/gaudi: add a new IOCTL for NIC control operations

2020-09-12 Thread Oded Gabbay
ed opcodes are: - Create a QP - Set requester context - Set responder context - Destroy a QP Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse Christmas tree - Set QPC REQ burst size to 16. The QPC requester

[PATCH v2 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-12 Thread Oded Gabbay
Hello, This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver. Modifications were made following reviews of the first version and are detailed in the commit message of each patch that was changed. A general note I want to write here is that I remove

[PATCH v2 06/14] habanalabs/gaudi: add NIC PHY code

2020-09-12 Thread Oded Gabbay
quality improvement) and not for setting the transmission parameters. As a result, the Auto-negotiation is currently supported only between Gaudi cards. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- Changes in v2: - Fix all instances of reverse

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
On Fri, Sep 11, 2020 at 12:05 AM Florian Fainelli wrote: > > > > On 9/10/2020 1:32 PM, Oded Gabbay wrote: > > On Thu, Sep 10, 2020 at 11:28 PM Jakub Kicinski wrote: > >> > >> On Thu, 10 Sep 2020 23:16:22 +0300 Oded Gabbay wrote: > >>> On Thu

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:38 PM Andrew Lunn wrote: > > On Thu, Sep 10, 2020 at 11:30:33PM +0300, Oded Gabbay wrote: > > On Thu, Sep 10, 2020 at 11:25 PM Andrew Lunn wrote: > > > > > > > Can you please elaborate on how to do this with a single driver that > &

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:25 PM Andrew Lunn wrote: > > > Can you please elaborate on how to do this with a single driver that > > is already in misc ? > > As I mentioned in the cover letter, we are not developing a > > stand-alone NIC. We have a deep-learning accelerator with a NIC > > interface.

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:28 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 23:16:22 +0300 Oded Gabbay wrote: > > On Thu, Sep 10, 2020 at 11:01 PM Jakub Kicinski wrote: > > > On Thu, 10 Sep 2020 19:11:11 +0300 Oded Gabbay wrote: > > > > create mode 100

Re: [PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:31 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 23:17:59 +0300 Oded Gabbay wrote: > > > Doesn't seem like this one shows any more information than can be > > > queried with ethtool, right? > > correct, it just displays it in

Re: [PATCH 13/15] habanalabs/gaudi: Add ethtool support using coresight

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:19 PM Andrew Lunn wrote: > > > +static int gaudi_nic_get_link_ksettings(struct net_device *netdev, > > + struct ethtool_link_ksettings *cmd) > > +{ > > + struct gaudi_nic_device **ptr = netdev_priv(netdev); > > + struct gaudi_n

Re: [PATCH 05/15] habanalabs/gaudi: add NIC Ethernet support

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:03 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 19:11:16 +0300 Oded Gabbay wrote: > > +module_param(nic_rx_poll, int, 0444); > > +MODULE_PARM_DESC(nic_rx_poll, > > + "Enable NIC Rx polling mode (0 = no, 1 = yes, default no)");

Re: [PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:16 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 23:10:47 +0300 Oded Gabbay wrote: > > On Thu, Sep 10, 2020 at 11:01 PM Jakub Kicinski wrote: > > > > > > On Thu, 10 Sep 2020 19:11:23 +0300 Oded Gabbay wrote: > > > > From: Om

Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:01 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 19:11:11 +0300 Oded Gabbay wrote: > > create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic.c > > create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic.h > > create mode 100644

Re: [PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-10 Thread Oded Gabbay
On Thu, Sep 10, 2020 at 11:01 PM Jakub Kicinski wrote: > > On Thu, 10 Sep 2020 19:11:23 +0300 Oded Gabbay wrote: > > From: Omer Shpigelman > > > > Add several debugfs entries to help us debug the NIC engines and ports and > > also the communication layer of the DL

[PATCH 02/15] habanalabs/gaudi: add NIC firmware-related definitions

2020-09-10 Thread Oded Gabbay
From: Omer Shpigelman Add new structures and messages that the driver use to interact with the firmware to receive information and events (errors) about GAUDI's NIC. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/include/c

[PATCH 10/15] habanalabs/gaudi: add WQ control operations

2020-09-10 Thread Oded Gabbay
HW. The user should provide the device virtual address of the WQ. - Unset WQ: reset the WQ configuration in the HW. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../misc/habanalabs/common/habanalabs_ioctl.c | 10 +- drivers/misc/habanalabs

[PATCH 09/15] habanalabs/gaudi: add CQ control operations

2020-09-10 Thread Oded Gabbay
Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/device.c | 6 +- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 20 +- drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/gaudi/gaudiP.h

[PATCH 11/15] habanalabs/gaudi: add QP error handling

2020-09-10 Thread Oded Gabbay
). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/gaudi.c | 13 drivers/misc/habanalabs/gaudi/gaudiP.h| 1 + drivers/misc/habanalabs/gaudi/gaudi_nic.c | 93 +++ 3 files changed, 107

[PATCH 12/15] habanalabs/gaudi: add debugfs entries for the NIC

2020-09-10 Thread Oded Gabbay
reconfiguring the link - nic_pam4_tx_taps: configure PAM4 TX taps - nic_polarity: configure polarity for NIC port lanes - nic_check_link: configure whether to check the PCS link periodically - nic_phy_auto_neg_lpbk: enable PHY auto-negotiation loopback Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay

[PATCH 06/15] habanalabs/gaudi: add NIC PHY code

2020-09-10 Thread Oded Gabbay
quality improvement) and not for setting the transmission parameters. As a result, the Auto-negotiation is currently supported only between Gaudi cards. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/Makefile|2

[PATCH 04/15] habanalabs/gaudi: add support for NIC QMANs

2020-09-10 Thread Oded Gabbay
on QMAN errors from the firmware. However, the nic_ports_mask is still initialized to 0. That means this code won't initialize the QMANs just yet. That will be in a later patch. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/haban

[PATCH 14/15] habanalabs/gaudi: support DCB protocol

2020-09-10 Thread Oded Gabbay
elman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/gaudi/Makefile| 2 +- drivers/misc/habanalabs/gaudi/gaudi_nic.c | 3 + .../misc/habanalabs/gaudi/gaudi_nic_dcbnl.c | 108 ++ 3 files changed, 112 insertions(+), 1 deletion(-) create

[PATCH 05/15] habanalabs/gaudi: add NIC Ethernet support

2020-09-10 Thread Oded Gabbay
the beginning of the reset flow. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/context.c |1 + drivers/misc/habanalabs/common/firmware_if.c | 44 + drivers/misc/habanalabs/common/habanalabs.h | 13 +- .../misc

[PATCH 13/15] habanalabs/gaudi: Add ethtool support using coresight

2020-09-10 Thread Oded Gabbay
nters strings. - get_sset_count: get counters number. - get_ethtool_stats: get counters values. - get_module_info: get EEPROM type and length. - get_module_eeprom: get EEPROM (supported in raw mode only). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- dr

[PATCH 15/15] habanalabs/gaudi: add NIC init/fini calls from common code

2020-09-10 Thread Oded Gabbay
From: Omer Shpigelman Finally, enable the NIC engines. Initialize the NIC ports mask variable with full mask so all ports will be initialized. Call the NIC init/fini from the common code. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc

[PATCH 07/15] habanalabs/gaudi: allow user to get MAC addresses in INFO IOCTL

2020-09-10 Thread Oded Gabbay
From: Omer Shpigelman The user needs this information when working in a distributed environment with master/slave configuration. All the slaves get their MAC addresses from the driver and send them to the master. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded

[PATCH 08/15] habanalabs/gaudi: add a new IOCTL for NIC control operations

2020-09-10 Thread Oded Gabbay
ed opcodes are: - Create a QP - Set requester context - Set responder context - Destroy a QP Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 98

[PATCH 00/15] Adding GAUDI NIC code to habanalabs driver

2020-09-10 Thread Oded Gabbay
This patch-set adds support for initializing and using the GAUDI NIC ports, functioning as scale-out interconnect when doing distributed Deep Learning training. The training can be performed over tens of thousands of GAUDIs and it is done using the RDMA-over-converged-Ethernet (RoCE) v2 protocol.