Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-30 Thread Omer Shpigelman
On 6/26/24 17:13, Andrew Lunn wrote: >> Here is the output: >> $ ethtool eth0 >> Settings for eth0: >> Supported ports: [ FIBRE Backplane ] >> Supported link modes: 10baseKR4/Full >> 10baseSR4/Full >> 10baseCR

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-26 Thread Andrew Lunn
> Here is the output: > $ ethtool eth0 > Settings for eth0: > Supported ports: [ FIBRE Backplane ] > Supported link modes: 10baseKR4/Full > 10baseSR4/Full > 10baseCR4/Full > 1

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-26 Thread Omer Shpigelman
On 6/23/24 17:46, Andrew Lunn wrote: >>> But what about when the system is under memory pressure? You say it >>> allocates memory. What happens if those allocations fail. Does >>> changing the MTU take me from a working system to a dead system? It is >>> good practice to not kill a working system u

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-23 Thread Omer Shpigelman
On 6/20/24 22:14, Andrew Lunn wrote: > On Thu, Jun 20, 2024 at 06:51:35AM -0700, Jakub Kicinski wrote: >> On Thu, 20 Jun 2024 08:43:34 + Omer Shpigelman wrote: You support 400G, you really need to give the user the ability to access higher pages. >>> >>> Actually the 200G and 400G m

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-23 Thread Andrew Lunn
> > But what about when the system is under memory pressure? You say it > > allocates memory. What happens if those allocations fail. Does > > changing the MTU take me from a working system to a dead system? It is > > good practice to not kill a working system under situations like > > memory press

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-22 Thread Omer Shpigelman
On 6/19/24 19:13, Andrew Lunn wrote: > On Wed, Jun 19, 2024 at 07:16:20AM +, Omer Shpigelman wrote: >> On 6/18/24 17:19, Andrew Lunn wrote: >> +static u32 hbl_en_get_mtu(struct hbl_aux_dev *aux_dev, u32 port_idx) >> +{ >> + struct hbl_en_port *port = HBL_EN_PORT(aux_dev, port_id

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-20 Thread Andrew Lunn
On Thu, Jun 20, 2024 at 06:51:35AM -0700, Jakub Kicinski wrote: > On Thu, 20 Jun 2024 08:43:34 + Omer Shpigelman wrote: > > > You support 400G, you really need to give the user the ability > > > to access higher pages. > > > > Actually the 200G and 400G modes in the ethtool code should be re

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-20 Thread Jakub Kicinski
On Thu, 20 Jun 2024 08:43:34 + Omer Shpigelman wrote: > > You support 400G, you really need to give the user the ability > > to access higher pages. > > Actually the 200G and 400G modes in the ethtool code should be removed > from this patch set. They are not relevant for Gaudi2. I'll fix it

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-20 Thread Omer Shpigelman
On 6/19/24 18:21, Jakub Kicinski wrote: > [Some people who received this message don't often get email from > k...@kernel.org. Learn why this is important at > https://aka.ms/LearnAboutSenderIdentification ] > > On Wed, 19 Jun 2024 07:16:20 + Omer Shpigelman wrote: Are you referring to

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-20 Thread Omer Shpigelman
On 6/19/24 18:40, Andrew Lunn wrote: >>> Does this device require IPv4? What about users and infrastructures that >>> use IPv6 only? >>> IPv4 is legacy at this point. >> >> Gaudi2 supports IPv4 only. > > Really? I guess really old stuff, SLIP from 1988 does not support > IPv6, but i don't remembe

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-19 Thread Andrew Lunn
On Wed, Jun 19, 2024 at 07:16:20AM +, Omer Shpigelman wrote: > On 6/18/24 17:19, Andrew Lunn wrote: > +static u32 hbl_en_get_mtu(struct hbl_aux_dev *aux_dev, u32 port_idx) > +{ > + struct hbl_en_port *port = HBL_EN_PORT(aux_dev, port_idx); > + struct net_device *ndev

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-19 Thread Andrew Lunn
> > Does this device require IPv4? What about users and infrastructures that > > use IPv6 only? > > IPv4 is legacy at this point. > > Gaudi2 supports IPv4 only. Really? I guess really old stuff, SLIP from 1988 does not support IPv6, but i don't remember seeing anything from this century which do

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-19 Thread Jakub Kicinski
On Wed, 19 Jun 2024 07:16:20 + Omer Shpigelman wrote: > >> Are you referring to get_module_eeprom_by_page()? if so, then it is not > >> supported by our FW, we read the entire data on device load. > >> However, I can hide that behind the new API and return only the > >> requested page if that's

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-19 Thread Omer Shpigelman
On 6/19/24 11:01, Przemek Kitszel wrote: > On 6/19/24 09:16, Omer Shpigelman wrote: >> On 6/18/24 17:19, Andrew Lunn wrote: > > [...] > >> +module_param(poll_enable, bool, 0444); >> +MODULE_PARM_DESC(poll_enable, >> + "Enable Rx polling rather than IRQ + NAPI (0 = no, 1 =

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-19 Thread Omer Shpigelman
On 6/19/24 00:19, Stephen Hemminger wrote: > On Tue, 18 Jun 2024 19:37:36 + > Omer Shpigelman wrote: > >>> >>> Is there any reason in particular to call netif_receive_skb instead of >>> napi_gro_receive ? >>> >> >> As you can see, we also support polling mode which is a non-NAPI flow. >> W

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-19 Thread Omer Shpigelman
On 6/15/24 03:10, Stephen Hemminger wrote: > [You don't often get email from step...@networkplumber.org. Learn why this is > important at https://aka.ms/LearnAboutSenderIdentification ] > > On Thu, 13 Jun 2024 11:22:02 +0300 > Omer Shpigelman wrote: > >> +static int hbl_en_ports_reopen(struct h

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-19 Thread Przemek Kitszel
On 6/19/24 09:16, Omer Shpigelman wrote: On 6/18/24 17:19, Andrew Lunn wrote: [...] +module_param(poll_enable, bool, 0444); +MODULE_PARM_DESC(poll_enable, + "Enable Rx polling rather than IRQ + NAPI (0 = no, 1 = yes, default: no)"); Module parameters are not liked. This probab

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-19 Thread Omer Shpigelman
On 6/18/24 17:19, Andrew Lunn wrote: +static u32 hbl_en_get_mtu(struct hbl_aux_dev *aux_dev, u32 port_idx) +{ + struct hbl_en_port *port = HBL_EN_PORT(aux_dev, port_idx); + struct net_device *ndev = port->ndev; + u32 mtu; + + if (atomic_cmpxchg(&po

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-18 Thread Omer Shpigelman
On 6/15/24 01:48, Joe Damato wrote: > [You don't often get email from jdam...@fastly.com. Learn why this is > important at https://aka.ms/LearnAboutSenderIdentification ] > > On Thu, Jun 13, 2024 at 11:22:02AM +0300, Omer Shpigelman wrote: >> This ethernet driver is initialized via auxiliary bus

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-18 Thread Omer Shpigelman
On 6/15/24 13:55, Zhu Yanjun wrote: > [You don't often get email from yanjun@linux.dev. Learn why this is > important at https://aka.ms/LearnAboutSenderIdentification ] > > 在 2024/6/13 16:22, Omer Shpigelman 写道: >> + >> +/* This function should be called after ctrl_lock was taken */ > > https:

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-18 Thread Omer Shpigelman
On 6/15/24 03:16, Stephen Hemminger wrote: > [You don't often get email from step...@networkplumber.org. Learn why this is > important at https://aka.ms/LearnAboutSenderIdentification ] > >> + >> +/* get the src IP as it is done in devinet_ioctl() */ >> +static int hbl_en_get_src_ip(struct hbl_au

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-18 Thread Andrew Lunn
> >> +static u32 hbl_en_get_mtu(struct hbl_aux_dev *aux_dev, u32 port_idx) > >> +{ > >> + struct hbl_en_port *port = HBL_EN_PORT(aux_dev, port_idx); > >> + struct net_device *ndev = port->ndev; > >> + u32 mtu; > >> + > >> + if (atomic_cmpxchg(&port->in_reset, 0, 1)) { > >> +

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-18 Thread Omer Shpigelman
On 6/14/24 00:49, Andrew Lunn wrote: > [Some people who received this message don't often get email from > and...@lunn.ch. Learn why this is important at > https://aka.ms/LearnAboutSenderIdentification ] > >> +static int hbl_en_napi_poll(struct napi_struct *napi, int budget); >> +static int hbl_

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-15 Thread Andrew Lunn
> > +static void hbl_en_reset_stats(struct hbl_aux_dev *aux_dev, u32 port_idx) > > +{ > > + struct hbl_en_port *port = HBL_EN_PORT(aux_dev, port_idx); > > + > > + port->net_stats.rx_packets = 0; > > + port->net_stats.tx_packets = 0; > > + port->net_stats.rx_bytes = 0; > > + port->net_stat

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-15 Thread Andrew Lunn
On Fri, Jun 14, 2024 at 03:48:43PM -0700, Joe Damato wrote: > On Thu, Jun 13, 2024 at 11:22:02AM +0300, Omer Shpigelman wrote: > > This ethernet driver is initialized via auxiliary bus by the hbl_cn > > driver. > > It serves mainly for control operations that are needed for AI scaling. > > > > Sig

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-15 Thread Zhu Yanjun
在 2024/6/13 16:22, Omer Shpigelman 写道: This ethernet driver is initialized via auxiliary bus by the hbl_cn driver. It serves mainly for control operations that are needed for AI scaling. Signed-off-by: Omer Shpigelman Co-developed-by: Abhilash K V Signed-off-by: Abhilash K V Co-developed-by:

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-15 Thread Zhu Yanjun
在 2024/6/13 16:22, Omer Shpigelman 写道: This ethernet driver is initialized via auxiliary bus by the hbl_cn driver. It serves mainly for control operations that are needed for AI scaling. Signed-off-by: Omer Shpigelman Co-developed-by: Abhilash K V Signed-off-by: Abhilash K V Co-developed-by:

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-14 Thread Stephen Hemminger
> + > +/* get the src IP as it is done in devinet_ioctl() */ > +static int hbl_en_get_src_ip(struct hbl_aux_dev *aux_dev, u32 port_idx, u32 > *src_ip) > +{ > + struct hbl_en_port *port = HBL_EN_PORT(aux_dev, port_idx); > + struct net_device *ndev = port->ndev; > + struct in_device *in_

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-14 Thread Stephen Hemminger
On Thu, 13 Jun 2024 11:22:02 +0300 Omer Shpigelman wrote: > +static int hbl_en_ports_reopen(struct hbl_aux_dev *aux_dev) > +{ > + struct hbl_en_device *hdev = aux_dev->priv; > + struct hbl_en_port *port; > + int rc = 0, i; > + > + for (i = 0; i < hdev->max_num_of_ports; i++) { > +

[PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-14 Thread Omer Shpigelman
This ethernet driver is initialized via auxiliary bus by the hbl_cn driver. It serves mainly for control operations that are needed for AI scaling. Signed-off-by: Omer Shpigelman Co-developed-by: Abhilash K V Signed-off-by: Abhilash K V Co-developed-by: Andrey Agranovich Signed-off-by: Andrey

Re: [PATCH 09/15] net: hbl_en: add habanalabs Ethernet driver

2024-06-13 Thread Andrew Lunn
> +static int hbl_en_napi_poll(struct napi_struct *napi, int budget); > +static int hbl_en_port_open(struct hbl_en_port *port); When you do the Intel internal review, i expect this is crop up. No forward declarations please. Put the code in the right order so they are not needed. > +static int hb