diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2019-08-17 21:54:41 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-17 22:43:59 +0300 |
commit | ec222003bd948de8f3ffbca522d328af1a8452ad (patch) | |
tree | 8ab9b0c3e81c27f4ffed72dcc01dfedbe42f01e7 /drivers/net/ethernet/stmicro/stmmac/stmmac.h | |
parent | 25e80cd05ff81e51750106f1ae12364449ec38e7 (diff) | |
download | linux-ec222003bd948de8f3ffbca522d328af1a8452ad.tar.xz |
net: stmmac: Prepare to add Split Header support
In order to add Split Header support, stmmac_rx() needs to take into
account that packet may be split accross multiple descriptors.
Refactor the logic of this function in order to support this scenario.
Changes from v2:
- Fixup if condition detection (Jakub)
- Don't stop NAPI with unfinished packet (Jakub)
- Use napi_alloc_skb() (Jakub)
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac.h')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index 80276587048a..56158e1448ac 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -74,6 +74,12 @@ struct stmmac_rx_queue { u32 rx_zeroc_thresh; dma_addr_t dma_rx_phy; u32 rx_tail_addr; + unsigned int state_saved; + struct { + struct sk_buff *skb; + unsigned int len; + unsigned int error; + } state; }; struct stmmac_channel { |