netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4][pull request] 10GbE Intel Wired LAN Driver Updates 2021-04-09
@ 2021-04-09 19:03 Tony Nguyen
  2021-04-09 19:03 ` [PATCH net-next 1/4] ixgbe: Support external GBE SerDes PHY BCM54616s Tony Nguyen
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Tony Nguyen @ 2021-04-09 19:03 UTC (permalink / raw)
  To: davem, kuba; +Cc: Tony Nguyen, netdev, sassmann

This series contains updates to ixgbe and ixgbevf driver.

Jostar Yang adds support for BCM54616s PHY for ixgbe.

Radoslaw aggregates additional Rx errors to be reported to netdev on
ixgbe.

Chen Lin removes an unused function pointer for ixgbe and ixgbevf.

Bhaskar Chowdhury fixes a typo in ixgbe.

The following are changes since commit 4438669eb703d1a7416c2b19a8a15b0400b36738:
  Merge tag 'for-net-next-2021-04-08' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 10GbE

Bhaskar Chowdhury (1):
  net: ethernet: intel: Fix a typo in the file ixgbe_dcb_nl.c

Chen Lin (1):
  net: intel: Remove unused function pointer typedef ixgbe_mc_addr_itr

Jostar Yang (1):
  ixgbe: Support external GBE SerDes PHY BCM54616s

Radoslaw Tyl (1):
  ixgbe: aggregate of all receive errors through netdev's rx_errors

 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c |  2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c   | 11 ++++++++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c    |  3 +++
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h   |  5 +----
 drivers/net/ethernet/intel/ixgbevf/vf.h         |  3 ---
 5 files changed, 15 insertions(+), 9 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH net-next 1/4] ixgbe: Support external GBE SerDes PHY BCM54616s
  2021-04-09 19:03 [PATCH net-next 0/4][pull request] 10GbE Intel Wired LAN Driver Updates 2021-04-09 Tony Nguyen
@ 2021-04-09 19:03 ` Tony Nguyen
  2021-04-09 19:03 ` [PATCH net-next 2/4] ixgbe: aggregate of all receive errors through netdev's rx_errors Tony Nguyen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Tony Nguyen @ 2021-04-09 19:03 UTC (permalink / raw)
  To: davem, kuba
  Cc: Jostar Yang, netdev, sassmann, anthony.l.nguyen, Guohan Lu,
	Paul Menzel, Tony Brelinski

From: Jostar Yang <jostar_yang@accton.com>

The Broadcom PHY is used in switches, so add the ID, and hook it up.

This upstreams the Linux kernel patch from the network operating system
SONiC from February 2020 [1].

[1]: https://github.com/Azure/sonic-linux-kernel/pull/122

Signed-off-by: Jostar Yang <jostar_yang@accton.com>
Signed-off-by: Guohan Lu <lguohan@gmail.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c  | 3 +++
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
index 73bc170d1ae9..24aa97f993ca 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -380,6 +380,9 @@ static enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)
 	case X557_PHY_ID2:
 		phy_type = ixgbe_phy_x550em_ext_t;
 		break;
+	case BCM54616S_E_PHY_ID:
+		phy_type = ixgbe_phy_ext_1g_t;
+		break;
 	default:
 		phy_type = ixgbe_phy_unknown;
 		break;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 2be1c4c72435..4c317b0dbfd4 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -1407,6 +1407,7 @@ struct ixgbe_nvm_version {
 #define QT2022_PHY_ID    0x0043A400
 #define ATH_PHY_ID       0x03429050
 #define AQ_FW_REV        0x20
+#define BCM54616S_E_PHY_ID 0x03625D10
 
 /* Special PHY Init Routine */
 #define IXGBE_PHY_INIT_OFFSET_NL 0x002B
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH net-next 2/4] ixgbe: aggregate of all receive errors through netdev's rx_errors
  2021-04-09 19:03 [PATCH net-next 0/4][pull request] 10GbE Intel Wired LAN Driver Updates 2021-04-09 Tony Nguyen
  2021-04-09 19:03 ` [PATCH net-next 1/4] ixgbe: Support external GBE SerDes PHY BCM54616s Tony Nguyen
