Now that output route lookups update the flow with
source address et al. selections, the fl4->{saddr,daddr}
assignments here are no longer necessary.
Signed-off-by: David S. Miller <[email protected]>
Make dst_alloc() and it's users explicitly initialize the entire
entry.
The zero'ing done by kmem_cache_zalloc() was almost entirely
redundant.
Signed-off-by: David S. Miller <[email protected]>
We don't actually hold the socket lock at this point, so the
rcu_dereference_protected() isn't' correct. Thanks to Eric
Dumazet for pointing this out.
Thankfully, we're only interested in fetching the faddr value
if srr is enabled, so we can simply make this an RCU sequence
and use plain rcu_dereference().
Reported-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Commit b9367bf3ee ("net: ibmveth: convert to hw_features") accidentally
removed call to ibmveth_set_csum_offload() in ibmveth_probe(). Put the
call back where it was, but with additional error checking provided
by ibmveth_set_features().
Signed-off-by: Michał Mirosław <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
[sfr: dev -> netdev]
Signed-off-by: Stephen Rothwell <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
o Memory allocated in ETHTOOL_ACTIVE mode, is not getting freed. So,
in ETHTOOL_ID_INACTIVE mode, return after freeing allocated memory.
o Using set bit instead of blink_down field, as it is also required
in internal Loopback test and etc.
Signed-off-by: Sucheta Chakraborty <[email protected]>
Signed-off-by: Amit Kumar Salecha <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Using a bitmap instead of separate u32 flags allows a consistent, simpler
and more extensible mechanism to determine capabilities.
Convert bitmasks to enum.
Add tg3_flag, tg3_flag_clear and tg3_flag_set.
Convert the flag & bitmask tests.
Signed-off-by: Joe Perches <[email protected]>
Acked-by: Matt Carlson <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
NETIF_F_HIGHDMA is like any other TX offloads, so allow user to toggle it.
This is needed later for bridge and bonding convertsion to hw_features.
Signed-off-by: Michał Mirosław <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Note: netdev_update_features() needs only rtnl_lock as br->port_list
is only changed while holding it.
Signed-off-by: Michał Mirosław <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Simplify and fix netdev_increment_features() to conform to what is
stated in netdevice.h comments about NETIF_F_ONE_FOR_ALL.
Include FCoE segmentation and VLAN-challedged flags in computation.
Signed-off-by: Michał Mirosław <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Although these are equivalent, but the skb_checksum_start_offset() is more readable.
Signed-off-by: Shan Wei <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can change inet->opt pointer and free old one under us.
Use RCU to protect inet->opt (changed to inet->inet_opt).
Instead of handling atomic refcounts, just copy ip_options when
necessary, to avoid cache line dirtying.
We cant insert an rcu_head in struct ip_options since its included in
skb->cb[], so this patch is large because I had to introduce a new
ip_options_rcu structure.
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
It's not used by anything in the kernel, and defined in net/route.h so
never exported to userspace.
Therefore we can safely remove it.
Signed-off-by: David S. Miller <[email protected]>
Output route resolution never returns a route with rt_src set to zero
(which is INADDR_ANY).
Even if the flow key for the output route lookup specifies INADDR_ANY
for the source address, the output route resolution chooses a real
source address to use in the final route.
This test has existed forever in igmp_send_report() and David Stevens
simply copied over the erroneous test when implementing support for
IGMPv3.
Signed-off-by: David S. Miller <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
These functions are used together as a unit for route resolution
during connect(). They address the chicken-and-egg problem that
exists when ports need to be allocated during connect() processing,
yet such port allocations require addressing information from the
routing code.
It's currently more heavy handed than it needs to be, and in
particular we allocate and initialize a flow object twice.
Let the callers provide the on-stack flow object. That way we only
need to initialize it once in the ip_route_connect() call.
Later, if ip_route_newports() needs to do anything, it re-uses that
flow object as-is except for the ports which it updates before the
route re-lookup.
Also, describe why this set of facilities are needed and how it works
in a big comment.
Signed-off-by: David S. Miller <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
- use adequate MAC_VER id
(see 01dc7fec40)
- remove duplicate rtl_firmware_info record
- remove duplicate functions
Signed-off-by: Francois Romieu <[email protected]>
Cc: Realtek linux nic maintainers <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Change the call to take the transport parameter and set the
cached 'dst' appropriately inside the get_dst() function calls.
This will allow us in the future to clean up source address
storage as well.
Signed-off-by: Vlad Yasevich <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
There is no point in passing a destination address to
a get_saddr() call.
Signed-off-by: Vlad Yasevich <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
SCTP never called xfrm_output after it's v6 route lookups so
that never really worked with ipsec. Additioanlly, we never
passed port nubmers and protocol in the flowi, so any port
based policies were never applied as well. Now that we can
fixed ipv6 routing lookup code, using ip6_dst_lookup_flow()
and pass port numbers.
Signed-off-by: Vlad Yasevich <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
The ipv6 routing lookup does give us a source address,
but instead of filling it into the dst, it's stored in
the flowi. We can use that instead of going through the
entire source address selection again.
Also the useless ->dst_saddr member of sctp_pf is removed.
And sctp_v6_dst_saddr() is removed, instead by introduce
sctp_v6_to_addr(), which can be reused to cleanup some dup
code.
Signed-off-by: Vlad Yasevich <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
In the below test case, using the source address routing,
sctp can not work.
Node-A
1)ifconfig eth0 inet6 add 2001:1::1/64
2)ip -6 rule add from 2001:1::1 table 100 pref 100
3)ip -6 route add 2001:2::1 dev eth0 table 100
4)sctp_darn -H 2001:1::1 -P 250 -l &
Node-B
1)ifconfig eth0 inet6 add 2001:2::1/64
2)ip -6 rule add from 2001:2::1 table 100 pref 100
3)ip -6 route add 2001:1::1 dev eth0 table 100
4)sctp_darn -H 2001:2::1 -P 250 -h 2001:1::1 -p 250 -s
root cause:
Node-A and Node-B use the source address routing, and
at begining, source address will be NULL,sctp will
search the routing table by the destination address,
because using the source address routing table, and
the result dst_entry will be NULL.
solution:
walk through the bind address list to get the source
address and then lookup the routing table again to get
the correct dst_entry.
Signed-off-by: Weixing Shi <[email protected]>
Signed-off-by: Vlad Yasevich <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Based on the original patch submitted by Stephen Hemminger.
This patch makes the following changes:
- Change ETHTOOL_ID_INACTIVE return value to 2 (blinks/sec)
- Fix restoring of IXGBE_LEDCTL
CC: Stephen Hemminger <[email protected]>
Signed-off-by: Emil Tantilov <[email protected]>
Tested-by: Evan Swanson <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
On X540 we need to set the MACC.FLU bit to 1 in order to force the link
up before entering MAC loopback. This is only used in the ethtool loopback
test, which was failing. This patch corrects it.
Signed-off-by: Don Skidmore <[email protected]>
Tested-by: Evan Swanson <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Bump the driver version number to better match up with the out of tree
driver that has similar functionality.
Signed-off-by: Don Skidmore <[email protected]>
Tested-by: Evan Swanson <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
X540 supports SCTP checksum offload so enable it. It was overlooked when X540
support was initially added to the driver.
Signed-off-by: Don Skidmore <[email protected]>
Tested-by: Evan Swanson <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
The ddp->err is initialized to be 1 to make sure outstanding DDP context is
guaranteed to be invalidated when HW is not auto-invalidating it. However,
in case of receiving ABTS response for a DDPed I/O, the ddp->err was cleared,
bypassing the invalidating of the DDP context from upper protocol stack when
ixgbe_fcoe_ddp_put() is called. This bug is fixed here by updating the error
only when FCP_RSP is received.
Signed-off-by: Yi Zou <[email protected]>
Tested-by: Ross Brattain <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Define functions as static added C=1 (sparse) to my make line
brought these to my attention.
Signed-off-by: John Fastabend <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
This change removes the ntuple display support from ixgbe. The reason for
this change is to resolve a number of issues in the way display filtering
is handled.
I plan to add support for displaying these filters via the network flow
classifier interface.
Signed-off-by: Alexander Duyck <[email protected]>
Tested-by: Evan Swanson <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Implement blink_led_start and blink_led_stop functions for x540
using the MACC register.
Signed-off-by: Emil Tantilov <[email protected]>
Tested-by: Evan Swanson <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
82599 supports up to 32k EEPROM addressing via EERD register. If we
wish to address larger EEPROM this have to be done via serial interface.
This patch adds function ixgbe_read_eeprom_82599 which selects the best
method to read the EEPROM.
Signed-off-by: Emil Tantilov <[email protected]>
Tested-by: Evan Swanson <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
100H is not supported on this HW, but the bit is set on the PHY.
This can result in link at 100F when advertising only 1000F.
Signed-off-by: Emil Tantilov <[email protected]>
Tested-by: Evan Swanson <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Based on a patch from Stephen Hemminger <[email protected]>.
The new ethtool set_phys_id takes over controlling the LED for
identifying boards. This fixes the lockout during that period.
For this device lots of extra infrastructure can also be removed by
using set_phys_id.
v2: - return blink frequency for parts that do not support blink in h/w
- add blink_led function pointers for devices that do support blink
in h/w to cleanup the test for this functionality
Signed-off-by: Bruce Allan <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Tested-by: Aaron Brown <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Resolved logic conflicts causing a build failure due to
drivers/net/r8169.c changes using a patch from Stephen Rothwell.
Signed-off-by: David S. Miller <[email protected]>
This patch adds code to exercise the TSO portion of the device through
a phy loopback test.
Signed-off-by: Matt Carlson <[email protected]>
Signed-off-by: Benjamin Li <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
As more test modes are added to each loopback mode, the need to
organise the results increases. This patch groups the results by
loopback mode, and then by test mode.
Signed-off-by: Matt Carlson <[email protected]>
Reviewed-by: Michael Chan <[email protected]>
Reviewed-by: Benjamin Li <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
On the 5719 and 5720, there is a bug where the hardware will
misinterpret a status tag update and leave interrupts permanently
disabled. This patch enables a hardware fix that works around the
issue.
Signed-off-by: Matt Carlson <[email protected]>
Reviewed-by: Michael Chan <[email protected]>
Reviewed-by: Benjamin Li <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/bluetooth/l2cap_core.c: In function ‘l2cap_recv_frame’:
net/bluetooth/l2cap_core.c:3612:15: warning: ‘sk’ may be used uninitialized in this function
net/bluetooth/l2cap_core.c:3612:15: note: ‘sk’ was declared here
Actually the problem is in the inline function l2cap_data_channel(), we
branch to the label 'done' which tests 'sk' before we set it to anything.
Initialize it to NULL to fix this.
Signed-off-by: David S. Miller <[email protected]>
Same WRB entry was being reused over different iterations of a
loop while issuing non-embedded IOCTL requests.Fixed couple of minor bugs
in this path as well.
Re-factored code to alloc/free memory for DMA outside of loop
Signed-off-by: Somnath Kotur <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Since now when bonding uses rx_handler, all traffic going into bond
device goes thru bond_handle_frame. So there's no need to go back into
bonding code later via ptype handlers. This patch converts
original ptype handlers into "bonding receive probes". These functions
are called from bond_handle_frame and they are registered per-mode.
Note that vlan packets are also handled because they are always untagged
thanks to vlan_untag()
Note that this also allows arpmon for eth-bond-bridge-vlan topology.
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
The default maximum transmit length for NCM USB frames should be so
that a short packet happens at the end if the device supports a length
greater than the defined maximum. This is achieved by adding 4 bytes
to the maximum length so that the existing logic can fit a short
packet there.
Signed-off-by: Hans Petter Selasky <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>