From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by dpdk.org (Postfix) with ESMTP id DB9156893 for ; Mon, 29 Sep 2014 15:14:54 +0200 (CEST) Received: by mail-wi0-f175.google.com with SMTP id d1so990101wiv.14 for ; Mon, 29 Sep 2014 06:21:31 -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=pTApUR660Bn3mn4xCmsOf2Jy6hy9Zy8GkFk9Llf8SRg=; b=FwQMlmPDDOXJjXslmEqQYcz1a9Rx970hi/EuRNQskPF8HJ9LLm1xLIOzeONf3kZOGk jYSx7sCzJfqtnZIuE5fXY9WX4Urc6Xt/NPWBwdIarRImhPY2uiGVnJeYDke12c/wkGgB tl1V+i+TnZAkljFl5I2O/ZdbAfsfdMfLAi7Q1a7aoqEdOA/T+9llOcJqhFtM2fI5du0B dvTEfhP8piPeRBbzfw0fR6NRmuhVM3u7WzUYuQRqVd3nj/NEThE5NoyrAKFOvNk+W2Wc JicVX4ug6+UL21swzFR0RTy36L2nevqJeMsrnwrumCtq4fjrhq9AGCSYfXei8UxqSPZD C6sg== X-Gm-Message-State: ALoCoQlYUASOKb7fyMozFbK5CI3OzCNwt2oa0GVOuGMXZqiDrAxBVhZrmIQA9Ap3Xs4u1CIoE7bX X-Received: by 10.194.60.114 with SMTP id g18mr32770888wjr.94.1411996890944; Mon, 29 Sep 2014 06:21:30 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id wm6sm3485399wjb.5.2014.09.29.06.21.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Sep 2014 06:21:29 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Mon, 29 Sep 2014 15:21:18 +0200 Message-ID: <1592464.PQabvuCgtP@xps13> Organization: 6WIND User-Agent: KMail/4.13.3 (Linux/3.15.8-1-ARCH; KDE/4.13.3; x86_64; ; ) In-Reply-To: <1410380225-13751-1-git-send-email-nico@emutex.com> References: <1410380225-13751-1-git-send-email-nico@emutex.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Cc: =?ISO-8859-1?Q?Nicol=E1s?= Pernas Maradei Subject: Re: [dpdk-dev] [PATCH] Fix librte_pmd_pcap driver double stop error 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: Mon, 29 Sep 2014 13:14:55 -0000 2014-09-10 17:17, Nicol=C3=A1s Pernas Maradei: > From: Nicola=CC=81s Pernas Maradei >=20 > librte_pmd_pcap driver was opening the pcap/interfaces only at init t= ime and > closing them only when the port was being stopped. This behaviour wou= ld cause > problems (leading to segfault) if the user closed the port 2 times. T= he first > time the pcap/interfaces would be normally closed but libpcap would t= hrow an > error causing a segfault if the closed pcaps/interfaces were closed a= gain. > This behaviour is solved by re-openning pcaps/interfaces when the por= t is > started (only if these weren't open already for example at init time)= . >=20 > Signed-off-by: Nicola=CC=81s Pernas Maradei > --- > lib/librte_pmd_pcap/rte_eth_pcap.c | 254 +++++++++++++++++++++++++++= ++-------- > 1 file changed, 202 insertions(+), 52 deletions(-) Someone to review this patch? --=20 Thomas