@ 2021-04-09 19:03 ` Tony Nguyen
  2021-04-10  1:00   ` Jakub Kicinski
  2021-04-09 19:03 ` [PATCH net-next 3/4] net: intel: Remove unused function pointer typedef ixgbe_mc_addr_itr Tony Nguyen
  2021-04-09 19:03 ` [PATCH net-next 4/4] net: ethernet: intel: Fix a typo in the file ixgbe_dcb_nl.c Tony Nguyen
  3 siblings, 1 reply; 7+ messages in thread
From: Tony Nguyen @ 2021-04-09 19:03 UTC (permalink / raw)
  To: davem, kuba
  Cc: Radoslaw Tyl, netdev, sassmann, anthony.l.nguyen, Tony Brelinski

From: Radoslaw Tyl <radoslawx.tyl@intel.com>

The global rx error does not take into account all the error counters
that are counted by device.

Extend rx error with the following counters:
- illegal byte error
- number of receive fragment errors
- receive jabber
- receive oversize error
- receive undersize error
- frames marked as checksum invalid by hardware

The above were added in order to align statistics with other products.

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 7ba1c2985ef7..7711828401d9 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7240,12 +7240,21 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
 	hwstats->ptc1023 += IXGBE_READ_REG(hw, IXGBE_PTC1023);
 	hwstats->ptc1522 += IXGBE_READ_REG(hw, IXGBE_PTC1522);
 	hwstats->bptc += IXGBE_READ_REG(hw, IXGBE_BPTC);
+	hwstats->illerrc += IXGBE_READ_REG(hw, IXGBE_ILLERRC);
 
 	/* Fill out the OS statistics structure */
 	netdev->stats.multicast = hwstats->mprc;
 
 	/* Rx Errors */
-	netdev->stats.rx_errors = hwstats->crcerrs + hwstats->rlec;
+	netdev->stats.rx_errors = hwstats->crcerrs +
+				    hwstats->illerrc +
+				    hwstats->rlec +
+				    hwstats->rfc +
+				    hwstats->rjc +
+				    hwstats->roc +
+				    hwstats->ruc +
+				    hw_csum_rx_error;
+
 	netdev->stats.rx_dropped = 0;
 	netdev->stats.rx_length_errors = hwstats->rlec;
 	netdev->stats.rx_crc_errors = hwstats->crcerrs;
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH net-next 3/4] net: intel: Remove unused function pointer typedef ixgbe_mc_addr_itr
  2021-04-09 19:03 [PATCH net-next 0/4][pull request] 10GbE Intel Wired LAN Driver Updates 2021-04-09 Tony Nguyen
  2021-04-09 19:03 ` [PATCH net-next 1/4] ixgbe: Support external GBE SerDes PHY BCM54616s Tony Nguyen
  2021-04-09 19:03 ` [PATCH net-next 2/4] ixgbe: aggregate of all receive errors through netdev's rx_errors Tony Nguyen
@ 2021-04-09 19:03 ` Tony Nguyen
  2021-04-09 19:03 ` [PATCH net-next 4/4] net: ethernet: intel: Fix a typo in the file ixgbe_dcb_nl.c Tony Nguyen
  3 siblings, 0 replies; 7+ messages in thread
From: Tony Nguyen @ 2021-04-09 19:03 UTC (permalink / raw)
  To: davem, kuba; +Cc: Chen Lin, netdev, sassmann, anthony.l.nguyen, Dave Switzer

From: Chen Lin <chen.lin5@zte.com.cn>

Remove the 'ixgbe_mc_addr_itr' typedef as it is not used.

