Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265183
b: refs/heads/master
c: 12004ae
h: refs/heads/master
i:
  265181: 4f35afe
  265179: 8c5af92
  265175: fd67a9e
  265167: 11d44a3
  265151: 4e7d916
v: v3
  • Loading branch information
Sathya Perla authored and David S. Miller committed Aug 3, 2011
1 parent 163d30f commit 1c93a80
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 306f13487c9f7d6e3303a547e01e22958a04c666
refs/heads/master: 12004ae99c009a4ff3c8ea0843f1980aa5bcb4ea
2 changes: 1 addition & 1 deletion trunk/drivers/net/benet/be.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ struct be_rx_compl_info {
u16 vlan_tag;
u16 pkt_size;
u16 rxq_idx;
u16 mac_id;
u16 port;
u8 vlanf;
u8 num_rcvd;
u8 err;
Expand Down
30 changes: 23 additions & 7 deletions trunk/drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,7 @@ static void be_parse_rx_compl_v1(struct be_adapter *adapter,
rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag,
compl);
}
rxcp->port = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, port, compl);
}

static void be_parse_rx_compl_v0(struct be_adapter *adapter,
Expand Down Expand Up @@ -1245,6 +1246,7 @@ static void be_parse_rx_compl_v0(struct be_adapter *adapter,
rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag,
compl);
}
rxcp->port = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, port, compl);
}

static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo)
Expand Down Expand Up @@ -1833,16 +1835,30 @@ static int be_poll_rx(struct napi_struct *napi, int budget)
if (!rxcp)
break;

/* Ignore flush completions */
if (rxcp->num_rcvd && rxcp->pkt_size) {
if (do_gro(rxcp))
be_rx_compl_process_gro(adapter, rxo, rxcp);
else
be_rx_compl_process(adapter, rxo, rxcp);
} else if (rxcp->pkt_size == 0) {
/* Is it a flush compl that has no data */
if (unlikely(rxcp->num_rcvd == 0))
goto loop_continue;

/* Discard compl with partial DMA Lancer B0 */
if (unlikely(!rxcp->pkt_size)) {
be_rx_compl_discard(adapter, rxo, rxcp);
goto loop_continue;
}

/* On BE drop pkts that arrive due to imperfect filtering in
* promiscuous mode on some skews
*/
if (unlikely(rxcp->port != adapter->port_num &&
!lancer_chip(adapter))) {
be_rx_compl_discard(adapter, rxo, rxcp);
goto loop_continue;
}

if (do_gro(rxcp))
be_rx_compl_process_gro(adapter, rxo, rxcp);
else
be_rx_compl_process(adapter, rxo, rxcp);
loop_continue:
be_rx_stats_update(rxo, rxcp);
}

Expand Down

0 comments on commit 1c93a80

Please sign in to comment.