Code optimization

Change-Id: I7aa276cc9f1c022c9f67abe0493a3834d24cdd8b
Signed-off-by: Eyal Salomon <esalomon@mellanox.com>