From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id 3619EB379 for ; Fri, 29 Aug 2014 17:32:40 +0200 (CEST) Received: by mail-wi0-f172.google.com with SMTP id n3so9322429wiv.11 for ; Fri, 29 Aug 2014 08:36:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=ojSqEAoZNLImEY/jyh/cWBLPSgLDbR+FETzGUtMTR60=; b=VLNSfA2iKOh9KlZyEgRKQn4bW3QpLMTFwesxK4j6M8MXx6vkha66f1g77zfucAgTNx NzvwnL7G6Xr9dRiYUXrZV+zA9P/teukfQslD95QvS9e+orCD6q6YYjNuZa+qH+hchXi2 vBJ+I0gyzCUMrT2NiILeS+41d7mbDWd9RsMe3XNSlnfD97BIq0tZEwTfSHnQyb/vc3mP /5I8KjMBJQngOAQkeKjqLBFqeaWVnDPeduan+v7yaq/yCJD/bEOcgoUPIhUWAGr1N0f+ njyQrZxpRFjJtPuSNIFvvch5IFxSObndOVxXKhjg7PGVFdnW6F2+cW9783FAfrN8zDdp 75Rg== X-Gm-Message-State: ALoCoQm7M5izjRr0LsNefgP3Mk3arrp//Gz66hRgw8vaXBuZbVXunD4X9TfdVbvPNmR2apVdG/MI X-Received: by 10.180.211.207 with SMTP id ne15mr4698601wic.29.1409326614237; Fri, 29 Aug 2014 08:36:54 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id cj7sm704784wjc.37.2014.08.29.08.36.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Aug 2014 08:36:53 -0700 (PDT) From: Thomas Monjalon To: Declan Doherty Date: Fri, 29 Aug 2014 17:36:48 +0200 Message-ID: <1910212.FXdz9376n2@xps13> Organization: 6WIND User-Agent: KMail/4.13.3 (Linux/3.15.8-1-ARCH; KDE/4.13.3; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 4/6] bond: free mbufs if transmission fails in bonding tx_burst functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2014 15:32:40 -0000 Hi Declan, Your patchset is pending for an answer to this comment. 2014-08-20 15:54, Sanford, Robert: > I have a problem with the TX-burst logic of this patch. I believe that for > packets that we *don't* enqueue to the device, we should *NOT* free them. > The API expects that the caller will free them or try again to send them. > > Here is one way to accomplish selective freeing: Move mbuf pointers of > packets successfully enqueued, to the beginning of the caller's mbuf > vector; move mbuf pointers of packets not enqueued, to the end of the > caller's mbuf list. Although possibly re-ordered, the caller will be able > to free/resend all (and only) mbufs that we failed to enqueue.