[ovs-dev] [PATCH v12 0/1] Balance-tcp bond mode optimization
Matteo Croce
mcroce at redhat.com
Tue Mar 31 10:28:00 UTC 2020
On Wed, Mar 11, 2020 at 3:26 PM Vishal Deep Ajmera
<vishal.deep.ajmera at ericsson.com> wrote:
>
> v11->v12:
> Addressed most of comments from Ilya and Eelco.
> https://mail.openvswitch.org/pipermail/ovs-dev/2020-February/367832.html
> https://mail.openvswitch.org/pipermail/ovs-dev/2020-February/367842.html
> Rebased to OVS master.
>
Hi Vishal,
I tested your patch, but it seems there is a memory leak which depletes
all the buffers in a very short time.
I've found that reverting a chunk fixed it, this is the change I made:
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -7354,15 +7354,17 @@ dp_execute_lb_output_action(struct dp_netdev_pmd_thread *pmd,
struct dp_packet_batch *packets_,
bool should_steal, uint32_t bond)
{
- struct dp_packet *packet;
- uint32_t i;
- const uint32_t cnt = dp_packet_batch_size(packets_);
struct tx_bond *p_bond = tx_bond_lookup(&pmd->tx_bonds, bond);
if (!p_bond) {
return false;
}
- DP_PACKET_BATCH_REFILL_FOR_EACH (i, cnt, packet, packets_) {
+
+ struct dp_packet_batch del_pkts;
+ dp_packet_batch_init(&del_pkts);
+
+ struct dp_packet *packet;
+ DP_PACKET_BATCH_FOR_EACH (i, packet, packets_) {
/*
* Lookup the bond-hash table using hash to get the slave.
*/
@@ -7379,11 +7381,16 @@ dp_execute_lb_output_action(struct dp_netdev_pmd_thread *pmd,
non_atomic_ullong_add(&s_entry->n_packets, 1);
non_atomic_ullong_add(&s_entry->n_bytes, size);
} else {
- dp_packet_batch_refill(packets_, packet, i);
+ dp_packet_batch_add(&del_pkts, packet);
}
}
- return dp_packet_batch_is_empty(packets_);
+ /* Delete packets that failed OUTPUT action */
+ COVERAGE_ADD(datapath_drop_invalid_port,
+ dp_packet_batch_size(&del_pkts));
+ dp_packet_delete_batch(&del_pkts, should_steal);
+
+ return true;
}
static void
Regards,
--
Matteo Croce
per aspera ad upstream
More information about the dev
mailing list