perf: Optimize IPID (Avoid the futex of rand() while ensuring that IPID increases monotonically)
This commit is contained in:
@@ -105,7 +105,7 @@ struct udp_hdr
|
||||
} __attribute__((__packed__));
|
||||
|
||||
void build_udp_header(const char *l3_hdr, int l3_hdr_len, struct udp_hdr *udp_hdr, uint16_t udp_sport, uint16_t udp_dport, int payload_len);
|
||||
void build_ip_header(struct ip *ip_hdr, uint8_t next_protocol, const char *src_addr, const char *dst_addr, uint16_t payload_len);
|
||||
void build_ip_header(struct ip *ip_hdr, uint8_t next_protocol, uint16_t ipid, const char *src_addr, const char *dst_addr, uint16_t payload_len);
|
||||
void build_ether_header(struct ethhdr *eth_hdr, uint16_t next_protocol, const char *src_mac, const char *dst_mac);
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user