[Differential] D19422: if_vxlan(4) Allow set MTU more than 1500 bytes.

2019-07-15 Thread aleksandr.fedorov_itglobal.com (Aleksandr Fedorov)
aleksandr.fedorov_itglobal.com updated this revision to Diff 59753.
aleksandr.fedorov_itglobal.com added a comment.


  VXLAN encapsulate ethernet frames within UDP/IP packets. So, we can calculate 
maximum overhead for IPv4:
  
  - IP_MAXPACKET = 65K - constant from netinet/ip.h.
  - Maximum IP header length IP_MAX_HDR_LEN (There is no suitable constant for 
it.) = 60 as the Internet Header Length field is the unsigned 4-bit number of 
32-bit words - 15 * 32 = 480 bit = 60 bytes.
  - sizeof(struct udphdr) = 8 bytes.
  - sizeof(struct vxlan_header) = 8 bytes.
  - Inner frame ETHER_HDR_LEN = 14 bytes.
  - Inner frame ETHER_CRC_LEN = 4 bytes.
  - Inner frame ETHER_VLAN_ENCAP_LEN = 4 bytes.
  
  The result VXLAN_MAX_MTU = IP_MAXPACKET - IP_MAX_HDR_LEN - sizeof(struct 
udphdr) - sizeof(struct vxlan_header) - ETHER_HDR_LEN - ETHER_CRC_LEN - 
ETHER_VLAN_ENCAP_LEN = 65535 - 60 - 8 - 8 - 14 - 4 - 4 = 65437
  So overhead is 98 bytes.
  
  Unfortunately for IPv6, the maximum header length is not fixed and can be 
extended in the future. It is usually 40 bytes.
  
  Revision changes:
  
  - Calculate VXLAN_MAX_MTU using existing constants.

CHANGES SINCE LAST UPDATE
  https://reviews.freebsd.org/D19422?vs=59684&id=59753

CHANGES SINCE LAST ACTION
  https://reviews.freebsd.org/D19422/new/

REVISION DETAIL
  https://reviews.freebsd.org/D19422

AFFECTED FILES
  sys/net/if_vxlan.c

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: aleksandr.fedorov_itglobal.com, bryanv, hrs, #network, rgrimes, krion, jhb
Cc: evgueni.gavrilov_itglobal.com, olevole_olevole.ru, ae, freebsd-net-list, 
krzysztof.galazka_intel.com
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -84,6 +84,15 @@
 	int vxlsomc_users;
 };
 
+/*
+ * The maximum MTU of encapsulated ethernet frame within IPv4/UDP packet.
+ */
+#define VXLAN_MAX_MTU	(IP_MAXPACKET - \
+		60 /* Maximum IPv4 header len */ - \
+		sizeof(struct udphdr) - \
+		sizeof(struct vxlan_header) - \
+		ETHER_HDR_LEN - ETHER_CRC_LEN - ETHER_VLAN_ENCAP_LEN)
+
 #define VXLAN_SO_MC_MAX_GROUPS		32
 
 #define VXLAN_SO_VNI_HASH_SHIFT		6
@@ -2247,10 +2256,11 @@
 	ifr = (struct ifreq *) data;
 	ifd = (struct ifdrv *) data;
 
+	error = 0;
+
 	switch (cmd) {
 	case SIOCADDMULTI:
 	case SIOCDELMULTI:
-		error = 0;
 		break;
 
 	case SIOCGDRVSPEC:
@@ -2267,6 +2277,13 @@
 		error = ifmedia_ioctl(ifp, ifr, &sc->vxl_media, cmd);
 		break;
 
+	case SIOCSIFMTU:
+		if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > VXLAN_MAX_MTU)
+			error = EINVAL;
+		else
+			ifp->if_mtu = ifr->ifr_mtu;
+		break;
+
 	default:
 		error = ether_ioctl(ifp, cmd, data);
 		break;
@@ -2747,8 +2764,8 @@
 	ifp->if_ioctl = vxlan_ioctl;
 	ifp->if_transmit = vxlan_transmit;
 	ifp->if_qflush = vxlan_qflush;
-	ifp->if_capabilities |= IFCAP_LINKSTATE;
-	ifp->if_capenable |= IFCAP_LINKSTATE;
+	ifp->if_capabilities |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU;
+	ifp->if_capenable |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU;
 
 	ifmedia_init(&sc->vxl_media, 0, vxlan_media_change, vxlan_media_status);
 	ifmedia_add(&sc->vxl_media, IFM_ETHER | IFM_AUTO, 0, NULL);

___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Differential] D19422: if_vxlan(4) Allow set MTU more than 1500 bytes.

2019-07-15 Thread aleksandr.fedorov_itglobal.com (Aleksandr Fedorov)
aleksandr.fedorov_itglobal.com marked an inline comment as done.

CHANGES SINCE LAST ACTION
  https://reviews.freebsd.org/D19422/new/

REVISION DETAIL
  https://reviews.freebsd.org/D19422

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: aleksandr.fedorov_itglobal.com, bryanv, hrs, #network, rgrimes, krion, jhb
Cc: evgueni.gavrilov_itglobal.com, olevole_olevole.ru, ae, freebsd-net-list, 
krzysztof.galazka_intel.com
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 239216] Problem with ix(4) driver on systems with two Intel X520 cards

