Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
85a43a9e
Commit
85a43a9e
authored
Jun 27, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6
parents
23efcb73
42532da6
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
298 additions
and
345 deletions
+298
-345
drivers/net/ixgbe/ixgbe.h
drivers/net/ixgbe/ixgbe.h
+16
-5
drivers/net/ixgbe/ixgbe_dcb_nl.c
drivers/net/ixgbe/ixgbe_dcb_nl.c
+61
-13
drivers/net/ixgbe/ixgbe_fcoe.c
drivers/net/ixgbe/ixgbe_fcoe.c
+31
-108
drivers/net/ixgbe/ixgbe_fcoe.h
drivers/net/ixgbe/ixgbe_fcoe.h
+0
-1
drivers/net/ixgbe/ixgbe_main.c
drivers/net/ixgbe/ixgbe_main.c
+173
-217
drivers/net/ixgbe/ixgbe_sriov.c
drivers/net/ixgbe/ixgbe_sriov.c
+16
-0
drivers/net/ixgbe/ixgbe_type.h
drivers/net/ixgbe/ixgbe_type.h
+1
-1
No files found.
drivers/net/ixgbe/ixgbe.h
View file @
85a43a9e
...
@@ -131,6 +131,13 @@ struct vf_macvlans {
...
@@ -131,6 +131,13 @@ struct vf_macvlans {
u8
vf_macvlan
[
ETH_ALEN
];
u8
vf_macvlan
[
ETH_ALEN
];
};
};
#define IXGBE_MAX_TXD_PWR 14
#define IXGBE_MAX_DATA_PER_TXD (1 << IXGBE_MAX_TXD_PWR)
/* Tx Descriptors needed, worst case */
#define TXD_USE_COUNT(S) DIV_ROUND_UP((S), IXGBE_MAX_DATA_PER_TXD)
#define DESC_NEEDED ((MAX_SKB_FRAGS * TXD_USE_COUNT(PAGE_SIZE)) + 4)
/* wrapper around a pointer to a socket buffer,
/* wrapper around a pointer to a socket buffer,
* so a DMA handle can be stored along with the buffer */
* so a DMA handle can be stored along with the buffer */
struct
ixgbe_tx_buffer
{
struct
ixgbe_tx_buffer
{
...
@@ -306,9 +313,13 @@ struct ixgbe_q_vector {
...
@@ -306,9 +313,13 @@ struct ixgbe_q_vector {
((_eitr) ? (1000000000 / ((_eitr) * 256)) : 8)
((_eitr) ? (1000000000 / ((_eitr) * 256)) : 8)
#define EITR_REG_TO_INTS_PER_SEC EITR_INTS_PER_SEC_TO_REG
#define EITR_REG_TO_INTS_PER_SEC EITR_INTS_PER_SEC_TO_REG
#define IXGBE_DESC_UNUSED(R) \
static
inline
u16
ixgbe_desc_unused
(
struct
ixgbe_ring
*
ring
)
((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \
{
(R)->next_to_clean - (R)->next_to_use - 1)
u16
ntc
=
ring
->
next_to_clean
;
u16
ntu
=
ring
->
next_to_use
;
return
((
ntc
>
ntu
)
?
0
:
ring
->
count
)
+
ntc
-
ntu
-
1
;
}
#define IXGBE_RX_DESC_ADV(R, i) \
#define IXGBE_RX_DESC_ADV(R, i) \
(&(((union ixgbe_adv_rx_desc *)((R)->desc))[i]))
(&(((union ixgbe_adv_rx_desc *)((R)->desc))[i]))
...
@@ -576,10 +587,10 @@ extern void ixgbe_clear_rscctl(struct ixgbe_adapter *adapter,
...
@@ -576,10 +587,10 @@ extern void ixgbe_clear_rscctl(struct ixgbe_adapter *adapter,
struct
ixgbe_ring
*
ring
);
struct
ixgbe_ring
*
ring
);
extern
void
ixgbe_set_rx_mode
(
struct
net_device
*
netdev
);
extern
void
ixgbe_set_rx_mode
(
struct
net_device
*
netdev
);
extern
int
ixgbe_setup_tc
(
struct
net_device
*
dev
,
u8
tc
);
extern
int
ixgbe_setup_tc
(
struct
net_device
*
dev
,
u8
tc
);
extern
void
ixgbe_tx_ctxtdesc
(
struct
ixgbe_ring
*
,
u32
,
u32
,
u32
,
u32
);
#ifdef IXGBE_FCOE
#ifdef IXGBE_FCOE
extern
void
ixgbe_configure_fcoe
(
struct
ixgbe_adapter
*
adapter
);
extern
void
ixgbe_configure_fcoe
(
struct
ixgbe_adapter
*
adapter
);
extern
int
ixgbe_fso
(
struct
ixgbe_adapter
*
adapter
,
extern
int
ixgbe_fso
(
struct
ixgbe_ring
*
tx_ring
,
struct
sk_buff
*
skb
,
struct
ixgbe_ring
*
tx_ring
,
struct
sk_buff
*
skb
,
u32
tx_flags
,
u8
*
hdr_len
);
u32
tx_flags
,
u8
*
hdr_len
);
extern
void
ixgbe_cleanup_fcoe
(
struct
ixgbe_adapter
*
adapter
);
extern
void
ixgbe_cleanup_fcoe
(
struct
ixgbe_adapter
*
adapter
);
extern
int
ixgbe_fcoe_ddp
(
struct
ixgbe_adapter
*
adapter
,
extern
int
ixgbe_fcoe_ddp
(
struct
ixgbe_adapter
*
adapter
,
...
...
drivers/net/ixgbe/ixgbe_dcb_nl.c
View file @
85a43a9e
...
@@ -330,24 +330,20 @@ static void ixgbe_dcbnl_get_pfc_cfg(struct net_device *netdev, int priority,
...
@@ -330,24 +330,20 @@ static void ixgbe_dcbnl_get_pfc_cfg(struct net_device *netdev, int priority,
static
u8
ixgbe_dcbnl_set_all
(
struct
net_device
*
netdev
)
static
u8
ixgbe_dcbnl_set_all
(
struct
net_device
*
netdev
)
{
{
struct
ixgbe_adapter
*
adapter
=
netdev_priv
(
netdev
);
struct
ixgbe_adapter
*
adapter
=
netdev_priv
(
netdev
);
int
ret
;
#ifdef IXGBE_FCOE
struct
dcb_app
app
=
{
struct
dcb_app
app
=
{
.
selector
=
DCB_APP_IDTYPE_ETHTYPE
,
.
selector
=
DCB_APP_IDTYPE_ETHTYPE
,
.
protocol
=
ETH_P_FCOE
,
.
protocol
=
ETH_P_FCOE
,
};
};
u8
up
=
dcb_getapp
(
netdev
,
&
app
);
u8
up
=
dcb_getapp
(
netdev
,
&
app
);
int
ret
;
#endif
ret
=
ixgbe_copy_dcb_cfg
(
&
adapter
->
temp_dcb_cfg
,
&
adapter
->
dcb_cfg
,
ret
=
ixgbe_copy_dcb_cfg
(
&
adapter
->
temp_dcb_cfg
,
&
adapter
->
dcb_cfg
,
MAX_TRAFFIC_CLASS
);
MAX_TRAFFIC_CLASS
);
if
(
ret
)
if
(
ret
)
return
DCB_NO_HW_CHG
;
return
DCB_NO_HW_CHG
;
/* In IEEE mode app data must be parsed into DCBX format for
* hardware routines.
*/
if
(
adapter
->
dcbx_cap
&
DCB_CAP_DCBX_VER_IEEE
)
up
=
(
1
<<
up
);
#ifdef IXGBE_FCOE
#ifdef IXGBE_FCOE
if
(
up
&&
(
up
!=
(
1
<<
adapter
->
fcoe
.
up
)))
if
(
up
&&
(
up
!=
(
1
<<
adapter
->
fcoe
.
up
)))
adapter
->
dcb_set_bitmap
|=
BIT_APP_UPCHG
;
adapter
->
dcb_set_bitmap
|=
BIT_APP_UPCHG
;
...
@@ -361,7 +357,7 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
...
@@ -361,7 +357,7 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
while
(
test_and_set_bit
(
__IXGBE_RESETTING
,
&
adapter
->
state
))
while
(
test_and_set_bit
(
__IXGBE_RESETTING
,
&
adapter
->
state
))
usleep_range
(
1000
,
2000
);
usleep_range
(
1000
,
2000
);
ixgbe_fcoe_setapp
(
adapter
,
up
)
;
adapter
->
fcoe
.
up
=
ffs
(
up
)
-
1
;
if
(
netif_running
(
netdev
))
if
(
netif_running
(
netdev
))
netdev
->
netdev_ops
->
ndo_stop
(
netdev
);
netdev
->
netdev_ops
->
ndo_stop
(
netdev
);
...
@@ -674,24 +670,75 @@ static int ixgbe_dcbnl_ieee_setpfc(struct net_device *dev,
...
@@ -674,24 +670,75 @@ static int ixgbe_dcbnl_ieee_setpfc(struct net_device *dev,
return
err
;
return
err
;
}
}
#ifdef IXGBE_FCOE
static
void
ixgbe_dcbnl_devreset
(
struct
net_device
*
dev
)
{
struct
ixgbe_adapter
*
adapter
=
netdev_priv
(
dev
);
if
(
netif_running
(
dev
))
dev
->
netdev_ops
->
ndo_stop
(
dev
);
ixgbe_clear_interrupt_scheme
(
adapter
);
ixgbe_init_interrupt_scheme
(
adapter
);
if
(
netif_running
(
dev
))
dev
->
netdev_ops
->
ndo_open
(
dev
);
}
#endif
static
int
ixgbe_dcbnl_ieee_setapp
(
struct
net_device
*
dev
,
static
int
ixgbe_dcbnl_ieee_setapp
(
struct
net_device
*
dev
,
struct
dcb_app
*
app
)
struct
dcb_app
*
app
)
{
{
struct
ixgbe_adapter
*
adapter
=
netdev_priv
(
dev
);
struct
ixgbe_adapter
*
adapter
=
netdev_priv
(
dev
);
int
err
=
-
EINVAL
;
if
(
!
(
adapter
->
dcbx_cap
&
DCB_CAP_DCBX_VER_IEEE
))
if
(
!
(
adapter
->
dcbx_cap
&
DCB_CAP_DCBX_VER_IEEE
))
return
-
EINVAL
;
return
err
;
dcb
_setapp
(
dev
,
app
);
err
=
dcb_ieee
_setapp
(
dev
,
app
);
#ifdef IXGBE_FCOE
#ifdef IXGBE_FCOE
if
(
app
->
selector
==
1
&&
app
->
protocol
==
ETH_P_FCOE
&&
if
(
!
err
&&
app
->
selector
==
IEEE_8021QAZ_APP_SEL_ETHERTYPE
&&
adapter
->
fcoe
.
tc
==
app
->
priority
)
app
->
protocol
==
ETH_P_FCOE
)
{
ixgbe_dcbnl_set_all
(
dev
);
u8
app_mask
=
dcb_ieee_getapp_mask
(
dev
,
app
);
if
(
app_mask
&
(
1
<<
adapter
->
fcoe
.
up
))
return
err
;
adapter
->
fcoe
.
up
=
app
->
priority
;
ixgbe_dcbnl_devreset
(
dev
);
}
#endif
#endif
return
0
;
return
0
;
}
}
static
int
ixgbe_dcbnl_ieee_delapp
(
struct
net_device
*
dev
,
struct
dcb_app
*
app
)
{
struct
ixgbe_adapter
*
adapter
=
netdev_priv
(
dev
);
int
err
;
if
(
!
(
adapter
->
dcbx_cap
&
DCB_CAP_DCBX_VER_IEEE
))
return
-
EINVAL
;
err
=
dcb_ieee_delapp
(
dev
,
app
);
#ifdef IXGBE_FCOE
if
(
!
err
&&
app
->
selector
==
IEEE_8021QAZ_APP_SEL_ETHERTYPE
&&
app
->
protocol
==
ETH_P_FCOE
)
{
u8
app_mask
=
dcb_ieee_getapp_mask
(
dev
,
app
);
if
(
app_mask
&
(
1
<<
adapter
->
fcoe
.
up
))
return
err
;
adapter
->
fcoe
.
up
=
app_mask
?
ffs
(
app_mask
)
-
1
:
IXGBE_FCOE_DEFTC
;
ixgbe_dcbnl_devreset
(
dev
);
}
#endif
return
err
;
}
static
u8
ixgbe_dcbnl_getdcbx
(
struct
net_device
*
dev
)
static
u8
ixgbe_dcbnl_getdcbx
(
struct
net_device
*
dev
)
{
{
struct
ixgbe_adapter
*
adapter
=
netdev_priv
(
dev
);
struct
ixgbe_adapter
*
adapter
=
netdev_priv
(
dev
);
...
@@ -743,6 +790,7 @@ const struct dcbnl_rtnl_ops dcbnl_ops = {
...
@@ -743,6 +790,7 @@ const struct dcbnl_rtnl_ops dcbnl_ops = {
.
ieee_getpfc
=
ixgbe_dcbnl_ieee_getpfc
,
.
ieee_getpfc
=
ixgbe_dcbnl_ieee_getpfc
,
.
ieee_setpfc
=
ixgbe_dcbnl_ieee_setpfc
,
.
ieee_setpfc
=
ixgbe_dcbnl_ieee_setpfc
,
.
ieee_setapp
=
ixgbe_dcbnl_ieee_setapp
,
.
ieee_setapp
=
ixgbe_dcbnl_ieee_setapp
,
.
ieee_delapp
=
ixgbe_dcbnl_ieee_delapp
,
.
getstate
=
ixgbe_dcbnl_get_state
,
.
getstate
=
ixgbe_dcbnl_get_state
,
.
setstate
=
ixgbe_dcbnl_set_state
,
.
setstate
=
ixgbe_dcbnl_set_state
,
.
getpermhwaddr
=
ixgbe_dcbnl_get_perm_hw_addr
,
.
getpermhwaddr
=
ixgbe_dcbnl_get_perm_hw_addr
,
...
...
drivers/net/ixgbe/ixgbe_fcoe.c
View file @
85a43a9e
...
@@ -26,9 +26,6 @@
...
@@ -26,9 +26,6 @@
*******************************************************************************/
*******************************************************************************/
#include "ixgbe.h"
#include "ixgbe.h"
#ifdef CONFIG_IXGBE_DCB
#include "ixgbe_dcb_82599.h"
#endif
/* CONFIG_IXGBE_DCB */
#include <linux/if_ether.h>
#include <linux/if_ether.h>
#include <linux/gfp.h>
#include <linux/gfp.h>
#include <linux/if_vlan.h>
#include <linux/if_vlan.h>
...
@@ -474,24 +471,18 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
...
@@ -474,24 +471,18 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
*
*
* Returns : 0 indicates no FSO, > 0 for FSO, < 0 for error
* Returns : 0 indicates no FSO, > 0 for FSO, < 0 for error
*/
*/
int
ixgbe_fso
(
struct
ixgbe_adapter
*
adapter
,
int
ixgbe_fso
(
struct
ixgbe_ring
*
tx_ring
,
struct
sk_buff
*
skb
,
struct
ixgbe_ring
*
tx_ring
,
struct
sk_buff
*
skb
,
u32
tx_flags
,
u8
*
hdr_len
)
u32
tx_flags
,
u8
*
hdr_len
)
{
{
u8
sof
,
eof
;
struct
fc_frame_header
*
fh
;
u32
vlan_macip_lens
;
u32
vlan_macip_lens
;
u32
fcoe_sof_eof
;
u32
fcoe_sof_eof
=
0
;
u32
type_tucmd
;
u32
mss_l4len_idx
;
u32
mss_l4len_idx
;
int
mss
=
0
;
u8
sof
,
eof
;
unsigned
int
i
;
struct
ixgbe_tx_buffer
*
tx_buffer_info
;
struct
ixgbe_adv_tx_context_desc
*
context_desc
;
struct
fc_frame_header
*
fh
;
if
(
skb_is_gso
(
skb
)
&&
(
skb_shinfo
(
skb
)
->
gso_type
!=
SKB_GSO_FCOE
))
{
if
(
skb_is_gso
(
skb
)
&&
(
skb_shinfo
(
skb
)
->
gso_type
!=
SKB_GSO_FCOE
))
{
e_err
(
dr
v
,
"Wrong gso type %d:expecting SKB_GSO_FCOE
\n
"
,
dev_err
(
tx_ring
->
de
v
,
"Wrong gso type %d:expecting SKB_GSO_FCOE
\n
"
,
skb_shinfo
(
skb
)
->
gso_type
);
skb_shinfo
(
skb
)
->
gso_type
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -501,23 +492,22 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
...
@@ -501,23 +492,22 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
sizeof
(
struct
fcoe_hdr
));
sizeof
(
struct
fcoe_hdr
));
/* sets up SOF and ORIS */
/* sets up SOF and ORIS */
fcoe_sof_eof
=
0
;
sof
=
((
struct
fcoe_hdr
*
)
skb_network_header
(
skb
))
->
fcoe_sof
;
sof
=
((
struct
fcoe_hdr
*
)
skb_network_header
(
skb
))
->
fcoe_sof
;
switch
(
sof
)
{
switch
(
sof
)
{
case
FC_SOF_I2
:
case
FC_SOF_I2
:
fcoe_sof_eof
|
=
IXGBE_ADVTXD_FCOEF_ORIS
;
fcoe_sof_eof
=
IXGBE_ADVTXD_FCOEF_ORIS
;
break
;
break
;
case
FC_SOF_I3
:
case
FC_SOF_I3
:
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_SOF
;
fcoe_sof_eof
=
IXGBE_ADVTXD_FCOEF_SOF
|
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_ORIS
;
IXGBE_ADVTXD_FCOEF_ORIS
;
break
;
break
;
case
FC_SOF_N2
:
case
FC_SOF_N2
:
break
;
break
;
case
FC_SOF_N3
:
case
FC_SOF_N3
:
fcoe_sof_eof
|
=
IXGBE_ADVTXD_FCOEF_SOF
;
fcoe_sof_eof
=
IXGBE_ADVTXD_FCOEF_SOF
;
break
;
break
;
default:
default:
e_warn
(
dr
v
,
"unknown sof = 0x%x
\n
"
,
sof
);
dev_warn
(
tx_ring
->
de
v
,
"unknown sof = 0x%x
\n
"
,
sof
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -530,12 +520,11 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
...
@@ -530,12 +520,11 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
break
;
break
;
case
FC_EOF_T
:
case
FC_EOF_T
:
/* lso needs ORIE */
/* lso needs ORIE */
if
(
skb_is_gso
(
skb
))
{
if
(
skb_is_gso
(
skb
))
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_EOF_N
;
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_EOF_N
|
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_ORIE
;
IXGBE_ADVTXD_FCOEF_ORIE
;
}
else
{
else
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_EOF_T
;
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_EOF_T
;
}
break
;
break
;
case
FC_EOF_NI
:
case
FC_EOF_NI
:
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_EOF_NI
;
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_EOF_NI
;
...
@@ -544,7 +533,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
...
@@ -544,7 +533,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_EOF_A
;
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_EOF_A
;
break
;
break
;
default:
default:
e_warn
(
dr
v
,
"unknown eof = 0x%x
\n
"
,
eof
);
dev_warn
(
tx_ring
->
de
v
,
"unknown eof = 0x%x
\n
"
,
eof
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -553,43 +542,28 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
...
@@ -553,43 +542,28 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
if
(
fh
->
fh_f_ctl
[
2
]
&
FC_FC_REL_OFF
)
if
(
fh
->
fh_f_ctl
[
2
]
&
FC_FC_REL_OFF
)
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_PARINC
;
fcoe_sof_eof
|=
IXGBE_ADVTXD_FCOEF_PARINC
;
/*
hdr_len includes fc_hdr if FCoE lso is enabled
*/
/*
include trailer in headlen as it is replicated per frame
*/
*
hdr_len
=
sizeof
(
struct
fcoe_crc_eof
);
*
hdr_len
=
sizeof
(
struct
fcoe_crc_eof
);
/* hdr_len includes fc_hdr if FCoE LSO is enabled */
if
(
skb_is_gso
(
skb
))
if
(
skb_is_gso
(
skb
))
*
hdr_len
+=
(
skb_transport_offset
(
skb
)
+
*
hdr_len
+=
(
skb_transport_offset
(
skb
)
+
sizeof
(
struct
fc_frame_header
));
sizeof
(
struct
fc_frame_header
));
/* vlan_macip_lens: HEADLEN, MACLEN, VLAN tag */
vlan_macip_lens
=
(
skb_transport_offset
(
skb
)
+
sizeof
(
struct
fc_frame_header
));
vlan_macip_lens
|=
((
skb_transport_offset
(
skb
)
-
4
)
<<
IXGBE_ADVTXD_MACLEN_SHIFT
);
vlan_macip_lens
|=
(
tx_flags
&
IXGBE_TX_FLAGS_VLAN_MASK
);
/* type_tycmd and mss: set TUCMD.FCoE to enable offload */
type_tucmd
=
IXGBE_TXD_CMD_DEXT
|
IXGBE_ADVTXD_DTYP_CTXT
|
IXGBE_ADVTXT_TUCMD_FCOE
;
if
(
skb_is_gso
(
skb
))
mss
=
skb_shinfo
(
skb
)
->
gso_size
;
/* mss_l4len_id: use 1 for FSO as TSO, no need for L4LEN */
/* mss_l4len_id: use 1 for FSO as TSO, no need for L4LEN */
mss_l4len_idx
=
(
mss
<<
IXGBE_ADVTXD_MSS_SHIFT
)
|
mss_l4len_idx
=
skb_shinfo
(
skb
)
->
gso_size
<<
IXGBE_ADVTXD_MSS_SHIFT
;
(
1
<<
IXGBE_ADVTXD_IDX_SHIFT
);
mss_l4len_idx
|=
1
<<
IXGBE_ADVTXD_IDX_SHIFT
;
/* vlan_macip_lens: HEADLEN, MACLEN, VLAN tag */
vlan_macip_lens
=
skb_transport_offset
(
skb
)
+
sizeof
(
struct
fc_frame_header
);
vlan_macip_lens
|=
(
skb_transport_offset
(
skb
)
-
4
)
<<
IXGBE_ADVTXD_MACLEN_SHIFT
;
vlan_macip_lens
|=
tx_flags
&
IXGBE_TX_FLAGS_VLAN_MASK
;
/* write context desc */
/* write context desc */
i
=
tx_ring
->
next_to_use
;
ixgbe_tx_ctxtdesc
(
tx_ring
,
vlan_macip_lens
,
fcoe_sof_eof
,
context_desc
=
IXGBE_TX_CTXTDESC_ADV
(
tx_ring
,
i
);
IXGBE_ADVTXT_TUCMD_FCOE
,
mss_l4len_idx
);
context_desc
->
vlan_macip_lens
=
cpu_to_le32
(
vlan_macip_lens
);
context_desc
->
seqnum_seed
=
cpu_to_le32
(
fcoe_sof_eof
);
context_desc
->
type_tucmd_mlhl
=
cpu_to_le32
(
type_tucmd
);
context_desc
->
mss_l4len_idx
=
cpu_to_le32
(
mss_l4len_idx
);
tx_buffer_info
=
&
tx_ring
->
tx_buffer_info
[
i
];
tx_buffer_info
->
time_stamp
=
jiffies
;
tx_buffer_info
->
next_to_watch
=
i
;
i
++
;
if
(
i
==
tx_ring
->
count
)
i
=
0
;
tx_ring
->
next_to_use
=
i
;
return
skb_is_gso
(
skb
);
return
skb_is_gso
(
skb
);
}
}
...
@@ -648,10 +622,6 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
...
@@ -648,10 +622,6 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
struct
ixgbe_hw
*
hw
=
&
adapter
->
hw
;
struct
ixgbe_hw
*
hw
=
&
adapter
->
hw
;
struct
ixgbe_fcoe
*
fcoe
=
&
adapter
->
fcoe
;
struct
ixgbe_fcoe
*
fcoe
=
&
adapter
->
fcoe
;
struct
ixgbe_ring_feature
*
f
=
&
adapter
->
ring_feature
[
RING_F_FCOE
];
struct
ixgbe_ring_feature
*
f
=
&
adapter
->
ring_feature
[
RING_F_FCOE
];
#ifdef CONFIG_IXGBE_DCB
u8
tc
;
u32
up2tc
;
#endif
if
(
!
fcoe
->
pool
)
{
if
(
!
fcoe
->
pool
)
{
spin_lock_init
(
&
fcoe
->
lock
);
spin_lock_init
(
&
fcoe
->
lock
);
...
@@ -717,18 +687,6 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
...
@@ -717,18 +687,6 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
IXGBE_FCRXCTRL_FCOELLI
|
IXGBE_FCRXCTRL_FCOELLI
|
IXGBE_FCRXCTRL_FCCRCBO
|
IXGBE_FCRXCTRL_FCCRCBO
|
(
FC_FCOE_VER
<<
IXGBE_FCRXCTRL_FCOEVER_SHIFT
));
(
FC_FCOE_VER
<<
IXGBE_FCRXCTRL_FCOEVER_SHIFT
));
#ifdef CONFIG_IXGBE_DCB
up2tc
=
IXGBE_READ_REG
(
&
adapter
->
hw
,
IXGBE_RTTUP2TC
);
for
(
i
=
0
;
i
<
MAX_USER_PRIORITY
;
i
++
)
{
tc
=
(
u8
)(
up2tc
>>
(
i
*
IXGBE_RTTUP2TC_UP_SHIFT
));
tc
&=
(
MAX_TRAFFIC_CLASS
-
1
);
if
(
fcoe
->
tc
==
tc
)
{
fcoe
->
up
=
i
;
break
;
}
}
#endif
return
;
return
;
out_extra_ddp_buffer:
out_extra_ddp_buffer:
...
@@ -856,41 +814,6 @@ int ixgbe_fcoe_disable(struct net_device *netdev)
...
@@ -856,41 +814,6 @@ int ixgbe_fcoe_disable(struct net_device *netdev)
return
rc
;
return
rc
;
}
}
#ifdef CONFIG_IXGBE_DCB
/**
* ixgbe_fcoe_setapp - sets the user priority bitmap for FCoE
* @adapter : ixgbe adapter
* @up : 802.1p user priority bitmap
*
* Finds out the traffic class from the input user priority
* bitmap for FCoE.
*
* Returns : 0 on success otherwise returns 1 on error
*/
u8
ixgbe_fcoe_setapp
(
struct
ixgbe_adapter
*
adapter
,
u8
up
)
{
int
i
;
u32
up2tc
;
/* valid user priority bitmap must not be 0 */
if
(
up
)
{
/* from user priority to the corresponding traffic class */
up2tc
=
IXGBE_READ_REG
(
&
adapter
->
hw
,
IXGBE_RTTUP2TC
);
for
(
i
=
0
;
i
<
MAX_USER_PRIORITY
;
i
++
)
{
if
(
up
&
(
1
<<
i
))
{
up2tc
>>=
(
i
*
IXGBE_RTTUP2TC_UP_SHIFT
);
up2tc
&=
(
MAX_TRAFFIC_CLASS
-
1
);
adapter
->
fcoe
.
tc
=
(
u8
)
up2tc
;
adapter
->
fcoe
.
up
=
i
;
return
0
;
}
}
}
return
1
;
}
#endif
/* CONFIG_IXGBE_DCB */
/**
/**
* ixgbe_fcoe_get_wwn - get world wide name for the node or the port
* ixgbe_fcoe_get_wwn - get world wide name for the node or the port
* @netdev : ixgbe adapter
* @netdev : ixgbe adapter
...
...
drivers/net/ixgbe/ixgbe_fcoe.h
View file @
85a43a9e
...
@@ -74,7 +74,6 @@ struct ixgbe_fcoe {
...
@@ -74,7 +74,6 @@ struct ixgbe_fcoe {
dma_addr_t
extra_ddp_buffer_dma
;
dma_addr_t
extra_ddp_buffer_dma
;
unsigned
long
mode
;
unsigned
long
mode
;
#ifdef CONFIG_IXGBE_DCB
#ifdef CONFIG_IXGBE_DCB
u8
tc
;
u8
up
;
u8
up
;
#endif
#endif
};
};
...
...
drivers/net/ixgbe/ixgbe_main.c
View file @
85a43a9e
This diff is collapsed.
Click to expand it.
drivers/net/ixgbe/ixgbe_sriov.c
View file @
85a43a9e
...
@@ -605,6 +605,22 @@ static void ixgbe_set_vf_rate_limit(struct ixgbe_hw *hw, int vf, int tx_rate,
...
@@ -605,6 +605,22 @@ static void ixgbe_set_vf_rate_limit(struct ixgbe_hw *hw, int vf, int tx_rate,
}
}
IXGBE_WRITE_REG
(
hw
,
IXGBE_RTTDQSEL
,
2
*
vf
);
/* vf Y uses queue 2*Y */
IXGBE_WRITE_REG
(
hw
,
IXGBE_RTTDQSEL
,
2
*
vf
);
/* vf Y uses queue 2*Y */
/*
* Set global transmit compensation time to the MMW_SIZE in RTTBCNRM
* register. Typically MMW_SIZE=0x014 if 9728-byte jumbo is supported
* and 0x004 otherwise.
*/
switch
(
hw
->
mac
.
type
)
{
case
ixgbe_mac_82599EB
:
IXGBE_WRITE_REG
(
hw
,
IXGBE_RTTBCNRM
,
0x4
);
break
;
case
ixgbe_mac_X540
:
IXGBE_WRITE_REG
(
hw
,
IXGBE_RTTBCNRM
,
0x14
);
break
;
default:
break
;
}
IXGBE_WRITE_REG
(
hw
,
IXGBE_RTTBCNRC
,
bcnrc_val
);
IXGBE_WRITE_REG
(
hw
,
IXGBE_RTTBCNRC
,
bcnrc_val
);
}
}
...
...
drivers/net/ixgbe/ixgbe_type.h
View file @
85a43a9e
...
@@ -534,7 +534,7 @@
...
@@ -534,7 +534,7 @@
#define IXGBE_RTTBCNRC_RF_INT_SHIFT 14
#define IXGBE_RTTBCNRC_RF_INT_SHIFT 14
#define IXGBE_RTTBCNRC_RF_INT_MASK \
#define IXGBE_RTTBCNRC_RF_INT_MASK \
(IXGBE_RTTBCNRC_RF_DEC_MASK << IXGBE_RTTBCNRC_RF_INT_SHIFT)
(IXGBE_RTTBCNRC_RF_DEC_MASK << IXGBE_RTTBCNRC_RF_INT_SHIFT)
#define IXGBE_RTTBCNRM 0x04980
/* FCoE DMA Context Registers */
/* FCoE DMA Context Registers */
#define IXGBE_FCPTRL 0x02410
/* FC User Desc. PTR Low */
#define IXGBE_FCPTRL 0x02410
/* FC User Desc. PTR Low */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment