<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/ethernet/intel/igc, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-02-09T07:03:48Z</updated>
<entry>
<title>igc: Use struct_size() helper</title>
<updated>2019-02-09T07:03:48Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-02-08T04:19:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=196d7311fab5941b1bc883471c7f46350fa1a797'/>
<id>urn:sha1:196d7311fab5941b1bc883471c7f46350fa1a797</id>
<content type='text'>
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct foo {
    int stuff;
    struct boo entry[];
};

size = sizeof(struct foo) + count * sizeof(struct boo);
instance = kzalloc(size, GFP_KERNEL)

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL)

Notice that, in this case, variable size is not necessary, hence
it is removed.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>igc: Add ethtool support</title>
<updated>2019-02-06T01:35:46Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2019-01-30T17:13:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8c5ad0dae93c9931dc32b9f4a98e73922c6ab2e0'/>
<id>urn:sha1:8c5ad0dae93c9931dc32b9f4a98e73922c6ab2e0</id>
<content type='text'>
This patch adds basic ethtool support to the device to allow
for configuration.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Remove the 'igc_get_phy_id_base' method</title>
<updated>2019-02-06T01:23:09Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2019-01-15T13:21:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=200a1a1a7e91eee978c76238f6ef526e3071a81c'/>
<id>urn:sha1:200a1a1a7e91eee978c76238f6ef526e3071a81c</id>
<content type='text'>
Remove the redundant 'igc_get_phy_id_base' method and use
the 'igc_get_phy_id' method directly instead.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Remove the 'igc_read_mac_addr_base' method</title>
<updated>2019-02-06T01:14:38Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2019-01-15T13:21:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=109f599663b9d24f0045b1f4f576896c136942ec'/>
<id>urn:sha1:109f599663b9d24f0045b1f4f576896c136942ec</id>
<content type='text'>
Remove the redundant 'igc_read_mac_addr_base' method and use
the 'igc_read_mac_addr' method directly instead.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Remove unneeded code</title>
<updated>2019-02-06T01:05:35Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2019-01-13T09:22:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=439c71f7d2ca07cb5bc3ee0686f1e8a3de45b9cd'/>
<id>urn:sha1:439c71f7d2ca07cb5bc3ee0686f1e8a3de45b9cd</id>
<content type='text'>
Remove the 'igc_get_link_up_info_base method' from igc_base.c file.
Use the 'igc_get_speed_and_duplex_copper' method directly and reduce
the code redundancy.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Remove unused code</title>
<updated>2019-02-06T01:00:52Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2019-01-07T14:40:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=55fdbeaa2db8b271db767240fba24a60bd232528'/>
<id>urn:sha1:55fdbeaa2db8b271db767240fba24a60bd232528</id>
<content type='text'>
Remove unused igc_adv_data_desc definition from igc_base.h file.
Descriptors definition will be added per demand.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Fix code redundancy</title>
<updated>2019-02-06T00:08:54Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2018-12-18T09:29:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a8890c38abb2f1706672cafb4094d3726430b335'/>
<id>urn:sha1:a8890c38abb2f1706672cafb4094d3726430b335</id>
<content type='text'>
Remove redundant igc_check_for_link_base code and replace it with
an igc_check_for_copper_link method.
Fix duplication of IGC_ADVTXD_PAYLEN_SHIFT mask declaration.
Remove obsolete IGC_SCVPC register definition.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Remove unreachable code from igc_phy.c file</title>
<updated>2019-02-06T00:08:54Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2018-12-11T16:55:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=803cc52323e0c863d3f08740b8c156593a5ca1e9'/>
<id>urn:sha1:803cc52323e0c863d3f08740b8c156593a5ca1e9</id>
<content type='text'>
Address community comment.
Remove the unreachable code leads to the static checker warning.
PHY functionality will be added later per demand.
Reported by Dan Carpenter.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Remove obsolete IGC_ERR define</title>
<updated>2018-11-21T18:55:06Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2018-11-12T09:05:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6ed4babed9cc7eaa71522b5c10265ef3a4a06297'/>
<id>urn:sha1:6ed4babed9cc7eaa71522b5c10265ef3a4a06297</id>
<content type='text'>
Address community comment.
Remove obsolete IGC_ERR define and use dev_err method.
Suggested by Joe Perches.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>ethernet/intel: consolidate NAPI and NAPI exit</title>
<updated>2018-11-21T18:35:23Z</updated>
<author>
<name>Jesse Brandeburg</name>
<email>jesse.brandeburg@intel.com</email>
</author>
<published>2018-11-08T22:55:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0bcd952feec7042d9a5383b639c8edc943402add'/>
<id>urn:sha1:0bcd952feec7042d9a5383b639c8edc943402add</id>
<content type='text'>
While reviewing code, I noticed that Eric Dumazet recommends that
drivers check the return code of napi_complete_done, and use that
to decide to enable interrupts or not when exiting poll.  One of
the Intel drivers was already fixed (ixgbe).

Upon looking at the Intel drivers as a whole, we are handling our
polling and NAPI exit in a few different ways based on whether we
have multiqueue and whether we have Tx cleanup included. Several
drivers had the bug of exiting NAPI with return 0, which appears
to mess up the accounting in the stack.

Consolidate all the NAPI routines to do best known way of exiting
and to just mostly look like each other.
1) check return code of napi_complete_done to control interrupt enable
2) return the actual amount of work done.
3) return budget immediately if need NAPI poll again

Tested the changes on e1000e with a high interrupt rate set, and
it shows about an 8% reduction in the CPU utilization when busy
polling because we aren't re-enabling interrupts when we're about
to be polled.

Signed-off-by: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
Tested-by: Andrew Bowers &lt;andrewx.bowers@intel.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
</feed>
