mirror of https://gitee.com/openkylin/linux.git
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2016-04-05 This series contains updates to i40e and e1000. Jesse fixes an issue where code was added by a previous commit but the flag to enable it was never set. Alex fixes the e1000 driver from grossly overestimated the descriptors needed to transmit a frame. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
aa4f069e16
|
@ -3106,7 +3106,7 @@ static int e1000_maybe_stop_tx(struct net_device *netdev,
|
|||
return __e1000_maybe_stop_tx(netdev, size);
|
||||
}
|
||||
|
||||
#define TXD_USE_COUNT(S, X) (((S) >> (X)) + 1)
|
||||
#define TXD_USE_COUNT(S, X) (((S) + ((1 << (X)) - 1)) >> (X))
|
||||
static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
|
||||
struct net_device *netdev)
|
||||
{
|
||||
|
@ -3256,12 +3256,29 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
|
|||
nr_frags, mss);
|
||||
|
||||
if (count) {
|
||||
/* The descriptors needed is higher than other Intel drivers
|
||||
* due to a number of workarounds. The breakdown is below:
|
||||
* Data descriptors: MAX_SKB_FRAGS + 1
|
||||
* Context Descriptor: 1
|
||||
* Keep head from touching tail: 2
|
||||
* Workarounds: 3
|
||||
*/
|
||||
int desc_needed = MAX_SKB_FRAGS + 7;
|
||||
|
||||
netdev_sent_queue(netdev, skb->len);
|
||||
skb_tx_timestamp(skb);
|
||||
|
||||
e1000_tx_queue(adapter, tx_ring, tx_flags, count);
|
||||
|
||||
/* 82544 potentially requires twice as many data descriptors
|
||||
* in order to guarantee buffers don't end on evenly-aligned
|
||||
* dwords
|
||||
*/
|
||||
if (adapter->pcix_82544)
|
||||
desc_needed += MAX_SKB_FRAGS + 1;
|
||||
|
||||
/* Make sure there is space in the ring for the next send. */
|
||||
e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2);
|
||||
e1000_maybe_stop_tx(netdev, tx_ring, desc_needed);
|
||||
|
||||
if (!skb->xmit_more ||
|
||||
netif_xmit_stopped(netdev_get_tx_queue(netdev, 0))) {
|
||||
|
|
|
@ -8559,6 +8559,7 @@ static int i40e_sw_init(struct i40e_pf *pf)
|
|||
I40E_FLAG_OUTER_UDP_CSUM_CAPABLE |
|
||||
I40E_FLAG_WB_ON_ITR_CAPABLE |
|
||||
I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE |
|
||||
I40E_FLAG_NO_PCI_LINK_CHECK |
|
||||
I40E_FLAG_100M_SGMII_CAPABLE |
|
||||
I40E_FLAG_USE_SET_LLDP_MIB |
|
||||
I40E_FLAG_GENEVE_OFFLOAD_CAPABLE;
|
||||
|
|
Loading…
Reference in New Issue