From patchwork Wed Jun 15 16:42:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward Cree X-Patchwork-Id: 635969 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rVCF615sDz9t0t for ; Thu, 16 Jun 2016 02:50:34 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932485AbcFOQub (ORCPT ); Wed, 15 Jun 2016 12:50:31 -0400 Received: from nbfkord-smmo02.seg.att.com ([209.65.160.78]:27463 "EHLO nbfkord-smmo02.seg.att.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752153AbcFOQu2 (ORCPT ); Wed, 15 Jun 2016 12:50:28 -0400 Received: from unknown [193.34.186.16] (EHLO nbfkord-smmo02.seg.att.com) by nbfkord-smmo02.seg.att.com(mxl_mta-7.2.4-7) with ESMTP id 45781675.2acb1bc45940.382722.00-2460.979521.nbfkord-smmo02.seg.att.com (envelope-from ); Wed, 15 Jun 2016 16:50:28 +0000 (UTC) X-MXL-Hash: 5761875465779fb6-a10e2cacaa51f6c551e358b67ad42ff51c9d02f5 Received: from unknown [193.34.186.16] by nbfkord-smmo02.seg.att.com(mxl_mta-7.2.4-7) with SMTP id c4781675.0.382704.00-2377.979473.nbfkord-smmo02.seg.att.com (envelope-from ); Wed, 15 Jun 2016 16:50:21 +0000 (UTC) X-MXL-Hash: 5761874d09b0394a-7f0d5fae4be3bdec6fc8c7785c1edc58eb07200e Received: from ec-desktop.uk.solarflarecom.com (10.17.20.45) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 15 Jun 2016 17:42:30 +0100 From: Edward Cree Subject: [PATCH net-next 01/17] sfc: Define macro with EF10 offload feature To: , , References: <4daf4ef4-7a8b-4a16-c640-04275298abad@solarflare.com> Message-ID: Date: Wed, 15 Jun 2016 17:42:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <4daf4ef4-7a8b-4a16-c640-04275298abad@solarflare.com> X-Originating-IP: [10.17.20.45] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.000.1202-22392.003 X-TM-AS-Result: No--1.792600-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-AnalysisOut: [v=2.1 cv=fpPaEQMf c=1 sm=1 tr=0 a=8P+NB+fYZDP74ap4g4d9Kw==] X-AnalysisOut: [:17 a=fVG4DLb5TBsA:10 a=IkcTkHD0fZMA:10 a=pD_ry4oyNxEA:10 ] X-AnalysisOut: [a=pK7X0mNQAAAA:8 a=zRKbQ67AAAAA:8 a=hxXgcgE7zre4bYR2Oz4A:9] X-AnalysisOut: [ a=QEXdDO2ut3YA:10 a=5HA-qpC1VU4iIGLgRoNS:22 a=PA03WX8tBze] X-AnalysisOut: [izutn5_OT:22] X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [193.34.186.16] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Andrew Rybchenko It is useful to simplify features addition. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index 1f30912..89c88ca 100644 --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c @@ -4703,6 +4703,12 @@ static int efx_ef10_ptp_set_ts_config(struct efx_nic *efx, } } +#define EF10_OFFLOAD_FEATURES \ + (NETIF_F_IP_CSUM | \ + NETIF_F_IPV6_CSUM | \ + NETIF_F_RXHASH | \ + NETIF_F_NTUPLE) + const struct efx_nic_type efx_hunt_a0_vf_nic_type = { .is_vf = true, .mem_bar = EFX_MEM_VF_BAR, @@ -4798,8 +4804,7 @@ const struct efx_nic_type efx_hunt_a0_vf_nic_type = { .always_rx_scatter = true, .max_interrupt_mode = EFX_INT_MODE_MSIX, .timer_period_max = 1 << ERF_DD_EVQ_IND_TIMER_VAL_WIDTH, - .offload_features = (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | - NETIF_F_RXHASH | NETIF_F_NTUPLE), + .offload_features = EF10_OFFLOAD_FEATURES, .mcdi_max_ver = 2, .max_rx_ip_filters = HUNT_FILTER_TBL_ROWS, .hwtstamp_filters = 1 << HWTSTAMP_FILTER_NONE | @@ -4919,8 +4924,7 @@ const struct efx_nic_type efx_hunt_a0_nic_type = { .always_rx_scatter = true, .max_interrupt_mode = EFX_INT_MODE_MSIX, .timer_period_max = 1 << ERF_DD_EVQ_IND_TIMER_VAL_WIDTH, - .offload_features = (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | - NETIF_F_RXHASH | NETIF_F_NTUPLE), + .offload_features = EF10_OFFLOAD_FEATURES, .mcdi_max_ver = 2, .max_rx_ip_filters = HUNT_FILTER_TBL_ROWS, .hwtstamp_filters = 1 << HWTSTAMP_FILTER_NONE |