@@ -1525,13 +1525,15 @@ static int rv_handle_frame_pkt(struct st_rx_video_session_impl* s, struct rte_mb
1525
1525
/* find the target slot by tmstamp */
1526
1526
bool exist_ts = false;
1527
1527
struct st_rx_video_slot_impl * slot = rv_slot_by_tmstamp (s , tmstamp , NULL , & exist_ts );
1528
- if (!slot || !slot -> frame ) {
1529
- if (exist_ts ) {
1530
- s -> stat_pkts_redundant_dropped ++ ;
1531
- slot -> pkts_recv_per_port [s_port ]++ ;
1532
- } else {
1533
- s -> stat_pkts_no_slot ++ ;
1534
- }
1528
+ /* Based on rv_slot_by_tmstamp - exist_ts is only true when slot is found */
1529
+ if (exist_ts && !slot -> frame ) {
1530
+ s -> stat_pkts_redundant_dropped ++ ;
1531
+ slot -> pkts_recv_per_port [s_port ]++ ;
1532
+ return 0 ;
1533
+ }
1534
+
1535
+ if ((!slot || !slot -> frame ) && !exist_ts ) {
1536
+ s -> stat_pkts_no_slot ++ ;
1535
1537
return - EIO ;
1536
1538
}
1537
1539
@@ -1941,13 +1943,15 @@ static int rv_handle_st22_pkt(struct st_rx_video_session_impl* s, struct rte_mbu
1941
1943
/* find the target slot by tmstamp */
1942
1944
bool exist_ts = false;
1943
1945
struct st_rx_video_slot_impl * slot = rv_slot_by_tmstamp (s , tmstamp , NULL , & exist_ts );
1944
- if (!slot || !slot -> frame ) {
1945
- if (exist_ts ) {
1946
- s -> stat_pkts_redundant_dropped ++ ;
1947
- slot -> pkts_recv_per_port [s_port ]++ ;
1948
- } else {
1949
- s -> stat_pkts_no_slot ++ ;
1950
- }
1946
+ /* Based on rv_slot_by_tmstamp - exist_ts is only true when slot is found */
1947
+ if (exist_ts && !slot -> frame ) {
1948
+ s -> stat_pkts_redundant_dropped ++ ;
1949
+ slot -> pkts_recv_per_port [s_port ]++ ;
1950
+ return 0 ;
1951
+ }
1952
+
1953
+ if ((!slot || !slot -> frame ) && !exist_ts ) {
1954
+ s -> stat_pkts_no_slot ++ ;
1951
1955
return - EIO ;
1952
1956
}
1953
1957
uint8_t * bitmap = slot -> frame_bitmap ;
@@ -2111,13 +2115,15 @@ static int rv_handle_hdr_split_pkt(struct st_rx_video_session_impl* s,
2111
2115
/* find the target slot by tmstamp */
2112
2116
bool exist_ts = false;
2113
2117
struct st_rx_video_slot_impl * slot = rv_slot_by_tmstamp (s , tmstamp , payload , & exist_ts );
2114
- if (!slot || !slot -> frame ) {
2115
- if (exist_ts ) {
2116
- s -> stat_pkts_redundant_dropped ++ ;
2117
- slot -> pkts_recv_per_port [s_port ]++ ;
2118
- } else {
2119
- s -> stat_pkts_no_slot ++ ;
2120
- }
2118
+ /* Based on rv_slot_by_tmstamp - exist_ts is only true when slot is found */
2119
+ if (exist_ts && !slot -> frame ) {
2120
+ s -> stat_pkts_redundant_dropped ++ ;
2121
+ slot -> pkts_recv_per_port [s_port ]++ ;
2122
+ return 0 ;
2123
+ }
2124
+
2125
+ if ((!slot || !slot -> frame ) && !exist_ts ) {
2126
+ s -> stat_pkts_no_slot ++ ;
2121
2127
return - EIO ;
2122
2128
}
2123
2129
uint8_t * bitmap = slot -> frame_bitmap ;
0 commit comments