ixgbe: fix typo
Subsystems (2)
PATCH 1/2 ixgbe: fix typo
Define names were accidently transposed.
---
drivers/net/ixgbe/ixgbe_82598.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ixgbe/ixgbe_82598.c +2 -2
@@ -58,8 +58,8 @@ static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw);static s32 ixgbe_get_invariants_82598 (struct ixgbe_hw *hw) { - hw->mac.num_rx_queues =IXGBE_82598_MAX_TX_QUEUES ; - hw->mac.num_tx_queues =IXGBE_82598_MAX_RX_QUEUES ; + hw->mac.num_rx_queues =IXGBE_82598_MAX_RX_QUEUES ; + hw->mac.num_tx_queues =IXGBE_82598_MAX_TX_QUEUES ; hw->mac.num_rx_addrs =IXGBE_82598_RAR_ENTRIES ;/* PHY ops are filled in by default properly for Fiber only */
PATCH 2/2 ixgbe: add LRO support
Support for in-kernel LRO
---
drivers/net/ixgbe/ixgbe.h | 9 +++ drivers/net/ixgbe/ixgbe_ethtool.c | 9 +++ drivers/net/ixgbe/ixgbe_main.c | 111 ++++++++++++++++++++++++++++++------- 3 files changed, 108 insertions(+), 21 deletions(-)
drivers/net/ixgbe/ixgbe.h +9 -0
@@ -32,6 +32,7 @@#include <linux/types.h> #include <linux/pci.h> #include <linux/netdevice.h> +#include <linux/inet_lro.h> #include "ixgbe_type.h" #include "ixgbe_common.h"
@@ -100,6 +101,9 @@#define IXGBE_TX_FLAGS_VLAN_MASK 0xffff0000#define IXGBE_TX_FLAGS_VLAN_SHIFT 16 +#define IXGBE_MAX_LRO_DESCRIPTORS 8 +#define IXGBE_MAX_LRO_AGGREGATE 32 +/* wrapper around a pointer to a socket buffer, * so a DMA handle can be stored along with the buffer */ struct ixgbe_tx_buffer {
@@ -150,6 +154,8 @@ struct ixgbe_ring {/* cpu for tx queue */ int cpu;#endif +struct net_lro_mgr lro_mgr; +bool lro_used;struct ixgbe_queue_stats stats;u8 v_idx;/* maps directly to the index for this ring in the hardware * vector array, can also be used for finding the bit in EICR
@@ -287,6 +293,9 @@ struct ixgbe_adapter {unsigned long state;u64 tx_busy; +u64 lro_aggregated; +u64 lro_flushed; +u64 lro_no_desc; };enum ixbge_state_t {
drivers/net/ixgbe/ixgbe_ethtool.c +9 -0
@@ -90,6 +90,8 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = { {"rx_header_split", IXGBE_STAT(rx_hdr_split)}, {"alloc_rx_page_failed", IXGBE_STAT(alloc_rx_page_failed)}, {"alloc_rx_buff_failed", IXGBE_STAT(alloc_rx_buff_failed)}, + {"lro_aggregated", IXGBE_STAT(lro_aggregated)}, + {"lro_flushed", IXGBE_STAT(lro_flushed)}, };#define IXGBE_QUEUE_STATS_LEN \
@@ -787,6 +789,7 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,int stat_count =sizeof (struct ixgbe_queue_stats ) /sizeof (u64);int j, k;int i; +u64 aggregated =0 , flushed =0 , no_desc =0 ;ixgbe_update_stats (adapter);for (i =0 ; i <IXGBE_GLOBAL_STATS_LEN ; i++) {
@@ -801,11 +804,17 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, i += k; }for (j =0 ; j < adapter->num_rx_queues; j++) { + aggregated += adapter->rx_ring[j].lro_mgr.stats.aggregated; + flushed += adapter->rx_ring[j].lro_mgr.stats.flushed; + no_desc += adapter->rx_ring[j].lro_mgr.stats.no_desc; queue_stat = (u64 *)&adapter->rx_ring[j].stats;for (k =0 ; k < stat_count; k++) data[i + k] = queue_stat[k]; i += k; } + adapter->lro_aggregated = aggregated; + adapter->lro_flushed = flushed; + adapter->lro_no_desc = no_desc; } static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
drivers/net/ixgbe/ixgbe_main.c +90 -21
194 lines not on this page · raw message
Re: [PATCH 2/2] ixgbe: add LRO support
Quoted 24 lines · Jeff Kirsher
Support for in-kernel LRO
Signed-off-by Mallikarjuna R Chilakala <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>---
drivers/net/ixgbe/ixgbe.h | 9 +++ drivers/net/ixgbe/ixgbe_ethtool.c | 9 +++ drivers/net/ixgbe/ixgbe_main.c | 111 ++++++++++++++++++++++++++++++------- 3 files changed, 108 insertions(+), 21 deletions(-)drivers/net/ixgbe/ixgbe.h +1
-0@@ -32,6 +32,7 @@#include <linux/types.h> #include <linux/pci.h> #include <linux/netdevice.h> +#include <linux/inet_lro.h> #include "ixgbe_type.h" #include "ixgbe_common.h"
drivers/net/ixgbe/ixgbe.h line 105
Quoted 5 lines
drivers/net/ixgbe/ixgbe.h +2
-0@@ -100,6 +101,9 @@#define IXGBE_TX_FLAGS_VLAN_MASK 0xffff0000#define IXGBE_TX_FLAGS_VLAN_SHIFT 16 +#define IXGBE_MAX_LRO_DESCRIPTORS 8 +#define IXGBE_MAX_LRO_AGGREGATE 32
I think this is supposed to be <= MAX_SKB_FRAGS, though that's only critical if you aggregating pages.
[...]
drivers/net/ixgbe/ixgbe.h static int __devinit ixgbe_probe(struct pci_dev *pdev, · line 3588
Quoted 5 lines
drivers/net/ixgbe/ixgbe.h +1
-0@@ -3517,6 +3585,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,NETIF_F_HW_VLAN_RX |NETIF_F_HW_VLAN_FILTER ; + netdev->features |=NETIF_F_LRO ;
There needs to be a way of turning LRO off. It should be sufficient to add:
.get_flags = ethtool_op_get_flags,
.set_flags = ethtool_op_set_flags,
to your ethtool_ops. A module parameter to set the default might be worthwhile too.
Ben.
Signature · 8 lines
Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
Re: [PATCH 2/2] ixgbe: add LRO support
Thanks for your feedback Ben. I'll update the patch with ethtool get and set flags. But in packet split mode we still wouldn't want to limit this with MAX_SKB_FRAGS because we don't actually add the frags to the previous packet. They just chain them together using the frag_list and next pointers in the skb. Let me know if it still doesn't address your concern in max aggregation.
Thanks & Regards
-Malli
Quoted 55 lines · Ben Hutchings
Quoted 3 lines · Jeff Kirsher
Support for in-kernel LRO
Signed-off-by Mallikarjuna R Chilakala <Quoted 6 lines
Signed-off-by Jeff Kirsher <[email protected]>---
drivers/net/ixgbe/ixgbe.h | 9 +++ drivers/net/ixgbe/ixgbe_ethtool.c | 9 +++ drivers/net/ixgbe/ixgbe_main.c | 111++++++++++++++++++++++++++++++-------
Quoted 15 lines
3 files changed, 108 insertions(+), 21 deletions(-)drivers/net/ixgbe/ixgbe.h +1
-0@@ -32,6 +32,7 @@#include <linux/types.h> #include <linux/pci.h> #include <linux/netdevice.h> +#include <linux/inet_lro.h> #include "ixgbe_type.h" #include "ixgbe_common.h" drivers/net/ixgbe/ixgbe.h line 105
Quoted 5 lines
drivers/net/ixgbe/ixgbe.h +2
-0@@ -100,6 +101,9 @@#define IXGBE_TX_FLAGS_VLAN_MASK 0xffff0000#define IXGBE_TX_FLAGS_VLAN_SHIFT 16 +#define IXGBE_MAX_LRO_DESCRIPTORS 8 +#define IXGBE_MAX_LRO_AGGREGATE 32I think this is supposed to be <=
MAX_SKB_FRAGS, though that's only critical if you aggregating pages.[...]
drivers/net/ixgbe/ixgbe.h static int __devinit ixgbe_probe(struct pci_dev
Quoted 1 line
drivers/net/ixgbe/ixgbe.h +0
-0@@ -3517,6 +3585,7 @@ static int __devinit ixgbe_probe(struct pci_dev*pdev,
drivers/net/ixgbe/ixgbe.h static int __devinit ixgbe_probe(struct pci_dev · line 3588
Quoted 4 lines
drivers/net/ixgbe/ixgbe.h +1
-0NETIF_F_HW_VLAN_RX |NETIF_F_HW_VLAN_FILTER ; + netdev->features |=NETIF_F_LRO ;There needs to be a way of turning LRO off. It should be sufficient to add:
.get_flags =
ethtool_op_get_flags,
.set_flags =ethtool_op_set_flags,to your
ethtool_ops. A module parameter to set the default might be worthwhile too.Ben.
Quoted 8 lines
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. --
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
Re: [PATCH 2/2] ixgbe: add LRO support
Forwarding my reply. It got rejected from netdev list, as it was sent in HTML
Thanks for your feedback Ben. I'll update the patch with ethtool get and set flags. But in packet split mode we still wouldn't want to limit this with MAX_SKB_FRAGS because we don't actually add the frags to the previous packet. They just chain them together using the frag_list and next pointers in the skb. Let me know if it still doesn't address your concern in max aggregation.
Thanks & Regards
-Malli
Quoted 62 lines · Ben Hutchings
Quoted 60 lines
Quoted 24 lines · Jeff Kirsher
Support for in-kernel LRO
Signed-off-by Mallikarjuna R Chilakala <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>---
drivers/net/ixgbe/ixgbe.h | 9 +++ drivers/net/ixgbe/ixgbe_ethtool.c | 9 +++ drivers/net/ixgbe/ixgbe_main.c | 111 ++++++++++++++++++++++++++++++------- 3 files changed, 108 insertions(+), 21 deletions(-)drivers/net/ixgbe/ixgbe.h +1
-0@@ -32,6 +32,7 @@#include <linux/types.h> #include <linux/pci.h> #include <linux/netdevice.h> +#include <linux/inet_lro.h> #include "ixgbe_type.h" #include "ixgbe_common.h" drivers/net/ixgbe/ixgbe.h line 105
Quoted 5 lines
drivers/net/ixgbe/ixgbe.h +2
-0@@ -100,6 +101,9 @@#define IXGBE_TX_FLAGS_VLAN_MASK 0xffff0000#define IXGBE_TX_FLAGS_VLAN_SHIFT 16 +#define IXGBE_MAX_LRO_DESCRIPTORS 8 +#define IXGBE_MAX_LRO_AGGREGATE 32I think this is supposed to be <=
MAX_SKB_FRAGS, though that's only critical if you aggregating pages.[...]
drivers/net/ixgbe/ixgbe.h static int __devinit ixgbe_probe(struct pci_dev *pdev, · line 3588
Quoted 5 lines
drivers/net/ixgbe/ixgbe.h +1
-0@@ -3517,6 +3585,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,NETIF_F_HW_VLAN_RX |NETIF_F_HW_VLAN_FILTER ; + netdev->features |=NETIF_F_LRO ;There needs to be a way of turning LRO off. It should be sufficient to add:
.get_flags =
ethtool_op_get_flags,
.set_flags =ethtool_op_set_flags,to your
ethtool_ops. A module parameter to set the default might be worthwhile too.Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. --
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 14 lines · Jeff Kirsher
Define names were accidently transposed.
Signed-off-by Jeff Kirsher <[email protected]>---
drivers/net/ixgbe/ixgbe_82598.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/net/ixgbe/ixgbe_82598.c +0
-0
drivers/net/ixgbe/ixgbe_82598.c static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw); · line 65
Quoted 10 lines
drivers/net/ixgbe/ixgbe_82598.c +2
-2@@ -58,8 +58,8 @@ static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw);static s32 ixgbe_get_invariants_82598 (struct ixgbe_hw *hw) { - hw->mac.num_rx_queues =IXGBE_82598_MAX_TX_QUEUES ; - hw->mac.num_tx_queues =IXGBE_82598_MAX_RX_QUEUES ; + hw->mac.num_rx_queues =IXGBE_82598_MAX_RX_QUEUES ; + hw->mac.num_tx_queues =IXGBE_82598_MAX_TX_QUEUES ; hw->mac.num_rx_addrs =IXGBE_82598_RAR_ENTRIES ;/* PHY ops are filled in by default properly for Fiber only */
applied for 2.6.26
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Re: [PATCH 2/2] ixgbe: add LRO support
In reply to MalliQuoted 8 lines · Malli
Forwarding my reply. It got rejected from netdev list, as it was sent in HTML
Thanks for your feedback Ben. I'll update the patch with ethtool get and set flags. But in packet split mode we still wouldn't want to limit this with
MAX_SKB_FRAGSbecause we don't actually add the frags to the previous packet. They just chain them together using thefrag_listand next pointers in the skb. Let me know if it still doesn't address your concern in max aggregation.
Yes, I understood that. I wasn't sure whether MAX_SKB_FRAGS was also meant to be a limit on the frag_list. The comment above its definition implies quite strongly that it isn't, so there's no problem.
Ben.
Signature · 8 lines
Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php