From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Hartkopp Subject: Re: Bus off Date: Fri, 27 Jun 2014 19:34:39 +0200 Message-ID: <53ADAB2F.5030902@hartkopp.net> References: <20140627050512.GA1291@vandijck-laurijssen.be> <53AD8F4B.7090900@grandegger.com> <53AD9BA1.1030801@grandegger.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.217]:48098 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbaF0Req (ORCPT ); Fri, 27 Jun 2014 13:34:46 -0400 In-Reply-To: <53AD9BA1.1030801@grandegger.com> Sender: linux-can-owner@vger.kernel.org List-ID: To: Wolfgang Grandegger , Jason R1 White Cc: linux-can@vger.kernel.org, linux-can-owner@vger.kernel.org On 27.06.2014 18:28, Wolfgang Grandegger wrote: > On 06/27/2014 05:45 PM, Jason R1 White wrote: >> So is it still the recommendation to close the interface to flush the >> queues? > > As I said: the purpose of "restart" is not to do a fast if down->up. > >> Is there anything planned for an ip command or IOCTL to do this? > > It's on the wish list, let's say. Somebody needs to implement it. It's > also not straight-forward because there might be more than one socket > sending out CAN messages. For standard network devices there is no way > to flush all TX queues, IIRC. Probably shutting down the netdevice at BUS_OFF would be an alternative to restart-ms. When the netdevice is down all sockets are notified by -ENETDOWN. We would need some kind of notification when frames got lost anyway. And after -ENETDOWN the application can recover and set up it's communication again. Regards, Oliver