From patchwork Mon Jun 4 14:43:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 925044 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="L1siyX5E"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40zyNn2KwWz9s08 for ; Tue, 5 Jun 2018 00:43:37 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753526AbeFDOne (ORCPT ); Mon, 4 Jun 2018 10:43:34 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:44100 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753443AbeFDOnd (ORCPT ); Mon, 4 Jun 2018 10:43:33 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w54Eeed7141926; Mon, 4 Jun 2018 14:43:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=aT9zaF7Yy6oyda9rtJep5WFMJm32F7gI3AXRJAp8y9g=; b=L1siyX5EORqeTWw4zb+olbJQLPxw8I9/6h0ENyBX1fuSwLMB0HFQ++8zMFdia1BVeXnb fKvdKfzHk4vEmmKBhS5L0vwlaGfgoXKQjAi2sIWENHRj5dmr8FZ6N6ywXThsHwafO48d Ygw58VmVC9mO/DcreO+yG7dnV6AUOnQ7b0FYGP9y6TS2ca00MnxfpTkPr59RPCa3UGas pmgtErbref0SGvZRtlkL0Rh2aKLBs1JG1QAEISPSvvA2kiHW4FtEqnJqCsqv9HG1Pp5p 2o7vGaLqlN2EMzzMbvXjdkEy8pN6kyWVa9+OTVePFWK+qWEmSJUnpjEsklioxV3bkT7v Fw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2jbvypbvkj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Jun 2018 14:43:30 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w54EhT0f001937 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Jun 2018 14:43:30 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w54EhTvA022118; Mon, 4 Jun 2018 14:43:29 GMT Received: from kili.mountain (/41.202.241.46) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 Jun 2018 07:43:28 -0700 Date: Mon, 4 Jun 2018 17:43:21 +0300 From: Dan Carpenter To: "David S. Miller" , Sridhar Samudrala Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 1/2 v2 net-next] net_failover: Use netdev_features_t instead of u32 Message-ID: <20180604144321.kjemxdfhi4qqb5ji@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180604.093147.1707102168081704551.davem@davemloft.net> X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8914 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=855 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806040173 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The features mask needs to be a netdev_features_t (u64) because a u32 is not big enough. Fixes: cfc80d9a1163 ("net: Introduce net_failover driver") Signed-off-by: Dan Carpenter --- v2: In the original patch, I thought that the & should be | and I introduced a bug. diff --git a/drivers/net/net_failover.c b/drivers/net/net_failover.c index 8b508e2cf29b..83f7420ddea5 100644 --- a/drivers/net/net_failover.c +++ b/drivers/net/net_failover.c @@ -380,7 +380,8 @@ static rx_handler_result_t net_failover_handle_frame(struct sk_buff **pskb) static void net_failover_compute_features(struct net_device *dev) { - u32 vlan_features = FAILOVER_VLAN_FEATURES & NETIF_F_ALL_FOR_ALL; + netdev_features_t vlan_features = FAILOVER_VLAN_FEATURES & + NETIF_F_ALL_FOR_ALL; netdev_features_t enc_features = FAILOVER_ENC_FEATURES; unsigned short max_hard_header_len = ETH_HLEN; unsigned int dst_release_flag = IFF_XMIT_DST_RELEASE |