cxgbe/t4_tom: The SMAC entry for a VI is at a different location in the T6.
Sponsored by: Chelsio Communications
This commit is contained in:
parent
4d97d272be
commit
b0c554c3a5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305906
@ -231,6 +231,7 @@ struct vi_info {
|
||||
int if_flags;
|
||||
|
||||
uint16_t *rss, *nm_rss;
|
||||
int smt_idx; /* for convenience */
|
||||
uint16_t viid;
|
||||
int16_t xact_addr_filt;/* index of exact MAC address filter */
|
||||
uint16_t rss_size; /* size of VI's RSS table slice */
|
||||
|
@ -8100,6 +8100,10 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id)
|
||||
return ret;
|
||||
|
||||
p->vi[0].viid = ret;
|
||||
if (chip_id(adap) <= CHELSIO_T5)
|
||||
p->vi[0].smt_idx = (ret & 0x7f) << 1;
|
||||
else
|
||||
p->vi[0].smt_idx = (ret & 0x7f);
|
||||
p->tx_chan = j;
|
||||
p->rx_chan_map = t4_get_mps_bg_map(adap, j);
|
||||
p->lport = j;
|
||||
|
@ -2030,6 +2030,10 @@ vcxgbe_attach(device_t dev)
|
||||
return (-rc);
|
||||
}
|
||||
vi->viid = rc;
|
||||
if (chip_id(sc) <= CHELSIO_T5)
|
||||
vi->smt_idx = (rc & 0x7f) << 1;
|
||||
else
|
||||
vi->smt_idx = (rc & 0x7f);
|
||||
|
||||
param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) |
|
||||
V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_RSSINFO) |
|
||||
|
@ -538,7 +538,6 @@ select_rcv_wscale(void)
|
||||
}
|
||||
|
||||
extern int always_keepalive;
|
||||
#define VIID_SMACIDX(v) (((unsigned int)(v) & 0x7f) << 1)
|
||||
|
||||
/*
|
||||
* socket so could be a listening socket too.
|
||||
@ -569,7 +568,7 @@ calc_opt0(struct socket *so, struct vi_info *vi, struct l2t_entry *e,
|
||||
opt0 |= V_L2T_IDX(e->idx);
|
||||
|
||||
if (vi != NULL) {
|
||||
opt0 |= V_SMAC_SEL(VIID_SMACIDX(vi->viid));
|
||||
opt0 |= V_SMAC_SEL(vi->smt_idx);
|
||||
opt0 |= V_TX_CHAN(vi->pi->tx_chan);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user