From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpout102.netcore.co.in (nm237203.nsmailserv.com [202.162.237.203]) by dpdk.org (Postfix) with ESMTP id C14652BC3; Fri, 23 Jun 2017 13:20:50 +0200 (CEST) From: Karthikraj palanichamy To: dev@dpdk.org, users@dpdk.org Cc: "gokilavani.anbazhagan@veryxtech.com" , "sumithra.subramanian@veryxtech.com" , "Binu Nadarajan (Veryx Technologies)" , Nagaraj , Arunsiva , "'Selvaraj (Veryx Technologies)'" Message-ID: <594CF98C.5080703@veryxtech.com> Date: Fri, 23 Jun 2017 16:50:44 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 X-SMTP30-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 54D71C004D.A47ED X-SMTP30-MailScanner: Found to be clean X-MailScanner-From: karthikraj.palanichamy@veryxtech.com X-Spam-Status: No X-Cloudmilter-Processed: 1 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Drop pkts whenever port link status changes X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 11:20:51 -0000 Hi! I am using DPDK to develop a delay measurement application. I put a timestamp in the packet and call rte_eth_tx_burst(). The receiving end would just loopback the packet. Using the timestamp that I had put, and the current time, I am able to calculate the delay in the network. But when the link goes down and up, I am observing huge delay. This is because the packets which are placed in the ring just before the link got down, are transmitted once the link is up. E.g. If it took 500ms between link down and up, I will get (current time - timestamp) as 500ms. Do you have a solution to solve this? Is there any way we can instruct to drop the packets when link is down (or) cleanup the queue and start fresh when the link is up? Note : I have registered a link status callback function. (rte_eth_dev_callback_register(portid, RTE_ETH_EVENT_INTR_LSC, linkStatusCheck, NULL)). So I can know the link status as earlier as possible and prevent doing rte_eth_tx_burst() if link is down. But still in case of race scenarios, pkts placed in the ring before the link got down may get transmitted after the link gets up. Thanks, Karthik DISCLAIMER: Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event,you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company.