DPDK patches and discussions
 help / color / mirror / Atom feed
From: Radu Nicolau <radu.nicolau@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, helin.zhang@intel.com,
	konstantin.ananyev@intel.com, wenzhuo.lu@intel.com,
	declan.doherty@intel.com
Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: removed ipsec keys from private data
Date: Wed, 20 Dec 2017 18:06:34 +0000	[thread overview]
Message-ID: <def14444-fd68-13e0-47d6-f6aa3eac961e@intel.com> (raw)
In-Reply-To: <20171220074600.507383f8@xeon-e3>



On 12/20/2017 3:46 PM, Stephen Hemminger wrote:
> On Wed, 20 Dec 2017 11:32:51 +0000
> Radu Nicolau <radu.nicolau@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@intel.com>
>> Acked-by: Declan Doherty <declan.doherty@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.

  reply	other threads:[~2017-12-20 18:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 11:19 [dpdk-dev] [PATCH] " Radu Nicolau
2017-12-13  9:43 ` Declan Doherty
2018-01-07 15:24   ` Zhang, Helin
2017-12-20  6:48 ` Zhang, Helin
2017-12-20 11:32 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
2017-12-20 15:46   ` Stephen Hemminger
2017-12-20 18:06     ` Radu Nicolau [this message]
2017-12-21 10:55   ` [dpdk-dev] [PATCH v3] " Radu Nicolau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=def14444-fd68-13e0-47d6-f6aa3eac961e@intel.com \
    --to=radu.nicolau@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).