optimizate: clean up unused code && code formatting

This commit is contained in:
luwenpeng
2024-08-14 10:50:33 +08:00
parent 927d0cd344
commit 6e1c25a445
20 changed files with 61 additions and 86 deletions

View File

@@ -327,8 +327,8 @@ int dumpfile_io_ingress(struct dumpfile_io *handle, uint16_t thr_idx, struct pac
stat->raw_rx_bytes += pcap_pkt->len;
pkt = &pkts[nr_parsed];
memset(pkt, 0, sizeof(struct packet));
packet_parse(pkt, pcap_pkt->data, pcap_pkt->len);
memset(&pkt->meta, 0, sizeof(pkt->meta));
packet_set_origin_ctx(pkt, pcap_pkt);
packet_set_action(pkt, PACKET_ACTION_FORWARD);
nr_parsed++;
@@ -437,7 +437,7 @@ int dumpfile_io_inject(struct dumpfile_io *handle, uint16_t thr_idx, struct pack
return nr_pkts;
}
void dumpfile_io_yield(struct dumpfile_io *handle __attribute__((unused)), uint16_t thr_idx __attribute__((unused)), uint64_t timeout_ms __attribute__((unused)))
void dumpfile_io_yield(struct dumpfile_io *handle __attribute__((unused)), uint16_t thr_idx __attribute__((unused)), uint64_t timeout_ms __attribute__((unused)))
{
return;
}