From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH net-next 1/2] xen-netback: Using a new state bit instead of carrier Date: Tue, 5 Aug 2014 13:45:45 +0100 Message-ID: <20140805124545.GD11230__34350.3239834265$1407242856$gmane$org@zion.uk.xensource.com> References: <1407165658-20146-1-git-send-email-zoltan.kiss@citrix.com> <1407165658-20146-2-git-send-email-zoltan.kiss@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XEe7h-0000nI-Ev for xen-devel@lists.xenproject.org; Tue, 05 Aug 2014 12:45:49 +0000 Content-Disposition: inline In-Reply-To: <1407165658-20146-2-git-send-email-zoltan.kiss@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Zoltan Kiss Cc: Wei Liu , Ian Campbell , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Vrabel , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Mon, Aug 04, 2014 at 04:20:57PM +0100, Zoltan Kiss wrote: > This patch introduces a new state bit VIF_STATUS_CONNECTED to track whether the > vif is in a connected state. Using carrier will not work with the next patch > in this series, which aims to turn the carrier temporarily off if the guest > doesn't seem to be able to receive packets. > > Signed-off-by: Zoltan Kiss > Signed-off-by: David Vrabel > Cc: netdev@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: xen-devel@lists.xenproject.org > > v2: > - rename the bitshift type to "enum state_bit_shift" here, not in the next patch > > diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h > index 28c9822..4a92fc1 100644 > --- a/drivers/net/xen-netback/common.h > +++ b/drivers/net/xen-netback/common.h > @@ -198,6 +198,11 @@ struct xenvif_queue { /* Per-queue data for xenvif */ > struct xenvif_stats stats; > }; > > +enum state_bit_shift { > + /* This bit marks that the vif is connected */ > + VIF_STATUS_CONNECTED This bit shift applies to vif. In the following patch you introduce two more bits specifically for queues. IMHO we should avoid mixing things up. What about having two enums enum vif_state_bit_shift {} enum queue_state_bit_shift {} ? Wei.