2019-07-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239216

Mark Linimon  changed:

   What|Removed |Added

   Assignee|ports-b...@freebsd.org  |n...@freebsd.org

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 239224] Virtual Interface: Not Working in Netmap Mode on 11.3 STABLE

2019-07-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239224

Mark Linimon  changed:

   What|Removed |Added

   Keywords||regression
   Assignee|b...@freebsd.org|n...@freebsd.org

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 239224] Virtual Interface: Not Working in Netmap Mode on 11.3 STABLE

2019-07-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239224

--- Comment #1 from Vincenzo Maffione  ---
Hi,
  Maybe you hit the bug introduced by r349922 (fixed in HEAD, will MFC today)?
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238642 
Can you check if the stack trace is the same?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 239224] Virtual Interface: Not Working in Netmap Mode on 11.3 STABLE

2019-07-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239224

--- Comment #2 from Charles Goncalves  ---
(In reply to Vincenzo Maffione from comment #1)
Yeah it’s the same bug when a run command like Aleksandr Fedorov:

root@current:~ # ifconfig vlan0 create up   
root@current:~ # vale-ctl -a vale0:vlan0


I’m running on FreeBSD 11.3-STABLE #0 r349942

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Differential] D19422: if_vxlan(4) Allow set MTU more than 1500 bytes.

2019-07-15 Thread jhb (John Baldwin)
jhb accepted this revision.
jhb added a comment.
This revision is now accepted and ready to land.


  Thanks!

CHANGES SINCE LAST ACTION
  https://reviews.freebsd.org/D19422/new/

REVISION DETAIL
  https://reviews.freebsd.org/D19422

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: aleksandr.fedorov_itglobal.com, bryanv, hrs, #network, rgrimes, krion, jhb
Cc: evgueni.gavrilov_itglobal.com, olevole_olevole.ru, ae, freebsd-net-list, 
krzysztof.galazka_intel.com
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 238796] ipfilter: fix unremovable rules and rules checksum for comparison

2019-07-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238796

Cy Schubert  changed:

   What|Removed |Added

 Attachment #205744|0   |1
is obsolete||

--- Comment #20 from Cy Schubert  ---
Created attachment 205808
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=205808&action=edit
Removal of all listed patches.

I've cleaned up some of the pointer arithmetic in fil.c and ip_state.c (my last
three commits), which have resolved another issue but also resolve this one.
Please svnup to the latest -current and try reproducing the bug again (without
any other patches applied).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 239224] Virtual Interface: Not Working in Netmap Mode on 11.3 STABLE

2019-07-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239224

Vincenzo Maffione  changed:

   What|Removed |Added

 Status|New |In Progress

--- Comment #3 from Vincenzo Maffione  ---
I just committed the fix as r350007.
Can you please try again?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 239224] Virtual Interface: Not Working in Netmap Mode on 11.3 STABLE

2019-07-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239224

Kubilay Kocak  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
   Assignee|n...@freebsd.org |vmaffi...@freebsd.org
 Status|In Progress |Closed

--- Comment #4 from Kubilay Kocak  ---
Panic report & regression reported in bug 238642 (which was/is still open at
the time of this report), so close this as a duplicate

*** This bug has been marked as a duplicate of bug 238642 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 238642] netmap: fix kernel pointer printing in netmap_generic.c

2019-07-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238642

Kubilay Kocak  changed:

   What|Removed |Added

 CC||halfl...@halfling.com.br

--- Comment #7 from Kubilay Kocak  ---
*** Bug 239224 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 238642] netmap: fix kernel pointer printing in netmap_generic.c

2019-07-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238642

--- Comment #8 from Kubilay Kocak  ---
Regression fix committed in base r349966 MFC'd to stable/11 in base r350007 and
stable/12 in base r350006

@Vincenzo If you could include PR: references in all commits (and mfc's) where
possible that would be great!

If this is now resolved, (no further commits needed), please set mfc-stable*
flags to + where appropriate and close issue at your leisure

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Differential] D19422: if_vxlan(4) Allow set MTU more than 1500 bytes.

2019-07-15 Thread aleksandr.fedorov_itglobal.com (Aleksandr Fedorov)
aleksandr.fedorov_itglobal.com added a comment.


  Can anyone commit this patch?

CHANGES SINCE LAST ACTION
  https://reviews.freebsd.org/D19422/new/

REVISION DETAIL
  https://reviews.freebsd.org/D19422

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: aleksandr.fedorov_itglobal.com, bryanv, hrs, #network, rgrimes, krion, jhb
Cc: evgueni.gavrilov_itglobal.com, olevole_olevole.ru, ae, freebsd-net-list, 
krzysztof.galazka_intel.com
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 235787] ixgbe no carrier problem - TX(7) desc avail = 2048, pidx = 0

2019-07-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235787

Richard Gallamore  changed:

   What|Removed |Added

   See Also||https://bugs.freebsd.org/bu
   ||gzilla/show_bug.cgi?id=2392
   ||40

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 239240] igb: TX(2) desc avail = 1024, pidx = 0

2019-07-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239240

Richard Gallamore  changed:

   What|Removed |Added

   Assignee|b...@freebsd.org|n...@freebsd.org

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"