-/* $OpenBSD: if_bnxt.c,v 1.48 2024/04/12 19:27:43 jan Exp $ */
+/* $OpenBSD: if_bnxt.c,v 1.49 2024/05/07 18:35:23 jan Exp $ */
/*-
* Broadcom NetXtreme-C/E network driver.
*
uint32_t paylen;
ether_extract_headers(m, &ext);
- if (ext.tcp) {
+ if (ext.tcp && m->m_pkthdr.ph_mss > 0) {
lflags |= TX_BD_LONG_LFLAGS_LSO;
hdrsize = sizeof(*ext.eh);
if (ext.ip4 || ext.ip6)
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.374 2024/02/16 22:30:54 mglocker Exp $ */
+/* $OpenBSD: if_em.c,v 1.375 2024/05/07 18:35:23 jan Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
#endif
ether_extract_headers(mp, &ext);
- if (ext.tcp == NULL)
+ if (ext.tcp == NULL || mp->m_pkthdr.ph_mss == 0)
goto out;
vlan_macip_lens |= (sizeof(*ext.eh) << E1000_ADVTXD_MACLEN_SHIFT);
-/* $OpenBSD: if_igc.c,v 1.22 2024/05/06 04:25:52 dlg Exp $ */
+/* $OpenBSD: if_igc.c,v 1.23 2024/05/07 18:35:23 jan Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
}
if (ISSET(mp->m_pkthdr.csum_flags, M_TCP_TSO)) {
- if (ext.tcp) {
+ if (ext.tcp && mp->m_pkthdr.ph_mss > 0) {
uint32_t hdrlen, thlen, paylen, outlen;
thlen = ext.tcphlen;
-/* $OpenBSD: if_ix.c,v 1.212 2024/05/01 10:43:42 jan Exp $ */
+/* $OpenBSD: if_ix.c,v 1.213 2024/05/07 18:35:23 jan Exp $ */
/******************************************************************************
}
if (mp->m_pkthdr.csum_flags & M_TCP_TSO) {
- if (ext.tcp) {
+ if (ext.tcp && mp->m_pkthdr.ph_mss > 0) {
uint32_t hdrlen, thlen, paylen, outlen;
thlen = ext.tcphlen;
-/* $OpenBSD: if_ixl.c,v 1.98 2024/04/12 19:27:43 jan Exp $ */
+/* $OpenBSD: if_ixl.c,v 1.99 2024/05/07 18:35:23 jan Exp $ */
/*
* Copyright (c) 2013-2015, Intel Corporation
}
if (ISSET(m0->m_pkthdr.csum_flags, M_TCP_TSO)) {
- if (ext.tcp) {
+ if (ext.tcp && m0->m_pkthdr.ph_mss > 0) {
struct ixl_tx_desc *ring, *txd;
uint64_t cmd = 0, paylen, outlen;
-/* $OpenBSD: if_vmx.c,v 1.83 2024/04/02 20:59:48 jan Exp $ */
+/* $OpenBSD: if_vmx.c,v 1.84 2024/05/07 18:35:23 jan Exp $ */
/*
* Copyright (c) 2013 Tsubai Masanari
* TCP Segmentation Offload
*/
- if (ext.tcp == NULL) {
+ if (ext.tcp == NULL || m->m_pkthdr.ph_mss == 0) {
tcpstat_inc(tcps_outbadtso);
return;
}
-/* $OpenBSD: if_vio.c,v 1.32 2024/04/10 19:55:50 jan Exp $ */
+/* $OpenBSD: if_vio.c,v 1.33 2024/05/07 18:35:23 jan Exp $ */
/*
* Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg.
if (!ISSET(m->m_pkthdr.csum_flags, M_TCP_TSO))
return;
- if (!ext.tcp) {
+ if (!ext.tcp || m->m_pkthdr.ph_mss == 0) {
tcpstat_inc(tcps_outbadtso);
return;
}