aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex/benet/be.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-02 23:53:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-02 23:53:45 -0400
commitcd6362befe4cc7bf589a5236d2a780af2d47bcc9 (patch)
tree3bd4e13ec3f92a00dc4f6c3d65e820b54dbfe46e /drivers/net/ethernet/emulex/benet/be.h
parent0f1b1e6d73cb989ce2c071edc57deade3b084dfe (diff)
parentb1586f099ba897542ece36e8a23c1a62907261ef (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: "Here is my initial pull request for the networking subsystem during this merge window: 1) Support for ESN in AH (RFC 4302) from Fan Du. 2) Add full kernel doc for ethtool command structures, from Ben Hutchings. 3) Add BCM7xxx PHY driver, from Florian Fainelli. 4) Export computed TCP rate information in netlink socket dumps, from Eric Dumazet. 5) Allow IPSEC SA to be dumped partially using a filter, from Nicolas Dichtel. 6) Convert many drivers to pci_enable_msix_range(), from Alexander Gordeev. 7) Record SKB timestamps more efficiently, from Eric Dumazet. 8) Switch to microsecond resolution for TCP round trip times, also from Eric Dumazet. 9) Clean up and fix 6lowpan fragmentation handling by making use of the existing inet_frag api for it's implementation. 10) Add TX grant mapping to xen-netback driver, from Zoltan Kiss. 11) Auto size SKB lengths when composing netlink messages based upon past message sizes used, from Eric Dumazet. 12) qdisc dumps can take a long time, add a cond_resched(), From Eric Dumazet. 13) Sanitize netpoll core and drivers wrt. SKB handling semantics. Get rid of never-used-in-tree netpoll RX handling. From Eric W Biederman. 14) Support inter-address-family and namespace changing in VTI tunnel driver(s). From Steffen Klassert. 15) Add Altera TSE driver, from Vince Bridgers. 16) Optimizing csum_replace2() so that it doesn't adjust the checksum by checksumming the entire header, from Eric Dumazet. 17) Expand BPF internal implementation for faster interpreting, more direct translations into JIT'd code, and much cleaner uses of BPF filtering in non-socket ocntexts. From Daniel Borkmann and Alexei Starovoitov" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1976 commits) netpoll: Use skb_irq_freeable to make zap_completion_queue safe. net: Add a test to see if a skb is freeable in irq context qlcnic: Fix build failure due to undefined reference to `vxlan_get_rx_port' net: ptp: move PTP classifier in its own file net: sxgbe: make "core_ops" static net: sxgbe: fix logical vs bitwise operation net: sxgbe: sxgbe_mdio_register() frees the bus Call efx_set_channels() before efx->type->dimension_resources() xen-netback: disable rogue vif in kthread context net/mlx4: Set proper build dependancy with vxlan be2net: fix build dependency on VxLAN mac802154: make csma/cca parameters per-wpan mac802154: allow only one WPAN to be up at any given time net: filter: minor: fix kdoc in __sk_run_filter netlink: don't compare the nul-termination in nla_strcmp can: c_can: Avoid led toggling for every packet. can: c_can: Simplify TX interrupt cleanup can: c_can: Store dlc private can: c_can: Reduce register access can: c_can: Make the code readable ...
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be.h')
-rw-r--r--drivers/net/ethernet/emulex/benet/be.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index 05529e273050..8ccaa2520dc3 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2005 - 2013 Emulex 2 * Copyright (C) 2005 - 2014 Emulex
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * This program is free software; you can redistribute it and/or 5 * This program is free software; you can redistribute it and/or
@@ -34,7 +34,7 @@
34#include "be_hw.h" 34#include "be_hw.h"
35#include "be_roce.h" 35#include "be_roce.h"
36 36
37#define DRV_VER "10.0.600.0u" 37#define DRV_VER "10.2u"
38#define DRV_NAME "be2net" 38#define DRV_NAME "be2net"
39#define BE_NAME "Emulex BladeEngine2" 39#define BE_NAME "Emulex BladeEngine2"
40#define BE3_NAME "Emulex BladeEngine3" 40#define BE3_NAME "Emulex BladeEngine3"
@@ -88,7 +88,6 @@ static inline char *nic_name(struct pci_dev *pdev)
88#define BE_MIN_MTU 256 88#define BE_MIN_MTU 256
89 89
90#define BE_NUM_VLANS_SUPPORTED 64 90#define BE_NUM_VLANS_SUPPORTED 64
91#define BE_UMC_NUM_VLANS_SUPPORTED 15
92#define BE_MAX_EQD 128u 91#define BE_MAX_EQD 128u
93#define BE_MAX_TX_FRAG_COUNT 30 92#define BE_MAX_TX_FRAG_COUNT 30
94 93
@@ -262,9 +261,10 @@ struct be_tx_obj {
262/* Struct to remember the pages posted for rx frags */ 261/* Struct to remember the pages posted for rx frags */
263struct be_rx_page_info { 262struct be_rx_page_info {
264 struct page *page; 263 struct page *page;
264 /* set to page-addr for last frag of the page & frag-addr otherwise */
265 DEFINE_DMA_UNMAP_ADDR(bus); 265 DEFINE_DMA_UNMAP_ADDR(bus);
266 u16 page_offset; 266 u16 page_offset;
267 bool last_page_user; 267 bool last_frag; /* last frag of the page */
268}; 268};
269 269
270struct be_rx_stats { 270struct be_rx_stats {
@@ -293,9 +293,10 @@ struct be_rx_compl_info {
293 u8 ip_csum; 293 u8 ip_csum;
294 u8 l4_csum; 294 u8 l4_csum;
295 u8 ipv6; 295 u8 ipv6;
296 u8 vtm; 296 u8 qnq;
297 u8 pkt_type; 297 u8 pkt_type;
298 u8 ip_frag; 298 u8 ip_frag;
299 u8 tunneled;
299}; 300};
300 301
301struct be_rx_obj { 302struct be_rx_obj {
@@ -359,6 +360,7 @@ struct be_vf_cfg {
359 int pmac_id; 360 int pmac_id;
360 u16 vlan_tag; 361 u16 vlan_tag;
361 u32 tx_rate; 362 u32 tx_rate;
363 u32 plink_tracking;
362}; 364};
363 365
364enum vf_state { 366enum vf_state {
@@ -370,10 +372,11 @@ enum vf_state {
370#define BE_FLAGS_WORKER_SCHEDULED (1 << 3) 372#define BE_FLAGS_WORKER_SCHEDULED (1 << 3)
371#define BE_FLAGS_VLAN_PROMISC (1 << 4) 373#define BE_FLAGS_VLAN_PROMISC (1 << 4)
372#define BE_FLAGS_NAPI_ENABLED (1 << 9) 374#define BE_FLAGS_NAPI_ENABLED (1 << 9)
373#define BE_UC_PMAC_COUNT 30
374#define BE_VF_UC_PMAC_COUNT 2
375#define BE_FLAGS_QNQ_ASYNC_EVT_RCVD (1 << 11) 375#define BE_FLAGS_QNQ_ASYNC_EVT_RCVD (1 << 11)
376#define BE_FLAGS_VXLAN_OFFLOADS (1 << 12)
376 377
378#define BE_UC_PMAC_COUNT 30
379#define BE_VF_UC_PMAC_COUNT 2
377/* Ethtool set_dump flags */ 380/* Ethtool set_dump flags */
378#define LANCER_INITIATE_FW_DUMP 0x1 381#define LANCER_INITIATE_FW_DUMP 0x1
379 382
@@ -467,6 +470,7 @@ struct be_adapter {
467 470
468 u32 port_num; 471 u32 port_num;
469 bool promiscuous; 472 bool promiscuous;
473 u8 mc_type;
470 u32 function_mode; 474 u32 function_mode;
471 u32 function_caps; 475 u32 function_caps;
472 u32 rx_fc; /* Rx flow control */ 476 u32 rx_fc; /* Rx flow control */
@@ -492,6 +496,7 @@ struct be_adapter {
492 u32 sli_family; 496 u32 sli_family;
493 u8 hba_port_num; 497 u8 hba_port_num;
494 u16 pvid; 498 u16 pvid;
499 __be16 vxlan_port;
495 struct phy_info phy; 500 struct phy_info phy;
496 u8 wol_cap; 501 u8 wol_cap;
497 bool wol_en; 502 bool wol_en;
@@ -536,6 +541,14 @@ static inline u16 be_max_qs(struct be_adapter *adapter)
536 return min_t(u16, num, num_online_cpus()); 541 return min_t(u16, num, num_online_cpus());
537} 542}
538 543
544/* Is BE in pvid_tagging mode */
545#define be_pvid_tagging_enabled(adapter) (adapter->pvid)
546
547/* Is BE in QNQ multi-channel mode */
548#define be_is_qnq_mode(adapter) (adapter->mc_type == FLEX10 || \
549 adapter->mc_type == vNIC1 || \
550 adapter->mc_type == UFP)
551
539#define lancer_chip(adapter) (adapter->pdev->device == OC_DEVICE_ID3 || \ 552#define lancer_chip(adapter) (adapter->pdev->device == OC_DEVICE_ID3 || \
540 adapter->pdev->device == OC_DEVICE_ID4) 553 adapter->pdev->device == OC_DEVICE_ID4)
541 554