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/txgbe: fix link up and down
[dpdk.git]
/
drivers
/
net
/
txgbe
/
txgbe_ipsec.c
diff --git
a/drivers/net/txgbe/txgbe_ipsec.c
b/drivers/net/txgbe/txgbe_ipsec.c
index
a43b95a
..
3ca3d85
100644
(file)
--- a/
drivers/net/txgbe/txgbe_ipsec.c
+++ b/
drivers/net/txgbe/txgbe_ipsec.c
@@
-1,5
+1,6
@@
/* SPDX-License-Identifier: BSD-3-Clause
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2015-2020
+ * Copyright(c) 2015-2020 Beijing WangXun Technology Co., Ltd.
+ * Copyright(c) 2010-2017 Intel Corporation
*/
#include <ethdev_pci.h>
*/
#include <ethdev_pci.h>
@@
-287,7
+288,7
@@
txgbe_crypto_remove_sa(struct rte_eth_dev *dev,
return -1;
}
return -1;
}
- /* Disable and clear Rx SPI and key table entr
yes
*/
+ /* Disable and clear Rx SPI and key table entr
ies
*/
reg_val = TXGBE_IPSRXIDX_WRITE |
TXGBE_IPSRXIDX_TB_SPI | (sa_index << 3);
wr32(hw, TXGBE_IPSRXSPI, 0);
reg_val = TXGBE_IPSRXIDX_WRITE |
TXGBE_IPSRXIDX_TB_SPI | (sa_index << 3);
wr32(hw, TXGBE_IPSRXSPI, 0);
@@
-371,7
+372,7
@@
txgbe_crypto_create_session(void *device,
aead_xform = &conf->crypto_xform->aead;
if (conf->ipsec.direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS) {
aead_xform = &conf->crypto_xform->aead;
if (conf->ipsec.direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS) {
- if (dev_conf->rxmode.offloads &
DEV
_RX_OFFLOAD_SECURITY) {
+ if (dev_conf->rxmode.offloads &
RTE_ETH
_RX_OFFLOAD_SECURITY) {
ic_session->op = TXGBE_OP_AUTHENTICATED_DECRYPTION;
} else {
PMD_DRV_LOG(ERR, "IPsec decryption not enabled\n");
ic_session->op = TXGBE_OP_AUTHENTICATED_DECRYPTION;
} else {
PMD_DRV_LOG(ERR, "IPsec decryption not enabled\n");
@@
-379,7
+380,7
@@
txgbe_crypto_create_session(void *device,
return -ENOTSUP;
}
} else {
return -ENOTSUP;
}
} else {
- if (dev_conf->txmode.offloads &
DEV
_TX_OFFLOAD_SECURITY) {
+ if (dev_conf->txmode.offloads &
RTE_ETH
_TX_OFFLOAD_SECURITY) {
ic_session->op = TXGBE_OP_AUTHENTICATED_ENCRYPTION;
} else {
PMD_DRV_LOG(ERR, "IPsec encryption not enabled\n");
ic_session->op = TXGBE_OP_AUTHENTICATED_ENCRYPTION;
} else {
PMD_DRV_LOG(ERR, "IPsec encryption not enabled\n");
@@
-610,11
+611,11
@@
txgbe_crypto_enable_ipsec(struct rte_eth_dev *dev)
tx_offloads = dev->data->dev_conf.txmode.offloads;
/* sanity checks */
tx_offloads = dev->data->dev_conf.txmode.offloads;
/* sanity checks */
- if (rx_offloads &
DEV
_RX_OFFLOAD_TCP_LRO) {
+ if (rx_offloads &
RTE_ETH
_RX_OFFLOAD_TCP_LRO) {
PMD_DRV_LOG(ERR, "RSC and IPsec not supported");
return -1;
}
PMD_DRV_LOG(ERR, "RSC and IPsec not supported");
return -1;
}
- if (rx_offloads &
DEV
_RX_OFFLOAD_KEEP_CRC) {
+ if (rx_offloads &
RTE_ETH
_RX_OFFLOAD_KEEP_CRC) {
PMD_DRV_LOG(ERR, "HW CRC strip needs to be enabled for IPsec");
return -1;
}
PMD_DRV_LOG(ERR, "HW CRC strip needs to be enabled for IPsec");
return -1;
}
@@
-633,7
+634,7
@@
txgbe_crypto_enable_ipsec(struct rte_eth_dev *dev)
reg |= TXGBE_SECRXCTL_CRCSTRIP;
wr32(hw, TXGBE_SECRXCTL, reg);
reg |= TXGBE_SECRXCTL_CRCSTRIP;
wr32(hw, TXGBE_SECRXCTL, reg);
- if (rx_offloads &
DEV
_RX_OFFLOAD_SECURITY) {
+ if (rx_offloads &
RTE_ETH
_RX_OFFLOAD_SECURITY) {
wr32m(hw, TXGBE_SECRXCTL, TXGBE_SECRXCTL_ODSA, 0);
reg = rd32m(hw, TXGBE_SECRXCTL, TXGBE_SECRXCTL_ODSA);
if (reg != 0) {
wr32m(hw, TXGBE_SECRXCTL, TXGBE_SECRXCTL_ODSA, 0);
reg = rd32m(hw, TXGBE_SECRXCTL, TXGBE_SECRXCTL_ODSA);
if (reg != 0) {
@@
-641,7
+642,7
@@
txgbe_crypto_enable_ipsec(struct rte_eth_dev *dev)
return -1;
}
}
return -1;
}
}
- if (tx_offloads &
DEV
_TX_OFFLOAD_SECURITY) {
+ if (tx_offloads &
RTE_ETH
_TX_OFFLOAD_SECURITY) {
wr32(hw, TXGBE_SECTXCTL, TXGBE_SECTXCTL_STFWD);
reg = rd32(hw, TXGBE_SECTXCTL);
if (reg != TXGBE_SECTXCTL_STFWD) {
wr32(hw, TXGBE_SECTXCTL, TXGBE_SECTXCTL_STFWD);
reg = rd32(hw, TXGBE_SECTXCTL);
if (reg != TXGBE_SECTXCTL_STFWD) {