From patchwork Wed Jul 27 22:17:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rose, Gregory V" X-Patchwork-Id: 107154 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 D7F27B6F64 for ; Thu, 28 Jul 2011 08:18:24 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755494Ab1G0WSF (ORCPT ); Wed, 27 Jul 2011 18:18:05 -0400 Received: from mga11.intel.com ([192.55.52.93]:29027 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755304Ab1G0WSD (ORCPT ); Wed, 27 Jul 2011 18:18:03 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 27 Jul 2011 15:18:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.67,278,1309762800"; d="scan'208";a="35266833" Received: from gitlad.jf.intel.com ([10.23.23.37]) by fmsmga001.fm.intel.com with ESMTP; 27 Jul 2011 15:18:03 -0700 Received: from gitlad.jf.intel.com (gitlad.jf.intel.com [127.0.0.1]) by gitlad.jf.intel.com (8.14.2/8.14.2) with ESMTP id p6RMHx4w008520; Wed, 27 Jul 2011 15:17:59 -0700 From: Greg Rose Subject: [RFC net-next PATCH 3/4] ethtool: Add new set commands To: netdev@vger.kernel.org Cc: davem@davemloft.net, bhutchings@solarflare.com, jeffrey.t.kirsher@intel.com Date: Wed, 27 Jul 2011 15:17:59 -0700 Message-ID: <20110727221759.8435.11589.stgit@gitlad.jf.intel.com> In-Reply-To: <20110727221406.8435.44324.stgit@gitlad.jf.intel.com> References: <20110727221406.8435.44324.stgit@gitlad.jf.intel.com> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add new set commands to configure the number of SR-IOV VFs, the number of VM queues and spoof checking on/off switch. Signed-off-by: Greg Rose --- include/linux/ethtool.h | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index c6e427a..c4972ba 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -36,12 +36,14 @@ struct ethtool_cmd { __u8 mdio_support; __u32 maxtxpkt; /* Tx pkts before generating tx int */ __u32 maxrxpkt; /* Rx pkts before generating rx int */ + __u32 num_vfs; /* Enable SR-IOV VFs */ + __u32 num_vmqs; /* Set number of queues for VMDq */ __u16 speed_hi; /* The forced speed (upper * bits) in Mbps. Please use * ethtool_cmd_speed()/_set() to * access it */ __u8 eth_tp_mdix; - __u8 reserved2; + __u8 spoof_check; /* Enable/Disable anti-spoofing */ __u32 lp_advertising; /* Features the link partner advertises */ __u32 reserved[2]; }; @@ -1121,6 +1123,13 @@ struct ethtool_ops { #define AUTONEG_DISABLE 0x00 #define AUTONEG_ENABLE 0x01 +/* Enable or disable MAC and/or VLAN spoofchecking.If this is + * set to enable, then depending on the controller capabilities + * MAC and/or VLAN spoofing will be turned on. + */ +#define SPOOFCHECK_DISABLE 0x00 +#define SPOOFCHECK_ENABLE 0x01 + /* Mode MDI or MDI-X */ #define ETH_TP_MDI_INVALID 0x00 #define ETH_TP_MDI 0x01