git: f79fba05a016 - main - cxgbe(4): Remove smt_idx from the L2 table entry structure.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Feb 2025 06:39:07 UTC
The branch main has been updated by np:
URL: https://cgit.FreeBSD.org/src/commit/?id=f79fba05a016d53e054d6f587213889c3e31b4db
commit f79fba05a016d53e054d6f587213889c3e31b4db
Author: Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2024-09-17 02:55:09 +0000
Commit: Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2025-02-14 05:54:59 +0000
cxgbe(4): Remove smt_idx from the L2 table entry structure.
An L2 table entry isn't associated with a particular SMT (Source MAC
Table) entry.
MFC after: 1 week
Sponsored by: Chelsio Communications
---
sys/dev/cxgbe/t4_l2t.h | 1 -
sys/dev/cxgbe/tom/t4_tom_l2t.c | 6 ++----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/sys/dev/cxgbe/t4_l2t.h b/sys/dev/cxgbe/t4_l2t.h
index f8681a4ab556..13e085bb7467 100644
--- a/sys/dev/cxgbe/t4_l2t.h
+++ b/sys/dev/cxgbe/t4_l2t.h
@@ -63,7 +63,6 @@ struct l2t_entry {
uint32_t iqid; /* iqid for reply to write_l2e */
struct sge_wrq *wrq; /* queue to use for write_l2e */
if_t ifp; /* outgoing interface */
- uint16_t smt_idx; /* SMT index */
uint16_t vlan; /* VLAN TCI (id: 0-11, prio: 13-15) */
struct l2t_entry *first; /* start of hash chain */
struct l2t_entry *next; /* next l2t_entry on chain */
diff --git a/sys/dev/cxgbe/tom/t4_tom_l2t.c b/sys/dev/cxgbe/tom/t4_tom_l2t.c
index 8cc3e633444a..909abe793835 100644
--- a/sys/dev/cxgbe/tom/t4_tom_l2t.c
+++ b/sys/dev/cxgbe/tom/t4_tom_l2t.c
@@ -361,7 +361,7 @@ t4_l2t_get(struct port_info *pi, if_t ifp, struct sockaddr *sa)
struct l2t_entry *e;
struct adapter *sc = pi->adapter;
struct l2t_data *d = sc->l2t;
- u_int hash, smt_idx = pi->port_id;
+ u_int hash;
uint16_t vid, pcp, vtag;
KASSERT(sa->sa_family == AF_INET || sa->sa_family == AF_INET6,
@@ -386,8 +386,7 @@ t4_l2t_get(struct port_info *pi, if_t ifp, struct sockaddr *sa)
goto done;
}
for (e = d->l2tab[hash].first; e; e = e->next) {
- if (l2_cmp(sa, e) == 0 && e->ifp == ifp && e->vlan == vtag &&
- e->smt_idx == smt_idx) {
+ if (l2_cmp(sa, e) == 0 && e->ifp == ifp && e->vlan == vtag) {
l2t_hold(d, e);
goto done;
}
@@ -403,7 +402,6 @@ t4_l2t_get(struct port_info *pi, if_t ifp, struct sockaddr *sa)
e->state = L2T_STATE_RESOLVING;
l2_store(sa, e);
e->ifp = ifp;
- e->smt_idx = smt_idx;
e->hash = hash;
e->lport = pi->lport;
e->wrq = &sc->sge.ctrlq[pi->port_id];