Add heartbeat support (stop all cores in case of TCP socket issues)
[samplevnf.git] / VNFs / DPPD-PROX / rx_pkt.c
index f6adeb4..075069c 100644 (file)
@@ -145,7 +145,7 @@ static uint16_t rx_pkt_hw_param(struct task_base *tbase, struct rte_mbuf ***mbuf
        }
 
        if (skip)
-               TASK_STATS_ADD_DROP_HANDLED(&tbase->aux->stats, 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;
@@ -201,7 +201,7 @@ static inline uint16_t rx_pkt_hw1_param(struct task_base *tbase, struct rte_mbuf
        }
 
        if (skip)
-               TASK_STATS_ADD_DROP_HANDLED(&tbase->aux->stats, 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;
@@ -508,36 +508,3 @@ uint16_t rx_pkt_tsc(struct task_base *tbase, struct rte_mbuf ***mbufs)
 
        return ret;
 }
-
-uint16_t rx_pkt_all(struct task_base *tbase, struct rte_mbuf ***mbufs)
-{
-       uint16_t tot = 0;
-       uint16_t ret = 0;
-       struct rte_mbuf **new_mbufs;
-       struct rte_mbuf **dst = tbase->aux->all_mbufs;
-
-       /* In case we receive less than MAX_PKT_BURST packets in one
-          iteration, do no perform any copying of mbuf pointers. Use
-          the buffer itself instead. */
-       ret = call_prev_rx_pkt(tbase, &new_mbufs);
-       if (ret < MAX_PKT_BURST/2) {
-               *mbufs = new_mbufs;
-               return ret;
-       }
-
-       memcpy(dst + tot, new_mbufs, ret * sizeof(*dst));
-       tot += ret;
-       *mbufs = dst;
-
-       do {
-               ret = call_prev_rx_pkt(tbase, &new_mbufs);
-               memcpy(dst + tot, new_mbufs, ret * sizeof(*dst));
-               tot += ret;
-       } while (ret == MAX_PKT_BURST/2 && tot < MAX_RX_PKT_ALL - MAX_PKT_BURST);
-
-       if (tot >= MAX_RX_PKT_ALL - MAX_PKT_BURST) {
-               plog_err("Could not receive all packets - buffer full\n");
-       }
-
-       return tot;
-}