diff options
author | Michael Chan <michael.chan@broadcom.com> | 2017-02-06 16:55:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-07 13:30:57 -0500 |
commit | 6bb19474391d17954fee9a9997ecca25b35dfd46 (patch) | |
tree | 459bc747ded6a240899dd3edf0f4e7b26afc4ab5 /include/net/bond_options.h | |
parent | b44700e975848a9a569a509244672ff886ec99b3 (diff) |
bnxt_en: Refactor rx SKB function.
Minor refactoring of bnxt_rx_skb() so that it can easily be replaced by
a new function that handles packets in a single page. Also, use a
function pointer bp->rx_skb_func() to switch to a new function when
we add the new mode in the next patch.
Add a new field data_ptr that points to the packet data in the
bnxt_sw_rx_bd structure. The original data field is changed to void
pointer so that it can either hold the kmalloc'ed data or a page
pointer.
The last parameter of bnxt_rx_skb() which was the length parameter is
changed to include the payload offset of the packet in the upper 16 bit.
The offset is needed to support the rx page mode and is not used in
this existing function.
v3: Added a new data_ptr parameter to bp->rx_skb_func(). The caller
has the option to modify the starting address of the packet. This
will be needed when XDP with headroom support is added.
v2: Changed the name of the last parameter to offset_and_len to make the
code more clear.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/bond_options.h')
0 files changed, 0 insertions, 0 deletions