[v4,24/30] net/ice/base: fix 4 byte alignment for pppoe dummy packet

Message ID 20190923062702.3836-25-qi.z.zhang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: xiaolong ye
Headers
Series net/ice/base: share code update secend batch. |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Qi Zhang Sept. 23, 2019, 6:26 a.m. UTC
  Add two bytes to meet the requirement of 4 byte alignment for dummy
packet for creating switch rule for PPPoE.

Fixes: 032b6c617a96 ("net/ice/base: add support for GTP and PPPoE protocols")

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Qiming Yang Sept. 23, 2019, 7:13 a.m. UTC | #1
> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Monday, September 23, 2019 2:27 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Ye, Xiaolong <xiaolong.ye@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Guo, Junfeng <junfeng.guo@intel.com>; Stillwell Jr,
> Paul M <paul.m.stillwell.jr@intel.com>
> Subject: [PATCH v4 24/30] net/ice/base: fix 4 byte alignment for pppoe

4 bytes, same as below.

> dummy packet
> 
> Add two bytes to meet the requirement of 4 byte alignment for dummy
> packet for creating switch rule for PPPoE.
> 
> Fixes: 032b6c617a96 ("net/ice/base: add support for GTP and PPPoE
> protocols")
> 
> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/ice/base/ice_switch.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ice/base/ice_switch.c
> b/drivers/net/ice/base/ice_switch.c
> index 9681d9590..7681ba38b 100644
> --- a/drivers/net/ice/base/ice_switch.c
> +++ b/drivers/net/ice/base/ice_switch.c
> @@ -441,6 +441,8 @@ dummy_pppoe_packet[] = {
>  	0x00, 0x11, 0x00, 0x00,
>  	0x00, 0x00, 0x00, 0x00,
>  	0x00, 0x00, 0x00, 0x00,
> +
> +	0x00, 0x00, /* 2 bytes for 4 byte alignment */
>  };
> 
>  /* this is a recipe to profile association bitmap */
> --
> 2.13.6
  

Patch

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 9681d9590..7681ba38b 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -441,6 +441,8 @@  dummy_pppoe_packet[] = {
 	0x00, 0x11, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00,
+
+	0x00, 0x00, /* 2 bytes for 4 byte alignment */
 };
 
 /* this is a recipe to profile association bitmap */