File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
drivers/net/ethernet/emulex/benet Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ struct be_mcc_obj {
230230struct be_tx_stats {
231231 u64 tx_bytes ;
232232 u64 tx_pkts ;
233+ u64 tx_vxlan_offload_pkts ;
233234 u64 tx_reqs ;
234235 u64 tx_compl ;
235236 ulong tx_jiffies ;
@@ -277,6 +278,7 @@ struct be_rx_page_info {
277278struct be_rx_stats {
278279 u64 rx_bytes ;
279280 u64 rx_pkts ;
281+ u64 rx_vxlan_offload_pkts ;
280282 u32 rx_drops_no_skbs ; /* skb allocation errors */
281283 u32 rx_drops_no_frags ; /* HW has no fetched frags */
282284 u32 rx_post_fail ; /* page post alloc failures */
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ static const struct be_ethtool_stat et_stats[] = {
138138static const struct be_ethtool_stat et_rx_stats [] = {
139139 {DRVSTAT_RX_INFO (rx_bytes )},/* If moving this member see above note */
140140 {DRVSTAT_RX_INFO (rx_pkts )}, /* If moving this member see above note */
141+ {DRVSTAT_RX_INFO (rx_vxlan_offload_pkts )},
141142 {DRVSTAT_RX_INFO (rx_compl )},
142143 {DRVSTAT_RX_INFO (rx_compl_err )},
143144 {DRVSTAT_RX_INFO (rx_mcast_pkts )},
@@ -190,6 +191,7 @@ static const struct be_ethtool_stat et_tx_stats[] = {
190191 {DRVSTAT_TX_INFO (tx_internal_parity_err )},
191192 {DRVSTAT_TX_INFO (tx_bytes )},
192193 {DRVSTAT_TX_INFO (tx_pkts )},
194+ {DRVSTAT_TX_INFO (tx_vxlan_offload_pkts )},
193195 /* Number of skbs queued for trasmission by the driver */
194196 {DRVSTAT_TX_INFO (tx_reqs )},
195197 /* Number of times the TX queue was stopped due to lack
Original file line number Diff line number Diff line change @@ -677,11 +677,14 @@ void be_link_status_update(struct be_adapter *adapter, u8 link_status)
677677static void be_tx_stats_update (struct be_tx_obj * txo , struct sk_buff * skb )
678678{
679679 struct be_tx_stats * stats = tx_stats (txo );
680+ u64 tx_pkts = skb_shinfo (skb )-> gso_segs ? : 1 ;
680681
681682 u64_stats_update_begin (& stats -> sync );
682683 stats -> tx_reqs ++ ;
683684 stats -> tx_bytes += skb -> len ;
684- stats -> tx_pkts += (skb_shinfo (skb )-> gso_segs ? : 1 );
685+ stats -> tx_pkts += tx_pkts ;
686+ if (skb -> encapsulation && skb -> ip_summed == CHECKSUM_PARTIAL )
687+ stats -> tx_vxlan_offload_pkts += tx_pkts ;
685688 u64_stats_update_end (& stats -> sync );
686689}
687690
@@ -1957,6 +1960,8 @@ static void be_rx_stats_update(struct be_rx_obj *rxo,
19571960 stats -> rx_compl ++ ;
19581961 stats -> rx_bytes += rxcp -> pkt_size ;
19591962 stats -> rx_pkts ++ ;
1963+ if (rxcp -> tunneled )
1964+ stats -> rx_vxlan_offload_pkts ++ ;
19601965 if (rxcp -> pkt_type == BE_MULTICAST_PACKET )
19611966 stats -> rx_mcast_pkts ++ ;
19621967 if (rxcp -> err )
You can’t perform that action at this time.
0 commit comments