mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
Optimized the function of fill_connection_key.
Remove some unnecessary code to improve the performance of the filter-rewriter module. Signed-off-by: Lei Rao <lei.rao@intel.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@trasno.org>
This commit is contained in:
@ -279,15 +279,7 @@ static ssize_t colo_rewriter_receive_iov(NetFilterState *nf,
|
||||
*/
|
||||
if (pkt && is_tcp_packet(pkt)) {
|
||||
|
||||
fill_connection_key(pkt, &key);
|
||||
|
||||
if (sender == nf->netdev) {
|
||||
/*
|
||||
* We need make tcp TX and RX packet
|
||||
* into one connection.
|
||||
*/
|
||||
reverse_connection_key(&key);
|
||||
}
|
||||
fill_connection_key(pkt, &key, sender == nf->netdev);
|
||||
|
||||
/* After failover we needn't change new TCP packet */
|
||||
if (s->failover_mode &&
|
||||
|
Reference in New Issue
Block a user