On Nov 18, 2010 8:35am, Eric Leblond <eleblond@edenwall.com> wrote:<br />> Hi,<br />> <br />> <br />> <br />> Le jeudi 18 novembre 2010 à 14:30 +0100, Victor Julien a écrit :<br />> <br />> > Robert Kerr wrote:<br />> <br />> > > On Tue, 2010-11-16 at 23:00 +0100, Eric Leblond wrote:<br />> <br />> > >> Hi,<br />> <br />> > ><br />> <br />> > >> Here's a new version of the patchset which mainly does a renaming<br />> <br />> > >> of the function and increase the maximum packet size to 1514.<br />> <br />> > ><br />> <br />> > > I don't know if this is possible without adding to the complexity of<br />> <br />> > > things a lot, but could this max packet size be configured at runtime?<br />> <br />> > ><br />> <br />> > > It seems clear that the value should be either the same as or slightly<br />> <br />> > > higher than the MTU of the link suricata is monitoring. The problem is<br />> <br />> > > this may not be known at compile time - by fixing at 1514 you optimise<br />> <br />> > > for ethernet, but there are various other possibilities. SONET has an<br />> <br />> > > MTU around the 4000 mark, as does FDDI, and ethernet with jumbo frames<br />> <br />> > > is vendor specific but often around the 9000 mark.<br />> <br />> ><br />> <br />> > I agree with you Robert, this would be very useful.<br />> <br />> <br />> <br />> I will try to do something, this is really true that recompiling<br />> <br />> suricata to have good performance on jumbo frame is not something<br />> <br />> exiting.<br />> <br />> <br />> <br />> BR,<br />> <br />> --<br />> <br />> Éric Leblond, eleblond@edenwall.com<br />> <br />> Téléphone : +33 1 40 24 65 04, Fax : +33 9 57 21 48 75<br />> <br />> EdenWall, http://www.edenwall.com<br />><br /><br />Is it possible to check the MTU on the listening interface and set it that way? I don't know if all devices support it or whether it would be headache to manage cross platform. I can see where pcap-snoop has a method to get the MTU for IRIX interfaces.<br /><br />http://www.opensource.apple.com/source/libpcap/libpcap-18/libpcap/pcap-snoop.c<br /><br />#ifdef SIOCGIFMTU<br />  /*<br />   * XXX - IRIX appears to give you an error if you try to set the<br />     * capture length to be greater than the MTU, so let's try to get<br />        * the MTU first and, if that succeeds, trim the snap length<br />         * to be no greater than the MTU.<br />    */<br /> (void)strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name));<br />  if (ioctl(fd, SIOCGIFMTU, (char *)&ifr) < 0) {<br />               snprintf(ebuf, PCAP_ERRBUF_SIZE, "SIOCGIFMTU: %s",<br />                    pcap_strerror(errno));<br />          goto bad;<br />   }<br />   /*