DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/tap: fix the protocol field for non ip
@ 2018-04-13  5:58 Vipin Varghese
  2018-04-17 17:45 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Vipin Varghese @ 2018-04-13  5:58 UTC (permalink / raw)
  To: dev, ophirmu; +Cc: pascal.mazon, ferruh.yigit, Vipin Varghese

When non IP packets are sent on TUN interface, the logic put Ipv6 as
protocol field in header. With the current patch, the check is modified
for ipv4, ipv6 and non ip.

Fixes: 5a3efcfffd06 ("net/tap: add tun support")
Cc: vipin.varghese@intel.com

Suggested-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 915d937..66e026f 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -526,8 +526,8 @@ enum ioctl_mode {
 		 */
 		char *buff_data = rte_pktmbuf_mtod(seg, void *);
 		j = (*buff_data & 0xf0);
-		if (j & (0x40 | 0x60))
-			pi.proto = (j == 0x40) ? 0x0008 : 0xdd86;
+		pi.proto = (j == 0x40) ? 0x0008 :
+				(j == 0x60) ? 0xdd86 : 0x00;
 
 		iovecs[0].iov_base = &pi;
 		iovecs[0].iov_len = sizeof(pi);
-- 
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/tap: fix the protocol field for non ip
  2018-04-13  5:58 [dpdk-dev] [PATCH] net/tap: fix the protocol field for non ip Vipin Varghese
@ 2018-04-17 17:45 ` Ferruh Yigit
  2018-04-17 17:48   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2018-04-17 17:45 UTC (permalink / raw)
  To: Vipin Varghese, dev, ophirmu; +Cc: pascal.mazon

On 4/13/2018 6:58 AM, Vipin Varghese wrote:
> When non IP packets are sent on TUN interface, the logic put Ipv6 as
> protocol field in header. With the current patch, the check is modified
> for ipv4, ipv6 and non ip.
> 
> Fixes: 5a3efcfffd06 ("net/tap: add tun support")
> Cc: vipin.varghese@intel.com
> 
> Suggested-by: Ophir Munk <ophirmu@mellanox.com>
> Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/tap: fix the protocol field for non ip
  2018-04-17 17:45 ` Ferruh Yigit
@ 2018-04-17 17:48   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-04-17 17:48 UTC (permalink / raw)
  To: Vipin Varghese, dev, ophirmu; +Cc: pascal.mazon

On 4/17/2018 6:45 PM, Ferruh Yigit wrote:
> On 4/13/2018 6:58 AM, Vipin Varghese wrote:
>> When non IP packets are sent on TUN interface, the logic put Ipv6 as
>> protocol field in header. With the current patch, the check is modified
>> for ipv4, ipv6 and non ip.
>>
>> Fixes: 5a3efcfffd06 ("net/tap: add tun support")

Fixes: 204d026a3922 ("net/tap: support tun")

>> Cc: vipin.varghese@intel.com
>>
>> Suggested-by: Ophir Munk <ophirmu@mellanox.com>
>> Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-17 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-13  5:58 [dpdk-dev] [PATCH] net/tap: fix the protocol field for non ip Vipin Varghese
2018-04-17 17:45 ` Ferruh Yigit
2018-04-17 17:48   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).