RE: Invalid transport_offset with AF_PACKET socket

2018-11-29 Thread Maxim Mikityanskiy
> > > So it should return at least 18 and not 14. > > > > Yes, the function does its best to return at least 18, but it silently > expects > > skb_transport_offset to exceed 18. In normal conditions, it will be more > that > > 18, because it will be at least 14 + 20. But in my case, when I send a

Re: Invalid transport_offset with AF_PACKET socket

2018-11-29 Thread Saeed Mahameed
On Wed, Nov 28, 2018 at 3:10 AM Maxim Mikityanskiy wrote: > > Hi Saeed, > > > Can you elaborate more, what NIC? what configuration ? what do you mean > > by confusion, anyway please see below > > ConnectX-4, after running `mlnx_qos -i eth1 --trust dscp`, which sets inline > mode 2

RE: Invalid transport_offset with AF_PACKET socket

2018-11-28 Thread Maxim Mikityanskiy
Hi Saeed, > Can you elaborate more, what NIC? what configuration ? what do you mean > by confusion, anyway please see below ConnectX-4, after running `mlnx_qos -i eth1 --trust dscp`, which sets inline mode 2 (MLX5_INLINE_MODE_IP). I'll explain what I mean by confusion below. > in mlx5 with

RE: Invalid transport_offset with AF_PACKET socket

2018-11-28 Thread Maxim Mikityanskiy
Hi Willem, > That is not what offset_hint 0 does. It also sets the transport header > to the same as the network header. No, it's not accurate. With offset_hint == 0 I have the transport header set to the offset of the mac header. It's impossible that both offset_hint == 0 and 14 set

Re: Invalid transport_offset with AF_PACKET socket

2018-11-27 Thread Saeed Mahameed
On Tue, 2018-11-27 at 10:00 +, Maxim Mikityanskiy wrote: > Hi everyone, > > We are experiencing an issue with Mellanox mlx5 driver, and I tracked > it down to > the packet_snd function in net/packet/af_packet.c. > > Brief description: when a socket is created by calling > `socket(AF_PACKET,

Re: Invalid transport_offset with AF_PACKET socket

2018-11-27 Thread Willem de Bruijn
On Tue, Nov 27, 2018 at 6:08 PM Willem de Bruijn wrote: > > On Tue, Nov 27, 2018 at 3:32 PM Willem de Bruijn > wrote: > > > > On Tue, Nov 27, 2018 at 2:58 PM Willem de Bruijn > > wrote: > > > > > > On Tue, Nov 27, 2018 at 1:41 PM Maxim Mikityanskiy > > > wrote: > > > > > > > > Hi everyone, >

Re: Invalid transport_offset with AF_PACKET socket

2018-11-27 Thread Willem de Bruijn
On Tue, Nov 27, 2018 at 3:32 PM Willem de Bruijn wrote: > > On Tue, Nov 27, 2018 at 2:58 PM Willem de Bruijn > wrote: > > > > On Tue, Nov 27, 2018 at 1:41 PM Maxim Mikityanskiy > > wrote: > > > > > > Hi everyone, > > > > > > We are experiencing an issue with Mellanox mlx5 driver, and I tracked

Re: Invalid transport_offset with AF_PACKET socket

2018-11-27 Thread Willem de Bruijn
On Tue, Nov 27, 2018 at 2:58 PM Willem de Bruijn wrote: > > On Tue, Nov 27, 2018 at 1:41 PM Maxim Mikityanskiy > wrote: > > > > Hi everyone, > > > > We are experiencing an issue with Mellanox mlx5 driver, and I tracked it > > down to > > the packet_snd function in net/packet/af_packet.c. > > >

Re: Invalid transport_offset with AF_PACKET socket

2018-11-27 Thread Willem de Bruijn
On Tue, Nov 27, 2018 at 1:41 PM Maxim Mikityanskiy wrote: > > Hi everyone, > > We are experiencing an issue with Mellanox mlx5 driver, and I tracked it down > to > the packet_snd function in net/packet/af_packet.c. > > Brief description: when a socket is created by calling `socket(AF_PACKET, >

Invalid transport_offset with AF_PACKET socket

2018-11-27 Thread Maxim Mikityanskiy
Hi everyone, We are experiencing an issue with Mellanox mlx5 driver, and I tracked it down to the packet_snd function in net/packet/af_packet.c. Brief description: when a socket is created by calling `socket(AF_PACKET, SOCK_RAW, 0)`, the mlx5 driver receives an skb with wrong transport_offset,