[dpdk-dev] [PATCH v2] net/ixgbe: removed ipsec keys from private data
Radu Nicolau
radu.nicolau at intel.com
Wed Dec 20 19:06:34 CET 2017
On 12/20/2017 3:46 PM, Stephen Hemminger wrote:
> On Wed, 20 Dec 2017 11:32:51 +0000
> Radu Nicolau <radu.nicolau at intel.com> wrote:
>
>> All ipsec related setting are being held in the driver
>> private data to allow easy add and remove of SAs. There
>> is no need to keep a record of the keys, and also
>> storing the keys can be a security issue.
>>
>> Signed-off-by: Radu Nicolau <radu.nicolau at intel.com>
>> Acked-by: Declan Doherty <declan.doherty at intel.com>
>> ---
>> drivers/net/ixgbe/ixgbe_ipsec.c | 78 ++++++++++++++++++-----------------------
>> drivers/net/ixgbe/ixgbe_ipsec.h | 4 ---
>> 2 files changed, 35 insertions(+), 47 deletions(-)
>>
>> diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c
>> index 105da11..a7ba358 100644
>> --- a/drivers/net/ixgbe/ixgbe_ipsec.c
>> +++ b/drivers/net/ixgbe/ixgbe_ipsec.c
>> @@ -70,6 +70,8 @@ static void
>> ixgbe_crypto_clear_ipsec_tables(struct rte_eth_dev *dev)
>> {
>> struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
>> + struct ixgbe_ipsec *priv = IXGBE_DEV_PRIVATE_TO_IPSEC(
>> + dev->data->dev_private);
>> int i = 0;
>>
>> /* clear Rx IP table*/
>> @@ -106,6 +108,10 @@ ixgbe_crypto_clear_ipsec_tables(struct rte_eth_dev *dev)
>> IXGBE_WRITE_REG(hw, IXGBE_IPSTXSALT, 0);
>> IXGBE_WAIT_TWRITE;
>> }
>> +
>> + memset(priv->rx_ip_tbl, 0, sizeof(priv->rx_ip_tbl));
>> + memset(priv->rx_sa_tbl, 0, sizeof(priv->rx_sa_tbl));
>> + memset(priv->tx_sa_tbl, 0, sizeof(priv->tx_sa_tbl));
> GCC has been known to optimize out this kind of memset.
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8537
>
Thanks for pointing it out, I will send an update.
More information about the dev
mailing list