From patchwork Fri Mar 14 23:03:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Eric W. Biederman" X-Patchwork-Id: 330523 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 A13AC2C009C for ; Sat, 15 Mar 2014 10:03:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755165AbaCNXDQ (ORCPT ); Fri, 14 Mar 2014 19:03:16 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:32860 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752030AbaCNXDO (ORCPT ); Fri, 14 Mar 2014 19:03:14 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1WOb8D-0007Bb-GK; Fri, 14 Mar 2014 17:03:13 -0600 Received: from c-98-207-154-105.hsd1.ca.comcast.net ([98.207.154.105] helo=eric-ThinkPad-X220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1WOb8A-0002YR-K5; Fri, 14 Mar 2014 17:03:13 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: David Miller Cc: , Jesse Brandeburg , Catherine Sullivan , Kavindya Deegala , Jeff Kirsher Date: Fri, 14 Mar 2014 16:03:06 -0700 Message-ID: <87k3bw2xjp.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 X-XM-AID: U2FsdGVkX1+fnnGQEcyaMC6Qw6aWPeb6eHqWoYTFt9E= X-SA-Exim-Connect-IP: 98.207.154.105 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sa04.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.7 required=8.0 tests=ALL_TRUSTED,BAYES_40, DCC_CHECK_NEGATIVE, T_TM2_M_HEADER_IN_MSG, T_TooManySym_01, T_XMDrugObfuBody_08, XMSubLong autolearn=disabled version=3.3.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: T_TM2_M_HEADER_IN_MSG * -0.0 BAYES_40 BODY: Bayes spam probability is 20 to 40% * [score: 0.3140] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa04 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject * 1.0 T_XMDrugObfuBody_08 obfuscated drug references X-Spam-DCC: XMission; sa04 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;David Miller X-Spam-Relay-Country: Subject: [PATCH net-next ] i40evf: Rename i40e_ptype_lookup i40evf_ptype_lookup X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 14 Nov 2012 13:58:17 -0700) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When compiling the i40e and the i40evf driver into the same kernel I get: LD drivers/net/ethernet/intel/built-in.o drivers/net/ethernet/intel/i40evf/built-in.o:(.data+0x300): multiple definition of `i40e_ptype_lookup' drivers/net/ethernet/intel/i40e/built-in.o:(.data+0x780): first defined here make[3]: *** [drivers/net/ethernet/intel/built-in.o] Error 1 make[2]: *** [drivers/net/ethernet/intel] Error 2 make[1]: *** [drivers/net/ethernet/] Error 2 make: *** [sub-make] Error 2 Fix this by renaming the i40evf version of this structure from i40e_ptype_lookup to i40evf_ptype_lookup. This build failure was introduced in: commit 206812b5fccb808d1194344eaa942f68f59b2630 Author: Jesse Brandeburg Date: Wed Feb 12 01:45:33 2014 +0000 i40e/i40evf: i40e implementation for skb_set_hash Original comment from Tom Herbert Drivers should call skb_set_hash to set the hash and its type in an skbuff. This patch builds upon Tom's original implementation and adds the L4 type return when we know it is an L4 hash. This requires use of the ptype decoder ring, so enable it. Change-ID: I2f9fa86d1a6add58cff13386f7f4238b1abcc468 CC: Tom Herbert Signed-off-by: Jesse Brandeburg Acked-by: Shannon Nelson Acked-by: Mitch Williams Signed-off-by: Catherine Sullivan Tested-by: Kavindya Deegala Signed-off-by: Jeff Kirsher Cc: Jesse Brandeburg Cc: Catherine Sullivan Cc: Kavindya Deegala Cc: Jeff Kirsher Signed-off-by: "Eric W. Biederman" --- drivers/net/ethernet/intel/i40evf/i40e_common.c | 8 ++++---- drivers/net/ethernet/intel/i40evf/i40e_prototype.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c index 78618af271cf..c688a0fc5c29 100644 --- a/drivers/net/ethernet/intel/i40evf/i40e_common.c +++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c @@ -160,7 +160,7 @@ i40e_status i40evf_aq_queue_shutdown(struct i40e_hw *hw, } -/* The i40e_ptype_lookup table is used to convert from the 8-bit ptype in the +/* The i40evf_ptype_lookup table is used to convert from the 8-bit ptype in the * hardware to a bit-field that can be used by SW to more easily determine the * packet type. * @@ -173,10 +173,10 @@ i40e_status i40evf_aq_queue_shutdown(struct i40e_hw *hw, * * Typical work flow: * - * IF NOT i40e_ptype_lookup[ptype].known + * IF NOT i40evf_ptype_lookup[ptype].known * THEN * Packet is unknown - * ELSE IF i40e_ptype_lookup[ptype].outer_ip == I40E_RX_PTYPE_OUTER_IP + * ELSE IF i40evf_ptype_lookup[ptype].outer_ip == I40E_RX_PTYPE_OUTER_IP * Use the rest of the fields to look at the tunnels, inner protocols, etc * ELSE * Use the enum i40e_rx_l2_ptype to decode the packet type @@ -205,7 +205,7 @@ i40e_status i40evf_aq_queue_shutdown(struct i40e_hw *hw, #define I40E_RX_PTYPE_INNER_PROT_TS I40E_RX_PTYPE_INNER_PROT_TIMESYNC /* Lookup table mapping the HW PTYPE to the bit field for decoding */ -struct i40e_rx_ptype_decoded i40e_ptype_lookup[] = { +struct i40e_rx_ptype_decoded i40evf_ptype_lookup[] = { /* L2 Packet types */ I40E_PTT_UNUSED_ENTRY(0), I40E_PTT(1, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY2), diff --git a/drivers/net/ethernet/intel/i40evf/i40e_prototype.h b/drivers/net/ethernet/intel/i40evf/i40e_prototype.h index 33c99051cc96..862fcdf52675 100644 --- a/drivers/net/ethernet/intel/i40evf/i40e_prototype.h +++ b/drivers/net/ethernet/intel/i40evf/i40e_prototype.h @@ -63,11 +63,11 @@ i40e_status i40evf_aq_queue_shutdown(struct i40e_hw *hw, i40e_status i40e_set_mac_type(struct i40e_hw *hw); -extern struct i40e_rx_ptype_decoded i40e_ptype_lookup[]; +extern struct i40e_rx_ptype_decoded i40evf_ptype_lookup[]; static inline struct i40e_rx_ptype_decoded decode_rx_desc_ptype(u8 ptype) { - return i40e_ptype_lookup[ptype]; + return i40evf_ptype_lookup[ptype]; } /* prototype for functions used for SW locks */