net: buf: Use precise buffer size given to NET_BUF_POOL
net: buf: Use precise buffer size given to NET_BUF_POOL

Until now, NET_BUF_POOL() would be opportunistic and allocate a few
more bytes extra for the buffer content if the given size wasn't a
multiple of 4. This is an issue however if the API user really wants
to have a precise size for the buffer so that e.g. net_buf_tailroom
gives meaningful and deterministic results.

This patch removes the opportunistic rounding up, basically leaving it
up to the application to decide if it wants to have unused padding in
the data structure or not.

The crucial thing here is to ensure that locating the user data
section (which is aligned to a 4-byte boundary) doesn't break, since
buf->size is used for that. However, the net_buf_user_data()
implementation already uses ROUND_UP() so the result will still be
the same even if buf->size is not a multiple of 4.

Change-Id: I4bc17139cda19a680180c2d326d417a41ad0d4cd
Signed-off-by: Johan Hedberg <628991c7b0a19c384f9b99c21ec330ce952bb838@intel.com>

bboozzoo/zephyr,bigdinotech/zephyr,finikorg/zephyr,nashif/zephyr,explora26/zephyr,ldts/zephyr,punitvara/zephyr,zephyrproject-rtos/zephyr,aceofall/zephyr-iotos,GiulianoFranchetto/zephyr,aceofall/zephyr-iotos,runchip/zephyr-cc3200,GiulianoFranchetto/zephyr,rsalveti/zephyr,tidyjiang8/zephyr-doc,pklazy/zephyr,fbsder/zephyr,erwango/zephyr,finikorg/zephyr,runchip/zephyr-cc3220,Vudentz/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,tidyjiang8/zephyr-doc,zephyriot/zephyr,holtmann/zephyr,punitvara/zephyr,tidyjiang8/zephyr-doc,nashif/zephyr,sharronliu/zephyr,aceofall/zephyr-iotos,bboozzoo/zephyr,zephyriot/zephyr,mbolivar/zephyr,mbolivar/zephyr,zephyrproject-rtos/zephyr,fbsder/zephyr,runchip/zephyr-cc3200,mirzak/zephyr-os,GiulianoFranchetto/zephyr,runchip/zephyr-cc3200,erwango/zephyr,holtmann/zephyr,zephyrproject-rtos/zephyr,runchip/zephyr-cc3220,finikorg/zephyr,mbolivar/zephyr,ldts/zephyr,runchip/zephyr-cc3220,pklazy/zephyr,zephyriot/zephyr,ldts/zephyr,kraj/zephyr,fractalclone/zephyr-riscv,zephyriot/zephyr,nashif/zephyr,GiulianoFranchetto/zephyr,fractalclone/zephyr-riscv,Vudentz/zephyr,ldts/zephyr,fbsder/zephyr,kraj/zephyr,fbsder/zephyr,explora26/zephyr,zephyriot/zephyr,bigdinotech/zephyr,erwango/zephyr,pklazy/zephyr,runchip/zephyr-cc3220,sharronliu/zephyr,runchip/zephyr-cc3200,runchip/zephyr-cc3220,rsalveti/zephyr,rsalveti/zephyr,galak/zephyr,holtmann/zephyr,fractalclone/zephyr-riscv,bigdinotech/zephyr,explora26/zephyr,finikorg/zephyr,fractalclone/zephyr-riscv,ldts/zephyr,erwango/zephyr,Vudentz/zephyr,mbolivar/zephyr,finikorg/zephyr,runchip/zephyr-cc3200,sharronliu/zephyr,bigdinotech/zephyr,Vudentz/zephyr,galak/zephyr,fbsder/zephyr,galak/zephyr,mirzak/zephyr-os,Vudentz/zephyr,explora26/zephyr,nashif/zephyr,bboozzoo/zephyr,mirzak/zephyr-os,punitvara/zephyr,erwango/zephyr,kraj/zephyr,mbolivar/zephyr,kraj/zephyr,explora26/zephyr,holtmann/zephyr,kraj/zephyr,pklazy/zephyr,Vudentz/zephyr,pklazy/zephyr,bboozzoo/zephyr,bboozzoo/zephyr,rsalveti/zephyr,holtmann/zephyr,sharronliu/zephyr,sharronliu/zephyr,galak/zephyr,aceofall/zephyr-iotos,mirzak/zephyr-os,punitvara/zephyr,aceofall/zephyr-iotos,rsalveti/zephyr,bigdinotech/zephyr,mirzak/zephyr-os,tidyjiang8/zephyr-doc,tidyjiang8/zephyr-doc,zephyrproject-rtos/zephyr,galak/zephyr,fractalclone/zephyr-riscv,punitvara/zephyr,nashif/zephyr