<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/mxge, branch stable/10</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>MFC r329295:</title>
<updated>2018-02-22T19:40:03+00:00</updated>
<author>
<name>Ravi Pokala</name>
<email>rpokala@FreeBSD.org</email>
</author>
<published>2018-02-22T19:40:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0ae5770513d3bba104a4bd72e94fc31c8d4b65f5'/>
<id>0ae5770513d3bba104a4bd72e94fc31c8d4b65f5</id>
<content type='text'>
Panasas discovered that ioctl(SIOCGLAGGPORT) returns ENOTTY for mxge(4) when
the NIC is not a member of a lagg. This came as a surprise, because the
SIOCGLAGGPORT handler in if_lagg.c only returns ENOENT (if run against the
laggX interface, rather than a physical port) or EINVAL (if run against a
non-member physical port). This behavior was not seen with other drivers,
such as bge(4), igb(4), and cxl(4). When I compared their respective ioctl
handlers, I found that they all called ether_ioctl() for the default (i.e.
unhandled) case; by contrast, mxge(4) only calls ether_ioctl() for two
specific cases, and returns ENOTTY for the default case.

Remove the two cases which explicitly call ether_ioctl(), and let the
default case call it instead. This matches what the vast majority of the NIC
drivers do.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Panasas discovered that ioctl(SIOCGLAGGPORT) returns ENOTTY for mxge(4) when
the NIC is not a member of a lagg. This came as a surprise, because the
SIOCGLAGGPORT handler in if_lagg.c only returns ENOENT (if run against the
laggX interface, rather than a physical port) or EINVAL (if run against a
non-member physical port). This behavior was not seen with other drivers,
such as bge(4), igb(4), and cxl(4). When I compared their respective ioctl
handlers, I found that they all called ether_ioctl() for the default (i.e.
unhandled) case; by contrast, mxge(4) only calls ether_ioctl() for two
specific cases, and returns ENOTTY for the default case.

Remove the two cases which explicitly call ether_ioctl(), and let the
default case call it instead. This matches what the vast majority of the NIC
drivers do.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC 299506</title>
<updated>2016-06-21T06:56:09+00:00</updated>
<author>
<name>Sepherosa Ziehau</name>
<email>sephe@FreeBSD.org</email>
</author>
<published>2016-06-21T06:56:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a21e49d61fe5a65ef87b9d4ed095b8c372ce4ec1'/>
<id>a21e49d61fe5a65ef87b9d4ed095b8c372ce4ec1</id>
<content type='text'>
    mxge: Setup mbuf flowid before calling tcp_lro_rx().

    Reviewed by:        gallatin
    MFC after:  1 week
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D6320
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    mxge: Setup mbuf flowid before calling tcp_lro_rx().

    Reviewed by:        gallatin
    MFC after:  1 week
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D6320
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r275358 r275483 r276982 - Removing M_FLOWID by hps@</title>
<updated>2015-04-24T23:26:44+00:00</updated>
<author>
<name>Hiren Panchasara</name>
<email>hiren@FreeBSD.org</email>
</author>
<published>2015-04-24T23:26:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8978b18bf3d25d96694ee2c9f5d4a411c1b57a44'/>
<id>8978b18bf3d25d96694ee2c9f5d4a411c1b57a44</id>
<content type='text'>
r275358:
Start process of removing the use of the deprecated "M_FLOWID" flag
from the FreeBSD network code. The flag is still kept around in the
"sys/mbuf.h" header file, but does no longer have any users. Instead
the "m_pkthdr.rsstype" field in the mbuf structure is now used to
decide the meaning of the "m_pkthdr.flowid" field. To modify the
"m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX"
macros as defined in the "sys/mbuf.h" header file.

This patch introduces new behaviour in the transmit direction.
Previously network drivers checked if "M_FLOWID" was set in "m_flags"
before using the "m_pkthdr.flowid" field. This check has now now been
replaced by checking if "M_HASHTYPE_GET(m)" is different from
"M_HASHTYPE_NONE". In the future more hashtypes will be added, for
example hashtypes for hardware dedicated flows.

"M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is
valid and has no particular type. This change removes the need for an
"if" statement in TCP transmit code checking for the presence of a
valid flowid value. The "if" statement mentioned above is now a direct
variable assignment which is then later checked by the respective
network drivers like before.

r275483:
Remove M_FLOWID from SCTP code.

