From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] Fix librte_pmd_pcap driver double stop error Date: Mon, 29 Sep 2014 15:21:18 +0200 Message-ID: <1592464.PQabvuCgtP@xps13> References: <1410380225-13751-1-git-send-email-nico@emutex.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: =?ISO-8859-1?Q?Nicol=E1s?= Pernas Maradei To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1410380225-13751-1-git-send-email-nico-M3NBUjLqch7QT0dZR+AlfA@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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