82576EB IPSec offload and igb(4)
Hi! What is current status of IPSec offload support for Intel 82576EB Gigabit Ethernet controller in igb(4) driver? Eugene Grosbein ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
Re: Alloc Error Handling in lib/libc/rpc/svc.c
On Fri, Apr 27, 2012 at 05:48:06PM -0400, Matt Miller wrote: > In an OOM condition, we noticed a couple of mem_alloc handling bugs in > this file. Please let me know if a PR should be opened for these. > > - No NULL checks after mem_alloc()'s: > > SVCXPRT * > svc_xprt_alloc() > { > SVCXPRT *xprt; > SVCXPRT_EXT *ext; > > xprt = mem_alloc(sizeof(SVCXPRT)); > memset(xprt, 0, sizeof(SVCXPRT)); > ext = mem_alloc(sizeof(SVCXPRT_EXT)); > memset(ext, 0, sizeof(SVCXPRT_EXT)); > xprt->xp_p3 = ext; > ext->xp_auth.svc_ah_ops = &svc_auth_null_ops; > > return (xprt); > } > > - No lock release if mem_alloc() returns NULL: > > void > xprt_register(xprt) > SVCXPRT *xprt; > { > int sock; > > assert(xprt != NULL); > > sock = xprt->xp_fd; > > rwlock_wrlock(&svc_fd_lock); > if (__svc_xports == NULL) { > __svc_xports = (SVCXPRT **) > mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); > if (__svc_xports == NULL) > return; > memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); > } > if (sock < FD_SETSIZE) { > __svc_xports[sock] = xprt; > FD_SET(sock, &svc_fdset); > svc_maxfd = max(svc_maxfd, sock); > } > rwlock_unlock(&svc_fd_lock); > } Thank you for the report. Does the patch below look fine to you ? diff --git a/lib/libc/rpc/svc.c b/lib/libc/rpc/svc.c index 282c2be..78a8ae1 100644 --- a/lib/libc/rpc/svc.c +++ b/lib/libc/rpc/svc.c @@ -108,8 +108,10 @@ xprt_register(xprt) if (__svc_xports == NULL) { __svc_xports = (SVCXPRT **) mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); - if (__svc_xports == NULL) + if (__svc_xports == NULL) { + rwlock_unlock(&svc_fd_lock); return; + } memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); } if (sock < FD_SETSIZE) { @@ -565,8 +567,14 @@ svc_xprt_alloc() SVCXPRT_EXT *ext; xprt = mem_alloc(sizeof(SVCXPRT)); + if (xprt == NULL) + return (NULL); memset(xprt, 0, sizeof(SVCXPRT)); ext = mem_alloc(sizeof(SVCXPRT_EXT)); + if (ext == NULL) { + mem_free(xprt, sizeof(SVCXPRT)); + return (NULL); + } memset(ext, 0, sizeof(SVCXPRT_EXT)); xprt->xp_p3 = ext; ext->xp_auth.svc_ah_ops = &svc_auth_null_ops; diff --git a/lib/libc/rpc/svc_raw.c b/lib/libc/rpc/svc_raw.c index 67bcba1..de95152 100644 --- a/lib/libc/rpc/svc_raw.c +++ b/lib/libc/rpc/svc_raw.c @@ -96,10 +96,22 @@ svc_raw_create() mutex_unlock(&svcraw_lock); return (NULL); } - if (__rpc_rawcombuf == NULL) + if (__rpc_rawcombuf == NULL) { __rpc_rawcombuf = calloc(UDPMSGSIZE, sizeof (char)); + if (__rpc_rawcombuf == NULL) { + free(srp); + mutex_unlock(&svcraw_lock); + return (NULL); + } + } srp->raw_buf = __rpc_rawcombuf; /* Share it with the client */ srp->server = svc_xprt_alloc(); + if (srp->server == NULL) { + free(__rpc_rawcombuf); + free(srp); + mutex_unlock(&svcraw_lock); + return (NULL); + } svc_raw_private = srp; } srp->server->xp_fd = FD_SETSIZE; pgpme1qB0yumP.pgp Description: PGP signature
Re: Intel 10 GbE cards (ixgbe)
for now 6G in production On Fri, Apr 27, 2012 at 4:32 PM, Barney Cordoba wrote: > How much traffic are you passing during peak times? > > --- On Wed, 4/25/12, Sami Halabi wrote: > > > From: Sami Halabi > > Subject: Re: Intel 10 GbE cards (ixgbe) > > To: "Takuya ASADA" > > Cc: freebsd-net@freebsd.org, "Marko Zec" > > Date: Wednesday, April 25, 2012, 10:13 AM > > Hi, > > I have it running on fbsd-8.1-r for more than 1.5 years now > > without issues, > > i had problem when i first installed it, but they were > > disappeared when i > > installed 2.3.8 driver, today there is 2.4 versionon > > stable. > > > > Sami > > > > On Wed, Apr 25, 2012 at 2:25 PM, Takuya ASADA > > wrote: > > > > > Hi Marko, > > > > > > I had working on bpf multiqueue support with 82599 in > > last year(on > > > -CURRENT), there's no issue for me. > > > > > > > http://freebsd.1045724.n5.nabble.com/Multiqueue-support-for-bpf-td4703899.html > > > > > > Takuya ASADA > > > > > > 2012/4/25 Marko Zec : > > > > Hi all, > > > > > > > > Although the ixgbe driver appears to have code for > > both 82598 and 82599 > > > > chipsets, the manual page stil lists only 82598 > > based cards as officially > > > > supported. Does anybody have first-hand > > experiences with 82599 based > > > cards > > > > and recent versions of the ixgbe driver (-CURRENT, > > 9.0, 8.3)? > > > > > > > > Thanks, > > > > > > > > Marko > > > > ___ > > > > freebsd-net@freebsd.org > > mailing list > > > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > > > To unsubscribe, send any mail to " > freebsd-net-unsubscr...@freebsd.org" > > > ___ > > > freebsd-net@freebsd.org > > mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > > To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org" > > > > > > > > > > > -- > > Sami Halabi > > Information Systems Engineer > > NMS Projects Expert > > ___ > > freebsd-net@freebsd.org > > mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org" > > > -- Sami Halabi Information Systems Engineer NMS Projects Expert ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"