r276982:
Remove no longer used "M_FLOWID" flag from mbuf.h and update the netisr
manpage.

Note: The FreeBSD version has been bumped.

Reviewed by:    hps, tuexen
Sponsored by:   Limelight Networks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
r275358:
Start process of removing the use of the deprecated "M_FLOWID" flag
from the FreeBSD network code. The flag is still kept around in the
"sys/mbuf.h" header file, but does no longer have any users. Instead
the "m_pkthdr.rsstype" field in the mbuf structure is now used to
decide the meaning of the "m_pkthdr.flowid" field. To modify the
"m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX"
macros as defined in the "sys/mbuf.h" header file.

This patch introduces new behaviour in the transmit direction.
Previously network drivers checked if "M_FLOWID" was set in "m_flags"
before using the "m_pkthdr.flowid" field. This check has now now been
replaced by checking if "M_HASHTYPE_GET(m)" is different from
"M_HASHTYPE_NONE". In the future more hashtypes will be added, for
example hashtypes for hardware dedicated flows.

"M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is
valid and has no particular type. This change removes the need for an
"if" statement in TCP transmit code checking for the presence of a
valid flowid value. The "if" statement mentioned above is now a direct
variable assignment which is then later checked by the respective
network drivers like before.

r275483:
Remove M_FLOWID from SCTP code.

r276982:
Remove no longer used "M_FLOWID" flag from mbuf.h and update the netisr
manpage.

Note: The FreeBSD version has been bumped.

Reviewed by:    hps, tuexen
Sponsored by:   Limelight Networks
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r263710, r273377, r273378, r273423 and r273455:</title>
<updated>2014-10-27T14:38:00+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2014-10-27T14:38:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d8d5d69aa6ecf430bc909103c271461db8cafb11'/>
<id>d8d5d69aa6ecf430bc909103c271461db8cafb11</id>
<content type='text'>
- De-vnet hash sizes and hash masks.
- Fix multiple issues related to arguments passed to SYSCTL macros.

Sponsored by:	Mellanox Technologies
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- De-vnet hash sizes and hash masks.
- Fix multiple issues related to arguments passed to SYSCTL macros.

Sponsored by:	Mellanox Technologies
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r258779,r258780,r258787,r258822:</title>
<updated>2014-02-04T03:36:42+00:00</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2014-02-04T03:36:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=eca45e57193faeac9fd7a519ed8aef106f2234b5'/>
<id>eca45e57193faeac9fd7a519ed8aef106f2234b5</id>
<content type='text'>
Fix undefined behavior: (1 &lt;&lt; 31) is not defined as 1 is an int and this
shifts into the sign bit.  Instead use (1U &lt;&lt; 31) which gets the
expected result.

Similar to the (1 &lt;&lt; 31) case it is not defined to do (2 &lt;&lt; 30).

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix undefined behavior: (1 &lt;&lt; 31) is not defined as 1 is an int and this
shifts into the sign bit.  Instead use (1U &lt;&lt; 31) which gets the
expected result.

Similar to the (1 &lt;&lt; 31) case it is not defined to do (2 &lt;&lt; 30).

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI</title>
<updated>2013-08-12T23:30:01+00:00</updated>
<author>
<name>Scott Long</name>
<email>scottl@FreeBSD.org</email>
</author>
<published>2013-08-12T23:30:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c68534f1d5bab4ad466384c4fb9bb2956811e8b9'/>
<id>c68534f1d5bab4ad466384c4fb9bb2956811e8b9</id>
<content type='text'>
command register.  The lazy BAR allocation code in FreeBSD sometimes
disables this bit when it detects a range conflict, and will re-enable
it on demand when a driver allocates the BAR.  Thus, the bit is no longer
a reliable indication of capability, and should not be checked.  This
results in the elimination of a lot of code from drivers, and also gives
the opportunity to simplify a lot of drivers to use a helper API to set
the busmaster enable bit.

This changes fixes some recent reports of disk controllers and their
associated drives/enclosures disappearing during boot.

Submitted by:	jhb
Reviewed by:	jfv, marius, achadd, achim
MFC after:	1 day
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
command register.  The lazy BAR allocation code in FreeBSD sometimes
disables this bit when it detects a range conflict, and will re-enable
it on demand when a driver allocates the BAR.  Thus, the bit is no longer
a reliable indication of capability, and should not be checked.  This
results in the elimination of a lot of code from drivers, and also gives
the opportunity to simplify a lot of drivers to use a helper API to set
the busmaster enable bit.

