net/qede: fix null pointer dereferences
Fix null pointer dereferences in qede_vxlan_enable() and qede_conf_udp_dst_port() Coverity issue: 195010, 195012, 198439 Fixes: e0947ed912f7 ("net/qede: add support for VXLAN UDP port config over VF") Fixes: 739a5b2f2b49 ("net/qede/base: use passed ptt handler") Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
This commit is contained in:
parent
5b5f9675d3
commit
2c93d5baf9
@ -631,7 +631,13 @@ qede_vxlan_enable(struct rte_eth_dev *eth_dev, uint8_t clss,
|
||||
|
||||
for_each_hwfn(edev, i) {
|
||||
p_hwfn = &edev->hwfns[i];
|
||||
p_ptt = IS_PF(edev) ? ecore_ptt_acquire(p_hwfn) : NULL;
|
||||
if (IS_PF(edev)) {
|
||||
p_ptt = ecore_ptt_acquire(p_hwfn);
|
||||
if (!p_ptt)
|
||||
return -EAGAIN;
|
||||
} else {
|
||||
p_ptt = NULL;
|
||||
}
|
||||
rc = ecore_sp_pf_update_tunn_cfg(p_hwfn, p_ptt,
|
||||
&tunn, ECORE_SPQ_MODE_CB, NULL);
|
||||
if (rc != ECORE_SUCCESS) {
|
||||
@ -2258,7 +2264,13 @@ qede_conf_udp_dst_port(struct rte_eth_dev *eth_dev,
|
||||
tunn.vxlan_port.port = udp_port;
|
||||
for_each_hwfn(edev, i) {
|
||||
p_hwfn = &edev->hwfns[i];
|
||||
p_ptt = IS_PF(edev) ? ecore_ptt_acquire(p_hwfn) : NULL;
|
||||
if (IS_PF(edev)) {
|
||||
p_ptt = ecore_ptt_acquire(p_hwfn);
|
||||
if (!p_ptt)
|
||||
return -EAGAIN;
|
||||
} else {
|
||||
p_ptt = NULL;
|
||||
}
|
||||
rc = ecore_sp_pf_update_tunn_cfg(p_hwfn, p_ptt, &tunn,
|
||||
ECORE_SPQ_MODE_CB, NULL);
|
||||
if (rc != ECORE_SUCCESS) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user