diff options
author | Jesper Dangaard Brouer <[email protected]> | 2018-01-03 11:25:34 +0100 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2018-01-05 15:21:21 -0800 |
commit | c0124f327e5cabd844a10d7e1fc5aa2a81e796a9 (patch) | |
tree | 1e030875ade5618ad69149020f0bc427a7bc0f5f /tools/perf/scripts/python/net_dropmonitor.py | |
parent | 99ffc5ade4e8703c3bc56fa6bb8e25437da09ee9 (diff) |
xdp/qede: setup xdp_rxq_info and intro xdp_rxq_info_is_reg
The driver code qede_free_fp_array() depend on kfree() can be called
with a NULL pointer. This stems from the qede_alloc_fp_array()
function which either (kz)alloc memory for fp->txq or fp->rxq.
This also simplifies error handling code in case of memory allocation
failures, but xdp_rxq_info_unreg need to know the difference.
Introduce xdp_rxq_info_is_reg() to handle if a memory allocation fails
and detect this is the failure path by seeing that xdp_rxq_info was
not registred yet, which first happens after successful alloaction in
qede_init_fp().
Driver hook points for xdp_rxq_info:
* reg : qede_init_fp
* unreg: qede_free_fp_array
Tested on actual hardware with samples/bpf program.
V2: Driver have no proper error path for failed XDP RX-queue info reg, as
qede_init_fp() is a void function.
Cc: [email protected]
Cc: Ariel Elior <[email protected]>
Signed-off-by: Jesper Dangaard Brouer <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions