ARCNET: fix hard_header_len limit
Subsystems (2)
Quoted 9 lines · David Miller
From: Michael Grzeschik <[email protected]>
Date: Thu, 30 Jul 2015 15:34:36 +0200Quoted 6 lines
The commit <
9c7077622dd9> ("packet: makepacket_sndfail on len smaller than l2 header") adds the check for minimum packet length of the used l2. For arcnet the hardware header length is not the complete archdr which includes hard + soft header. This patch changes the length tosizeof(arc_hardware).
Quoted 4 lines
Quoted 1 line
Signed-off-by Michael Grzeschik <[email protected]>The hard header len is used for other purposes as well, are you sure those don't get broken by this change?
Its meaning is to represent the amount of the hardware (link layer) data of one packet.
Which other purposes do you mean?
Can you point to some code?
Quoted 4 lines
Code assumes that if the data at the SKB mac pointer is taken, for
dev->hard_header_lenbytes, that is exactly the link layer header. And that this can be used to compare two MAC headers, copy the MAC header from one packet to another, etc.
The link layer size of arcnet is 4 bytes long. 1 byte source, 1 byte dest and two offset bytes. As described by struct arc_hardware in if_arcnet.h . The above condition is fulfilled when the mac pointer is 0.
The following pending bytes of struct archdr have a variable meaning depending of the used protocol and are represented by an union. (network layer)
In the case of raw packets, the payload comes immediately after the hard_header.
Thanks,
Michael
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Quoted 31 lines · Michael Grzeschik
Quoted 9 lines · David Miller
From: Michael Grzeschik <[email protected]>
Date: Thu, 30 Jul 2015 15:34:36 +0200Quoted 6 lines
The commit <
9c7077622dd9> ("packet: makepacket_sndfail on len smaller than l2 header") adds the check for minimum packet length of the used l2. For arcnet the hardware header length is not the complete archdr which includes hard + soft header. This patch changes the length tosizeof(arc_hardware).Quoted 4 lines
Quoted 1 line
Signed-off-by Michael Grzeschik <[email protected]>The hard header len is used for other purposes as well, are you sure those don't get broken by this change?
Its meaning is to represent the amount of the hardware (link layer) data of one packet.
Which other purposes do you mean?
Can you point to some code?Quoted 4 lines
Code assumes that if the data at the SKB mac pointer is taken, for
dev->hard_header_lenbytes, that is exactly the link layer header. And that this can be used to compare two MAC headers, copy the MAC header from one packet to another, etc.The link layer size of arcnet is 4 bytes long. 1 byte source, 1 byte dest and two offset bytes. As described by struct
arc_hardwareinif_arcnet.h. The above condition is fulfilled when the mac pointer is 0.
Quoted 7 lines
The following pending bytes of struct archdr have a variable meaning depending of the used protocol and are represented by an union. (network layer)
In the case of raw packets, the payload comes immediately after the
hard_header.
Ping!
I have the cleanup patches from Joe Perches and several ARCNET patches on top, waiting to be posted on the list. What is your Opinion to my Maintainer Request I send some weeks ago?
Michael
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
David Miller
maintainerFrom: Michael Grzeschik <[email protected]>
Date: Wed, 16 Sep 2015 14:47:13 +0200
Quoted 3 lines
I have the cleanup patches from Joe Perches and several ARCNET patches on top, waiting to be posted on the list. What is your Opinion to my Maintainer Request I send some weeks ago?
Please just repost this patch anew, thanks.