Signed-off-by: Chen Lin <chen.lin5@zte.com.cn>
Tested-by: Dave Switzer <david.switzer@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 4 ----
 drivers/net/ethernet/intel/ixgbevf/vf.h       | 3 ---
 2 files changed, 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 4c317b0dbfd4..2647937f7f4d 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -3384,10 +3384,6 @@ struct ixgbe_hw_stats {
 /* forward declaration */
 struct ixgbe_hw;
 
-/* iterator type for walking multicast address lists */
-typedef u8* (*ixgbe_mc_addr_itr) (struct ixgbe_hw *hw, u8 **mc_addr_ptr,
-				  u32 *vmdq);
-
 /* Function pointer table */
 struct ixgbe_eeprom_operations {
 	s32 (*init_params)(struct ixgbe_hw *);
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.h b/drivers/net/ethernet/intel/ixgbevf/vf.h
index d1e9e306653b..1d8209df4162 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.h
@@ -16,9 +16,6 @@
 
 struct ixgbe_hw;
 
-/* iterator type for walking multicast address lists */
-typedef u8* (*ixgbe_mc_addr_itr) (struct ixgbe_hw *hw, u8 **mc_addr_ptr,
-				  u32 *vmdq);
 struct ixgbe_mac_operations {
 	s32 (*init_hw)(struct ixgbe_hw *);
 	s32 (*reset_hw)(struct ixgbe_hw *);
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH net-next 4/4] net: ethernet: intel: Fix a typo in the file ixgbe_dcb_nl.c
  2021-04-09 19:03 [PATCH net-next 0/4][pull request] 10GbE Intel Wired LAN Driver Updates 2021-04-09 Tony Nguyen
                   ` (2 preceding siblings ...)
  2021-04-09 19:03 ` [PATCH net-next 3/4] net: intel: Remove unused function pointer typedef ixgbe_mc_addr_itr Tony Nguyen
@ 2021-04-09 19:03 ` Tony Nguyen
  3 siblings, 0 replies; 7+ messages in thread
From: Tony Nguyen @ 2021-04-09 19:03 UTC (permalink / raw)
  To: davem, kuba
  Cc: Bhaskar Chowdhury, netdev, sassmann, anthony.l.nguyen,
	Jesse Brandeburg, Randy Dunlap

From: Bhaskar Chowdhury <unixbhaskar@gmail.com>

s/Reprogam/Reprogram/

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
index c00332d2e02a..72e6ebffea33 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
@@ -361,7 +361,7 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
 	}
 
 #ifdef IXGBE_FCOE
-	/* Reprogam FCoE hardware offloads when the traffic class
+	/* Reprogram FCoE hardware offloads when the traffic class
 	 * FCoE is using changes. This happens if the APP info
 	 * changes or the up2tc mapping is updated.
 	 */
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next 2/4] ixgbe: aggregate of all receive errors through netdev's rx_errors
  2021-04-09 19:03 ` [PATCH net-next 2/4] ixgbe: aggregate of all receive errors through netdev's rx_errors Tony Nguyen
@ 2021-04-10  1:00   ` Jakub Kicinski
  2021-04-13 23:52     ` Nguyen, Anthony L
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2021-04-10  1:00 UTC (permalink / raw)
  To: Tony Nguyen; +Cc: davem, Radoslaw Tyl, netdev, sassmann, Tony Brelinski

On Fri,  9 Apr 2021 12:03:12 -0700 Tony Nguyen wrote:
> From: Radoslaw Tyl <radoslawx.tyl@intel.com>
> 
> The global rx error does not take into account all the error counters
> that are counted by device.
> 
> Extend rx error with the following counters:
> - illegal byte error
> - number of receive fragment errors
> - receive jabber
> - receive oversize error
> - receive undersize error
> - frames marked as checksum invalid by hardware
> 
> The above were added in order to align statistics with other products.
> 
> Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
> Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 7ba1c2985ef7..7711828401d9 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -7240,12 +7240,21 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
>  	hwstats->ptc1023 += IXGBE_READ_REG(hw, IXGBE_PTC1023);
>  	hwstats->ptc1522 += IXGBE_READ_REG(hw, IXGBE_PTC1522);
>  	hwstats->bptc += IXGBE_READ_REG(hw, IXGBE_BPTC);
> +	hwstats->illerrc += IXGBE_READ_REG(hw, IXGBE_ILLERRC);
>  
>  	/* Fill out the OS statistics structure */
>  	netdev->stats.multicast = hwstats->mprc;
>  
>  	/* Rx Errors */
> -	netdev->stats.rx_errors = hwstats->crcerrs + hwstats->rlec;
> +	netdev->stats.rx_errors = hwstats->crcerrs +
> +				    hwstats->illerrc +
> +				    hwstats->rlec +
> +				    hwstats->rfc +
> +				    hwstats->rjc +
> +				    hwstats->roc +
> +				    hwstats->ruc +

IDK what the HW counts exactly but perhaps rlec includes other
counters? Note that the stats you add with this patch are RFC 2819 /
RMON counters, and AFAIU they overlap with IEEE counters.

If the RMON counters are somehow exclusively counting their events you
should update rx_length_errors as well.

> +				    hw_csum_rx_error;

AFAICT this is incorrect L4 csum, that's not supposed be counted as NIC
rx_error. Let the appropriate protocol code check this and increment
its own counter.

>  	netdev->stats.rx_dropped = 0;
>  	netdev->stats.rx_length_errors = hwstats->rlec;
>  	netdev->stats.rx_crc_errors = hwstats->crcerrs;


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next 2/4] ixgbe: aggregate of all receive errors through netdev's rx_errors
  2021-04-10  1:00   ` Jakub Kicinski
@ 2021-04-13 23:52     ` Nguyen, Anthony L
  0 siblings, 0 replies; 7+ messages in thread
From: Nguyen, Anthony L @ 2021-04-13 23:52 UTC (permalink / raw)
  To: kuba; +Cc: davem, netdev, Tyl, RadoslawX, sassmann, Brelinski, TonyX

On Fri, 2021-04-09 at 18:00 -0700, Jakub Kicinski wrote:
> On Fri,  9 Apr 2021 12:03:12 -0700 Tony Nguyen wrote:
> > From: Radoslaw Tyl <radoslawx.tyl@intel.com>
> > 
> > The global rx error does not take into account all the error
> > counters
> > that are counted by device.
> > 
> > Extend rx error with the following counters:
> > - illegal byte error
> > - number of receive fragment errors
> > - receive jabber
> > - receive oversize error
> > - receive undersize error
> > - frames marked as checksum invalid by hardware
> > 
> > The above were added in order to align statistics with other
> > products.
> > 
> > Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
> > Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
> > Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> > ---
> >  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 11 ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > index 7ba1c2985ef7..7711828401d9 100644
> > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > @@ -7240,12 +7240,21 @@ void ixgbe_update_stats(struct
> > ixgbe_adapter *adapter)
> >  	hwstats->ptc1023 += IXGBE_READ_REG(hw, IXGBE_PTC1023);
> >  	hwstats->ptc1522 += IXGBE_READ_REG(hw, IXGBE_PTC1522);
> >  	hwstats->bptc += IXGBE_READ_REG(hw, IXGBE_BPTC);
> > +	hwstats->illerrc += IXGBE_READ_REG(hw, IXGBE_ILLERRC);
> >  
> >  	/* Fill out the OS statistics structure */
> >  	netdev->stats.multicast = hwstats->mprc;
> >  
> >  	/* Rx Errors */
> > -	netdev->stats.rx_errors = hwstats->crcerrs + hwstats->rlec;
> > +	netdev->stats.rx_errors = hwstats->crcerrs +
> > +				    hwstats->illerrc +
> > +				    hwstats->rlec +
> > +				    hwstats->rfc +
> > +				    hwstats->rjc +
> > +				    hwstats->roc +
> > +				    hwstats->ruc +
> 
> IDK what the HW counts exactly but perhaps rlec includes other
> counters? Note that the stats you add with this patch are RFC 2819 /
> RMON counters, and AFAIU they overlap with IEEE counters.
> 
> If the RMON counters are somehow exclusively counting their events
> you
> should update rx_length_errors as well.

Thanks for the feedback. I'm going to drop this patch for now so we can
double check that everything is being properly included/excluded.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-13 23:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 19:03 [PATCH net-next 0/4][pull request] 10GbE Intel Wired LAN Driver Updates 2021-04-09 Tony Nguyen
2021-04-09 19:03 ` [PATCH net-next 1/4] ixgbe: Support external GBE SerDes PHY BCM54616s Tony Nguyen
2021-04-09 19:03 ` [PATCH net-next 2/4] ixgbe: aggregate of all receive errors through netdev's rx_errors Tony Nguyen
2021-04-10  1:00   ` Jakub Kicinski
2021-04-13 23:52     ` Nguyen, Anthony L
2021-04-09 19:03 ` [PATCH net-next 3/4] net: intel: Remove unused function pointer typedef ixgbe_mc_addr_itr Tony Nguyen
2021-04-09 19:03 ` [PATCH net-next 4/4] net: ethernet: intel: Fix a typo in the file ixgbe_dcb_nl.c Tony Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).