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-14 Thread Jakub Kicinski
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 gaudi_nic_device *gaudi_nic = *ptr; > > + struct hl_device *hdev = gaud

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 (coresight). > > Is there any relationship near

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

2020-09-13 Thread Florian Fainelli
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 (coresight). Is there any relationship near or far with ARM's CoreSight: https://developer.arm.com/ip-products/system-ip

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

2020-09-13 Thread Andrew Lunn
> +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_nic_device *gaudi_nic = *ptr; > + struct hl_device *hdev = gau

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

2020-09-13 Thread Andrew Lunn
> +static struct gaudi_nic_ethtool_stats gaudi_nic_mac_stats_rx[] = { > + {"Rx MAC counters", 0}, > + {" etherStatsOctets", 0x0}, > + {" OctetsReceivedOK", 0x4}, > + {" aAlignmentErrors", 0x8}, > + {" aPAUSEMACCtrlFramesReceived", 0xC}, > + {" aFrameTooLongErrors", 0x10

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

2020-09-12 Thread Oded Gabbay
From: Omer Shpigelman The driver supports ethtool callbacks and provides statistics using the device's profiling infrastructure (coresight). We support the basic ethtool functionality and counters, as far as our H/W provides support. A summary of the supported callbacks: - get_drvinfo: fill so