summaryrefslogtreecommitdiffstats
path: root/VNFs
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2020-05-26 11:56:41 +0200
committerXavier Simonart <xavier.simonart@intel.com>2020-05-29 23:48:36 +0200
commit6ecdeb8fb5c38a9c1b60eba98b7f8f23c5fe394d (patch)
tree245a716a55111c79e7d2a80cefee0dee7eb26ba7 /VNFs
parentad584f4d9da98fa5fbdc19a69b63b323e27458dc (diff)
Fix Idle count
Change-Id: Idd72b593504139ac9d42c33767f8a18395b2cc87 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs')
-rw-r--r--VNFs/DPPD-PROX/rx_pkt.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/VNFs/DPPD-PROX/rx_pkt.c b/VNFs/DPPD-PROX/rx_pkt.c
index 17e39646..1fd5ca85 100644
--- a/VNFs/DPPD-PROX/rx_pkt.c
+++ b/VNFs/DPPD-PROX/rx_pkt.c
@@ -260,8 +260,10 @@ static inline uint16_t rx_pkt_hw1_param(struct task_base *tbase, struct rte_mbuf
}
}
- if (nb_rx == 0)
+ if (unlikely(nb_rx == 0)) {
+ TASK_STATS_ADD_IDLE(&tbase->aux->stats, rte_rdtsc() - cur_tsc);
return 0;
+ }
if (l3_ndp == PROX_L3)
skip = handle_l3(tbase, nb_rx, mbufs_ptr);
@@ -270,12 +272,9 @@ static inline uint16_t rx_pkt_hw1_param(struct task_base *tbase, struct rte_mbuf
if (skip)
TASK_STATS_ADD_RX_NON_DP(&tbase->aux->stats, skip);
- if (likely(nb_rx > 0)) {
- TASK_STATS_ADD_RX(&tbase->aux->stats, nb_rx);
- return nb_rx - skip;
- }
- TASK_STATS_ADD_IDLE(&tbase->aux->stats, rte_rdtsc() - cur_tsc);
- return 0;
+
+ TASK_STATS_ADD_RX(&tbase->aux->stats, nb_rx);
+ return nb_rx - skip;
}
uint16_t rx_pkt_hw(struct task_base *tbase, struct rte_mbuf ***mbufs)
n193' href='#n193'>193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290