On 26.03.2014, at 03:33, Christopher Forgeron <csforge...@gmail.com> wrote:
> On Tue, Mar 25, 2014 at 8:21 PM, Markus Gebert > <markus.geb...@hostpoint.ch>wrote: > >> >> >> Is 65517 correct? With Ricks patch, I get this: >> >> dev.ix.0.hw_tsomax: 65518 >> > > Perhaps a difference between 9.2 and 10 for one of the macros? My code is: > > ifp->if_hw_tsomax = IP_MAXPACKET - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); > printf("CSF - 3 Init, ifp->if_hw_tsomax = %d\n", ifp->if_hw_tsomax); Hm, I’m using Rick’s patch: if ((adapter->num_segs * MCLBYTES - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)) < IP_MAXPACKET) ifp->if_hw_tsomax = adapter->num_segs * MCLBYTES - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); > (BTW, you should submit the hw_tsomax sysctl patch, that's useful to others) My patch added a sysctl that is writable, but if I got this right if_hw_tsomax is not expected to change after the interface is attached. That’s why I didn’t post it. But here’s a read-only version: --- sys/dev/ixgbe/ixgbe.c 2013-12-19 14:24:10.624279412 +0100 +++ sys/dev/ixgbe/ixgbe.c 2014-03-27 15:00:59.503424634 +0100 @@ -577,6 +582,12 @@ if (ixgbe_setup_interface(dev, adapter) != 0) goto err_late; + /* add interface to hw_tsomax */ + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "hw_tsomax", CTLTYPE_INT|CTLFLAG_RD, + &adapter->ifp->if_hw_tsomax, 1, "hardware TSO limit"); + /* Initialize statistics */ ixgbe_update_stats_counters(adapter); >> Also the dtrace command you used excludes 65518... >> > > Oh, I thought it was giving every packet that is greater than or equal to > 65518 - Could you show me the proper command? That's the third time I've > used dtrace, so I'm making this up as I go. :-) No, what looks like a comment (between slashes) are conditions in dtrace: dtrace -n 'fbt::tcp_output:entry / args[0]->t_tsomax != 0 && args[0]->t_tsomax != 65518 / { printf("unexpected tp->t_tsomax: %i\n", args[0]->t_tsomax); stack(); }’ You have to read the above like this: - fbt::tcp_output:entry -> Add a probe to the beginning of the kernel function tcp_output() - / args[0]->t_tsomax != 0 && args[0]->t_tsomax != 65518 / -> only match if t_tsomax is neither 0 nor 65518 (args[0] is struct tcpcb in case of tcp_output()) - { printf("unexpected tp->t_tsomax: %i\n", args[0]->t_tsomax); stack(); } -> this is only executed if the probe matched and the condition were true. It that case a t_tsomax gets printed and a stack trace is generated In your case, you stated that your if_hw_tsomax is 65517. Since my version of the dtrace one-liner does _not_ ignore 65517, you should have seen a lot of output, which you didn’t mention (you’ve just posted dtrace output that was generated from bce interfaces). That’s why I thought 65517 was a typo on your part, and I wanted to clarify that. Markus _______________________________________________ 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"