diff mbox

Use smaller 512 byte messages for portmapper messages

Message ID 1468602052-63692-1-git-send-email-shiraz.saleem@intel.com (mailing list archive)
State Superseded
Headers show

Commit Message

Shiraz Saleem July 15, 2016, 5 p.m. UTC
From: Mustafa Ismail <mustafa.ismail@intel.com>

Reduce memory footprint by lowering the portmapper message size
to 512 bytes.

Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
---
 drivers/infiniband/core/iwpm_util.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Leon Romanovsky July 15, 2016, 8:48 p.m. UTC | #1
On Fri, Jul 15, 2016 at 12:00:52PM -0500, Shiraz Saleem wrote:
> From: Mustafa Ismail <mustafa.ismail@intel.com>
> 
> Reduce memory footprint by lowering the portmapper message size
> to 512 bytes.

Can you please add two things to the commit message?
1. Previous value.
2. Short justification of Why it is safe and needed to do.

Thanks
diff mbox

Patch

diff --git a/drivers/infiniband/core/iwpm_util.c b/drivers/infiniband/core/iwpm_util.c
index b65e06c..ade71e7 100644
--- a/drivers/infiniband/core/iwpm_util.c
+++ b/drivers/infiniband/core/iwpm_util.c
@@ -37,6 +37,7 @@ 
 #define IWPM_MAPINFO_HASH_MASK	(IWPM_MAPINFO_HASH_SIZE - 1)
 #define IWPM_REMINFO_HASH_SIZE	64
 #define IWPM_REMINFO_HASH_MASK	(IWPM_REMINFO_HASH_SIZE - 1)
+#define IWPM_MSG_SIZE		512
 
 static LIST_HEAD(iwpm_nlmsg_req_list);
 static DEFINE_SPINLOCK(iwpm_nlmsg_req_lock);
@@ -452,7 +453,7 @@  struct sk_buff *iwpm_create_nlmsg(u32 nl_op, struct nlmsghdr **nlh,
 {
 	struct sk_buff *skb = NULL;
 
-	skb = dev_alloc_skb(NLMSG_GOODSIZE);
+	skb = dev_alloc_skb(IWPM_MSG_SIZE);
 	if (!skb) {
 		pr_err("%s Unable to allocate skb\n", __func__);
 		goto create_nlmsg_exit;