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 {
230
230
struct be_tx_stats {
231
231
u64 tx_bytes ;
232
232
u64 tx_pkts ;
233
+ u64 tx_vxlan_offload_pkts ;
233
234
u64 tx_reqs ;
234
235
u64 tx_compl ;
235
236
ulong tx_jiffies ;
@@ -277,6 +278,7 @@ struct be_rx_page_info {
277
278
struct be_rx_stats {
278
279
u64 rx_bytes ;
279
280
u64 rx_pkts ;
281
+ u64 rx_vxlan_offload_pkts ;
280
282
u32 rx_drops_no_skbs ; /* skb allocation errors */
281
283
u32 rx_drops_no_frags ; /* HW has no fetched frags */
282
284
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[] = {
138
138
static const struct be_ethtool_stat et_rx_stats [] = {
139
139
{DRVSTAT_RX_INFO (rx_bytes )},/* If moving this member see above note */
140
140
{DRVSTAT_RX_INFO (rx_pkts )}, /* If moving this member see above note */
141
+ {DRVSTAT_RX_INFO (rx_vxlan_offload_pkts )},
141
142
{DRVSTAT_RX_INFO (rx_compl )},
142
143
{DRVSTAT_RX_INFO (rx_compl_err )},
143
144
{DRVSTAT_RX_INFO (rx_mcast_pkts )},
@@ -190,6 +191,7 @@ static const struct be_ethtool_stat et_tx_stats[] = {
190
191
{DRVSTAT_TX_INFO (tx_internal_parity_err )},
191
192
{DRVSTAT_TX_INFO (tx_bytes )},
192
193
{DRVSTAT_TX_INFO (tx_pkts )},
194
+ {DRVSTAT_TX_INFO (tx_vxlan_offload_pkts )},
193
195
/* Number of skbs queued for trasmission by the driver */
194
196
{DRVSTAT_TX_INFO (tx_reqs )},
195
197
/* 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)
677
677
static void be_tx_stats_update (struct be_tx_obj * txo , struct sk_buff * skb )
678
678
{
679
679
struct be_tx_stats * stats = tx_stats (txo );
680
+ u64 tx_pkts = skb_shinfo (skb )-> gso_segs ? : 1 ;
680
681
681
682
u64_stats_update_begin (& stats -> sync );
682
683
stats -> tx_reqs ++ ;
683
684
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 ;
685
688
u64_stats_update_end (& stats -> sync );
686
689
}
687
690
@@ -1957,6 +1960,8 @@ static void be_rx_stats_update(struct be_rx_obj *rxo,
1957
1960
stats -> rx_compl ++ ;
1958
1961
stats -> rx_bytes += rxcp -> pkt_size ;
1959
1962
stats -> rx_pkts ++ ;
1963
+ if (rxcp -> tunneled )
1964
+ stats -> rx_vxlan_offload_pkts ++ ;
1960
1965
if (rxcp -> pkt_type == BE_MULTICAST_PACKET )
1961
1966
stats -> rx_mcast_pkts ++ ;
1962
1967
if (rxcp -> err )
You can’t perform that action at this time.
0 commit comments