From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by dpdk.org (Postfix) with ESMTP id 72C381B1CB for ; Wed, 20 Dec 2017 16:46:03 +0100 (CET) Received: by mail-pl0-f66.google.com with SMTP id z5so9220947plo.10 for ; Wed, 20 Dec 2017 07:46:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rbOg5qwRPqILFim3tRkqI9gQHLUWbR8zgJfxX6SqJII=; b=HqGs03eFM/seIgKWxwFMRino2lc8tV25eNz5H0dbwaNhrppAg+UP4kgD9xKg63h+1D UqGCu2ThOYjM9g7PguWGu0a5DeLqS41dFBO6MWVFEZmfbzjq/RGvaQiW3muvV4Ab78+/ epHdg7AjpWTGRgoJxCDOf1ee2mPpHvBkxYBKT35yGfZhiSTqqktYwSVxhhmLHpuQRVfF j9SwLp2IjFn9ohcQgGMdxH5b6mS/DWkf8UahoZiuUkzYYcLVQV0XvFdQ8zjWajdM0heB 4SLOgT0A+NlcUAMovgWqkCY4UiZEqi3/rM4ulMnaWi3+vfVcBmGukHtC2f4wsSjXvbU9 H5Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rbOg5qwRPqILFim3tRkqI9gQHLUWbR8zgJfxX6SqJII=; b=DWE2/r7eCS5Lv1vjp+kc9Xs/Sib3SbfWqmsXh2p9jgntV5NVzx2DGSoH9JQSGFSGTZ le6/SUZi+Sji6qOC2LNhPZasJ0cUvP4bf2GNhjkU1xUUJy5mmdU0k9Mu9XEZM7YXksJW MScGOZFgUDohtxHcRlZIMAk6Gl+tOSzFHqZmO3yCs0XVXOD9gEGGt2fGk+I1idxrgTrT Tn1xzPRjNAJUyjDnn78S+EbDRaNJ4hh9YCvssJiK9e4tZy1mAX8+VEvU3JAepCoSb8uj 931EnPnEr9IvGvLjJ7G5YwpDyVjAo9qMQG7pvfrYqzmnxQXJTUu+Dv3z/6BYOKBJp8Zz iIuA== X-Gm-Message-State: AKGB3mJC4rcApIkc+Lj/90aHRpfBKMk8L4HxK7K3w7ZWTG0I3UXO3MCU 26lzyY9UOPIDIZulTpzDdGPhEg== X-Google-Smtp-Source: ACJfBosXqMe0BQYQv/C4z5oft7BsH1hn2qfnupe8ViSWvMsFcSrw8RWg4XN3SkJgUrTVlvo6BKqcNA== X-Received: by 10.84.214.2 with SMTP id h2mr7626459pli.142.1513784762553; Wed, 20 Dec 2017 07:46:02 -0800 (PST) Received: from xeon-e3 (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id q68sm34196411pfb.1.2017.12.20.07.46.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Dec 2017 07:46:02 -0800 (PST) Date: Wed, 20 Dec 2017 07:46:00 -0800 From: Stephen Hemminger To: Radu Nicolau Cc: dev@dpdk.org, helin.zhang@intel.com, konstantin.ananyev@intel.com, wenzhuo.lu@intel.com, declan.doherty@intel.com Message-ID: <20171220074600.507383f8@xeon-e3> In-Reply-To: <1513769571-16734-1-git-send-email-radu.nicolau@intel.com> References: <1511349560-12704-1-git-send-email-radu.nicolau@intel.com> <1513769571-16734-1-git-send-email-radu.nicolau@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: removed ipsec keys from private data X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Dec 2017 15:46:03 -0000 On Wed, 20 Dec 2017 11:32:51 +0000 Radu Nicolau 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 > Acked-by: Declan Doherty > --- > 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