Commit d81db24
net/ena: refactor ena_get_stats64 to be atomic context safe
ndo_get_stat64() can be called from atomic context, but the current
implementation sends an admin command to retrieve the statistics from
the device. This admin command can sleep.
This patch re-factors the implementation of ena_get_stats64() to use
the {rx,tx}bytes/count from the driver's inner counters, and to obtain
the rx drop counter from the asynchronous keep alive (heart bit)
event.
Signed-off-by: Netanel Belgazal <netanel@annapurnalabs.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 22b331c commit d81db24
File tree
3 files changed
+42
-15
lines changed- drivers/net/ethernet/amazon/ena
3 files changed
+42
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
876 | 884 | | |
877 | 885 | | |
878 | 886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2169 | 2169 | | |
2170 | 2170 | | |
2171 | 2171 | | |
2172 | | - | |
2173 | | - | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
2174 | 2176 | | |
2175 | 2177 | | |
2176 | 2178 | | |
2177 | 2179 | | |
2178 | | - | |
2179 | | - | |
2180 | | - | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
2181 | 2184 | | |
2182 | | - | |
2183 | | - | |
2184 | | - | |
2185 | | - | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
2186 | 2190 | | |
2187 | | - | |
2188 | | - | |
2189 | | - | |
2190 | | - | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
2191 | 2210 | | |
2192 | | - | |
2193 | | - | |
| 2211 | + | |
2194 | 2212 | | |
2195 | 2213 | | |
2196 | 2214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
| |||
0 commit comments