This changes fixes some recent reports of disk controllers and their
associated drives/enclosures disappearing during boot.

Submitted by:	jhb
Reviewed by:	jfv, marius, achadd, achim
MFC after:	1 day
</pre>
</div>
</content>
</entry>
<entry>
<title>- Correct mispellings of word resource</title>
<updated>2013-04-17T11:47:32+00:00</updated>
<author>
<name>Gabor Kovesdan</name>
<email>gabor@FreeBSD.org</email>
</author>
<published>2013-04-17T11:47:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b78540b1c760bfe90782ae8f92498119c0631283'/>
<id>b78540b1c760bfe90782ae8f92498119c0631283</id>
<content type='text'>
Submitted by:	Christoph Mallon &lt;christoph.mallon@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Submitted by:	Christoph Mallon &lt;christoph.mallon@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Several cleanups and fixes to mxge:</title>
<updated>2013-02-25T16:22:40+00:00</updated>
<author>
<name>Andrew Gallatin</name>
<email>gallatin@FreeBSD.org</email>
</author>
<published>2013-02-25T16:22:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=dedbe8362f4173d7fd1b6d9de1ef678d8f9d5bb5'/>
<id>dedbe8362f4173d7fd1b6d9de1ef678d8f9d5bb5</id>
<content type='text'>
- Remove vestigial null pointer tests after malloc(..., M_WAITOK).

- Remove vestigal qualhack union

- Use strlcpy() instead of the error-prone strncpy() when parsing
  EEPROM and copying strings

- Check the MAC address in the EEPROM strings more strictly.

- Expand the macro MXGE_NEXT_STRING() at its only user. Due to a typo,
  the macro was very confusing.

- Remove unnecessary buffer limit check.  The buffer is double-NUL
  terminated per construction.

PR:		kern/176369
Submitted by:	Christoph Mallon &lt;christoph.mallon gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Remove vestigial null pointer tests after malloc(..., M_WAITOK).

- Remove vestigal qualhack union

- Use strlcpy() instead of the error-prone strncpy() when parsing
  EEPROM and copying strings

- Check the MAC address in the EEPROM strings more strictly.

- Expand the macro MXGE_NEXT_STRING() at its only user. Due to a typo,
  the macro was very confusing.

- Remove unnecessary buffer limit check.  The buffer is double-NUL
  terminated per construction.

PR:		kern/176369
Submitted by:	Christoph Mallon &lt;christoph.mallon gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bump mxge copyright.</title>
<updated>2013-02-22T19:23:33+00:00</updated>
<author>
<name>Andrew Gallatin</name>
<email>gallatin@FreeBSD.org</email>
</author>
<published>2013-02-22T19:23:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cabc512fe4b1c162457bedc4937f1abe1d779f3d'/>
<id>cabc512fe4b1c162457bedc4937f1abe1d779f3d</id>
<content type='text'>
Sponsored by: Myricom

MFC After: 7 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sponsored by: Myricom

MFC After: 7 days
</pre>
</div>
</content>
</entry>
<entry>
<title>Improvements for newer mxge nics:</title>
<updated>2013-02-22T19:21:29+00:00</updated>
<author>
<name>Andrew Gallatin</name>
<email>gallatin@FreeBSD.org</email>
</author>
<published>2013-02-22T19:21:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a4b233dd068cda269db3fa9f8fe8479234a91730'/>
<id>a4b233dd068cda269db3fa9f8fe8479234a91730</id>
<content type='text'>
- Some mxge nics may store the serial number in the SN2 field of the
  EEPROM.  These will also have an SN=0 field, so parse the SN2 field,
  and give it precedence.

- Skip MXGEFW_CMD_UNALIGNED_TEST on mxge nics which do not require it.
  This saves roughly 10ms per port at device attach time.

Sponsored by: Myricom

MFC After: 7 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Some mxge nics may store the serial number in the SN2 field of the
  EEPROM.  These will also have an SN=0 field, so parse the SN2 field,
  and give it precedence.

- Skip MXGEFW_CMD_UNALIGNED_TEST on mxge nics which do not require it.
  This saves roughly 10ms per port at device attach time.

Sponsored by: Myricom

MFC After: 7 days
</pre>
</div>
</content>
</entry>
</feed>
