git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/dpaa2: support Rx buffer size
[dpdk.git]
/
drivers
/
net
/
bnxt
/
bnxt_filter.c
diff --git
a/drivers/net/bnxt/bnxt_filter.c
b/drivers/net/bnxt/bnxt_filter.c
index
a1463a0
..
1d08e03
100644
(file)
--- a/
drivers/net/bnxt/bnxt_filter.c
+++ b/
drivers/net/bnxt/bnxt_filter.c
@@
-1,5
+1,5
@@
/* SPDX-License-Identifier: BSD-3-Clause
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2014-20
18
Broadcom
+ * Copyright(c) 2014-20
21
Broadcom
* All rights reserved.
*/
* All rights reserved.
*/
@@
-55,7
+55,7
@@
struct bnxt_filter_info *bnxt_alloc_vf_filter(struct bnxt *bp, uint16_t vf)
}
filter->fw_l2_filter_id = UINT64_MAX;
}
filter->fw_l2_filter_id = UINT64_MAX;
- STAILQ_INSERT_TAIL(&bp->pf
.
vf_info[vf].filter, filter, next);
+ STAILQ_INSERT_TAIL(&bp->pf
->
vf_info[vf].filter, filter, next);
return filter;
}
return filter;
}
@@
-81,6
+81,15
@@
void bnxt_free_all_filters(struct bnxt *bp)
struct bnxt_filter_info *filter, *temp_filter;
unsigned int i;
struct bnxt_filter_info *filter, *temp_filter;
unsigned int i;
+ for (i = 0; i < bp->pf->max_vfs; i++) {
+ STAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) {
+ bnxt_hwrm_clear_l2_filter(bp, filter);
+ }
+ }
+
+ if (bp->vnic_info == NULL)
+ return;
+
for (i = 0; i < bp->nr_vnics; i++) {
vnic = &bp->vnic_info[i];
filter = STAILQ_FIRST(&vnic->filter);
for (i = 0; i < bp->nr_vnics; i++) {
vnic = &bp->vnic_info[i];
filter = STAILQ_FIRST(&vnic->filter);
@@
-95,11
+104,6
@@
void bnxt_free_all_filters(struct bnxt *bp)
STAILQ_INIT(&vnic->filter);
}
STAILQ_INIT(&vnic->filter);
}
- for (i = 0; i < bp->pf.max_vfs; i++) {
- STAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {
- bnxt_hwrm_clear_l2_filter(bp, filter);
- }
- }
}
void bnxt_free_filter_mem(struct bnxt *bp)
}
void bnxt_free_filter_mem(struct bnxt *bp)
@@
-144,10
+148,10
@@
void bnxt_free_filter_mem(struct bnxt *bp)
rte_free(bp->filter_info);
bp->filter_info = NULL;
rte_free(bp->filter_info);
bp->filter_info = NULL;
- for (i = 0; i < bp->pf
.
max_vfs; i++) {
- STAILQ_FOREACH(filter, &bp->pf
.
vf_info[i].filter, next) {
+ for (i = 0; i < bp->pf
->
max_vfs; i++) {
+ STAILQ_FOREACH(filter, &bp->pf
->
vf_info[i].filter, next) {
rte_free(filter);
rte_free(filter);
- STAILQ_REMOVE(&bp->pf
.
vf_info[i].filter, filter,
+ STAILQ_REMOVE(&bp->pf
->
vf_info[i].filter, filter,
bnxt_filter_info, next);
}
}
bnxt_filter_info, next);
}
}