29 Mar, 2014

3 commits

  • Dropping packets in __dev_queue_xmit() when transmit queue
    is stopped (NIC TX ring buffer full or BQL limit reached) currently
    outputs a syslog message.

    It would be better to get a precise count of such events available in
    netdevice stats so that monitoring tools can have a clue.

    This extends the work done in caf586e5f23ce
    ("net: add a core netdev->rx_dropped counter")

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Add implementation for the add/del vxlan port ndo calls, using the
    CONFIG_DEV firmware command.

    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • Introduce the CONFIG_DEV firmware command which we will use to
    configure the UDP port assumed by the firmware for the VXLAN offloads.

    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Or Gerlitz
     

28 Mar, 2014

1 commit

  • If an IPv6 host route with metrics exists, an attempt to add a
    new route for the same target with different metrics fails but
    rewrites the metrics anyway:

    12sp0:~ # ip route add fec0::1 dev eth0 rto_min 1000
    12sp0:~ # ip -6 route show
    fe80::/64 dev eth0 proto kernel metric 256
    fec0::1 dev eth0 metric 1024 rto_min lock 1s
    12sp0:~ # ip route add fec0::1 dev eth0 rto_min 1500
    RTNETLINK answers: File exists
    12sp0:~ # ip -6 route show
    fe80::/64 dev eth0 proto kernel metric 256
    fec0::1 dev eth0 metric 1024 rto_min lock 1.5s

    This is caused by all IPv6 host routes using the metrics in
    their inetpeer (or the shared default). This also holds for the
    new route created in ip6_route_add() which shares the metrics
    with the already existing route and thus ip6_route_add()
    rewrites the metrics even if the new route ends up not being
    used at all.

    Another problem is that old metrics in inetpeer can reappear
    unexpectedly for a new route, e.g.

    12sp0:~ # ip route add fec0::1 dev eth0 rto_min 1000
    12sp0:~ # ip route del fec0::1
    12sp0:~ # ip route add fec0::1 dev eth0
    12sp0:~ # ip route change fec0::1 dev eth0 hoplimit 10
    12sp0:~ # ip -6 route show
    fe80::/64 dev eth0 proto kernel metric 256
    fec0::1 dev eth0 metric 1024 hoplimit 10 rto_min lock 1s

    Resolve the first problem by moving the setting of metrics down
    into fib6_add_rt2node() to the point we are sure we are
    inserting the new route into the tree. Second problem is
    addressed by introducing new flag DST_METRICS_FORCE_OVERWRITE
    which is set for a new host route in ip6_route_add() and makes
    ipv6_cow_metrics() always overwrite the metrics in inetpeer
    (even if they are not "new"); it is reset after that.

    v5: use a flag in _metrics member rather than one in flags

    v4: fix a typo making a condition always true (thanks to Hannes
    Frederic Sowa)

    v3: rewritten based on David Miller's idea to move setting the
    metrics (and allocation in non-host case) down to the point we
    already know the route is to be inserted. Also rebased to
    net-next as it is quite late in the cycle.

    Signed-off-by: Michal Kubecek
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Michal Kubeček
     

27 Mar, 2014

3 commits

  • This patch adds support for Samsung 10Gb ethernet driver(sxgbe).

    - sxgbe core initialization
    - Tx and Rx support
    - MDIO support
    - ISRs for Tx and Rx
    - ifconfig support to driver

    Signed-off-by: Siva Reddy Kallam
    Signed-off-by: Vipul Pandya
    Signed-off-by: Girish K S
    Neatening-by: Joe Perches
    Signed-off-by: Byungho An
    Signed-off-by: David S. Miller

    Siva Reddy
     
  • The vlan support 2 proto: 802.1q and 802.1ad, so make a new function
    called vlan_dev_vlan_proto() which could return the vlan proto for
    input dev.

    Signed-off-by: Ding Tianhong
    Signed-off-by: David S. Miller

    dingtianhong
     
  • The packet hash can be considered a property of the packet, not just
    on RX path.

    This patch changes name of rxhash and l4_rxhash skbuff fields to be
    hash and l4_hash respectively. This includes changing uses of the
    field in the code which don't call the access functions.

    Signed-off-by: Tom Herbert
    Signed-off-by: Eric Dumazet
    Cc: Mahesh Bandewar
    Signed-off-by: David S. Miller

    Tom Herbert
     

26 Mar, 2014

2 commits

  • Conflicts:
    Documentation/devicetree/bindings/net/micrel-ks8851.txt
    net/core/netpoll.c

    The net/core/netpoll.c conflict is a bug fix in 'net' happening
    to code which is completely removed in 'net-next'.

    In micrel-ks8851.txt we simply have overlapping changes.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • John W. Linville says:

    ====================
    Please pull this batch of wireless updates intended for 3.15!

    For the mac80211 bits, Johannes says:

    "This has a whole bunch of bugfixes for things that went into -next
    previously as well as some other bugfixes I didn't want to rush into
    3.14 at this point. The rest of it is some cleanups and a few small
    features, the biggest of which is probably Janusz's regulatory DFS CAC
    time code."

    For the Bluetooth bits, Gustavo says:

    "One more pull request to 3.15. This is mostly and bug fix pull request, it
    contains several fixes and clean up all over the tree, plus some small new
    features."

    For the NFC bits, Samuel says:

    "This is the NFC pull request for 3.15. With this one we have:

    - Support for ISO 15693 a.k.a. NFC vicinity a.k.a. Type 5 tags. ISO
    15693 are long range (1 - 2 meters) vicinity tags/cards. The kernel
    now supports those through the NFC netlink and digital APIs.

    - Support for TI's trf7970a chipset. This chipset relies on the NFC
    digital layer and the driver currently supports type 2, 4A and 5 tags.

    - Support for NXP's pn544 secure firmare download. The pn544 C3 chipsets
    relies on a different firmware download protocal than the C2 one. We
    now support both and use the right one depending on the version we
    detect at runtime.

    - Support for 4A tags from the NFC digital layer.

    - A bunch of cleanups and minor fixes from Axel Lin and Thierry Escande."

    For the iwlwifi bits, Emmanuel says:

    "We were sending a host command while the mutex wasn't held. This
    led to hard-to-catch races."

    And...

    "I have a fix for a "merge damage" which is not really a merge
    damage: it enables scheduled scan which has been disabled in
    wireless.git. Since you merged wireless.git into wireless-next.git,
    this can now be fixed in wireless-next.git.

    Besides this, Alex made a workaround for a hardware bug. This fix
    allows us to consume less power in S3. Arik and Eliad continue to
    work on D0i3 which is a run-time power saving feature. Eliad also
    contributes a few bits to the rate scaling logic to which Eyal adds his
    own contribution. Avri dives deep in the power code - newer firmware
    will allow to enable power save in newer scenarios. Johannes made a few
    clean-ups. I have the regular amount of BT Coex boring stuff. I disable
    uAPSD since we identified firmware bugs that cause packet loss. One
    thing that do stand out is the udev event that we now send when the
    FW asserts. I hope it will allow us to debug the FW more easily."

    Also included is one last iwlwifi pull for a build breakage fix...

    For the Atheros bits, Kalle says:

    "Michal now did some optimisations and was able to improve throughput by
    100 Mbps on our MIPS based AP135 platform. Chun-Yeow added some
    workarounds to be able to better use ad-hoc mode. Ben improved log
    messages and added support for MSDU chaining. And, as usual, also some
    smaller fixes."

    Beyond that...

    Andrea Merello continues his rtl8180 refactoring, in preparation for
    a long-awaited rtl8187 driver. We get a new driver (rsi) for the
    RS9113 chip, from Fariya Fatima. And, of course, we get the usual
    round of updates for ath9k, brcmfmac, mwifiex, wil6210, etc. as well.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

25 Mar, 2014

3 commits

  • Replace kfree_skb with dev_kfree_skb_any in vlan_insert_tag as
    vlan_insert_tag can be called from hard irq context (netpoll)
    and from other contexts.

    dev_kfree_skb_any is used as vlan_insert_tag only frees the skb if the
    skb can not be modified to insert a tag, in which case vlan_insert_tag
    drops the skb.

    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     
  • Pull networking fixes from David Miller:

    1) OpenVswitch's lookup_datapath() returns error pointers, so don't
    check against NULL. From Jiri Pirko.

    2) pfkey_compile_policy() code path tries to do a GFP_KERNEL allocation
    under RCU locks, fix by using GFP_ATOMIC when necessary. From
    Nikolay Aleksandrov.

    3) phy_suspend() indirectly passes uninitialized data into the ethtool
    get wake-on-land implementations. Fix from Sebastian Hesselbarth.

    4) CPSW driver unregisters CPTS twice, fix from Benedikt Spranger.

    5) If SKB allocation of reply packet fails, vxlan's arp_reduce() defers
    a NULL pointer. Fix from David Stevens.

    6) IPV6 neigh handling in vxlan doesn't validate the destination
    address properly, and it builds a packet with the src and dst
    reversed. Fix also from David Stevens.

    7) Fix spinlock recursion during subscription failures in TIPC stack,
    from Erik Hugne.

    8) Revert buggy conversion of davinci_emac to devm_request_irq, from
    Chrstian Riesch.

    9) Wrong flags passed into forwarding database netlink notifications,
    from Nicolas Dichtel.

    10) The netpoll neighbour soliciation handler checks wrong ethertype,
    needs to be ETH_P_IPV6 rather than ETH_P_ARP. Fix from Li RongQing.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits)
    tipc: fix spinlock recursion bug for failed subscriptions
    vxlan: fix nonfunctional neigh_reduce()
    net: davinci_emac: Fix rollback of emac_dev_open()
    net: davinci_emac: Replace devm_request_irq with request_irq
    netpoll: fix the skb check in pkt_is_ns
    net: micrel : ks8851-ml: add vdd-supply support
    ip6mr: fix mfc notification flags
    ipmr: fix mfc notification flags
    rtnetlink: fix fdb notification flags
    tcp: syncookies: do not use getnstimeofday()
    netlink: fix setsockopt in mmap examples in documentation
    openvswitch: Correctly report flow used times for first 5 minutes after boot.
    via-rhine: Disable device in error path
    ATHEROS-ATL1E: Convert iounmap to pci_iounmap
    vxlan: fix potential NULL dereference in arp_reduce()
    cnic: Update version to 2.5.20 and copyright year.
    cnic,bnx2i,bnx2fc: Fix inconsistent use of page size
    cnic: Use proper ulp_ops for per device operations.
    net: cdc_ncm: fix control message ordering
    ipv6: ip6_append_data_mtu do not handle the mtu of the second fragment properly
    ...

    Linus Torvalds
     
  • ip_rt_dump do nothing after IPv4 route caches removal, so we can remove it.

    Signed-off-by: Li RongQing
    Signed-off-by: David S. Miller

    Li RongQing
     

24 Mar, 2014

1 commit

  • When changing one 16bit value by another in IP header, we can adjust
    the IP checksum by doing a simple operation described in RFC 1624, as
    reminded by David.

    csum_partial() is a complex function on x86_64, not really suited for
    small number of checksummed bytes.

    I spotted csum_partial() being in the top 20 most consuming functions
    (more than 1 %) in a GRO workload, which was rather unexpected.

    The caller was inet_gro_complete() doing a csum_replace2() when
    building the new IP header for the GRO packet.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

22 Mar, 2014

2 commits


21 Mar, 2014

9 commits

  • …it/rostedt/linux-trace

    Pull trace fix from Steven Rostedt:
    "Vaibhav Nagarnaik discovered that since 3.10 a clean-up patch made the
    array index in the trace event format bogus.

    He supplied an elegant solution that uses __stringify() and also
    removes the need for the event_storage and event_storage_mutex and
    also cuts off a few K of overhead from the trace events"

    * tag 'trace-fixes-v3.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    tracing: Fix array size mismatch in format string

    Linus Torvalds
     
  • Add remove_linear_migration_ptes_from_nonlinear(), to fix an interesting
    little include/linux/swapops.h:131 BUG_ON(!PageLocked) found by trinity:
    indicating that remove_migration_ptes() failed to find one of the
    migration entries that was temporarily inserted.

    The problem comes from remap_file_pages()'s switch from vma_interval_tree
    (good for inserting the migration entry) to i_mmap_nonlinear list (no good
    for locating it again); but can only be a problem if the remap_file_pages()
    range does not cover the whole of the vma (zap_pte() clears the range).

    remove_migration_ptes() needs a file_nonlinear method to go down the
    i_mmap_nonlinear list, applying linear location to look for migration
    entries in those vmas too, just in case there was this race.

    The file_nonlinear method does need rmap_walk_control.arg to do this;
    but it never needed vma passed in - vma comes from its own iteration.

    Reported-and-tested-by: Dave Jones
    Reported-and-tested-by: Sasha Levin
    Signed-off-by: Hugh Dickins
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • According to "Universal Serial Bus Communications Class Subclass
    Specification for Mobile Broadband Interface Model, Revision 1.0,
    Errata-1" published by USB-IF, the wMTU field of the MBIM extended
    functional descriptor indicates the operator preferred MTU for IP data
    streams.

    This patch modifies cdc_ncm_setup to ensure that the MTU value set on
    the usbnet device does not exceed the operator preferred MTU indicated
    by wMTU if the MBIM device exposes a MBIM extended functional
    descriptor.

    Signed-off-by: Ben Chan
    Signed-off-by: David S. Miller

    Ben Chan
     
  • This patch adds the MBIM extended functional descriptor structure
    defined in "Universal Serial Bus Communications Class Subclass
    Specification for Mobile Broadband Interface Model, Revision 1.0,
    Errata-1" published by USB-IF.

    Signed-off-by: Ben Chan
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: David S. Miller

    Ben Chan
     
  • While it is true that getnstimeofday() uses about 40 cycles if TSC
    is available, it can use 1600 cycles if hpet is the clocksource.

    Switch to get_jiffies_64(), as this is more than enough, and
    go back to 60 seconds periods.

    Fixes: 8c27bd75f04f ("tcp: syncookies: reduce cookie lifetime to 128 seconds")
    Signed-off-by: Eric Dumazet
    Cc: Florian Westphal
    Acked-by: Florian Westphal
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Adds support for N-Port VFs, this includes:
    1. Adding support in the wrapped FW command
    In wrapped commands, we need to verify and convert
    the slave's port into the real physical port.
    Furthermore, when sending the response back to the slave,
    a reverse conversion should be made.
    2. Adjusting sqpn for QP1 para-virtualization
    The slave assumes that sqpn is used for QP1 communication.
    If the slave is assigned to a port != (first port), we need
    to adjust the sqpn that will direct its QP1 packets into the
    correct endpoint.
    3. Adjusting gid[5] to modify the port for raw ethernet
    In B0 steering, gid[5] contains the port. It needs
    to be adjusted into the physical port.
    4. Adjusting number of ports in the query / ports caps in the FW commands
    When a slave queries the hardware, it needs to view only
    the physical ports it's assigned to.
    5. Adjusting the sched_qp according to the port number
    The QP port is encoded in the sched_qp, thus in modify_qp we need
    to encode the correct port in sched_qp.

    Signed-off-by: Matan Barak
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Matan Barak
     
  • This patch adds the following utils:
    1. Convert slave_id -> VF
    2. Get the active ports by slave_id
    3. Convert slave's port to real port
    4. Get the slave's port from real port
    5. Get all slaves that uses the i'th real port
    6. Get all slaves that uses the i'th real port exclusively

    Signed-off-by: Matan Barak
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Matan Barak
     
  • Adds the required data structures to support VFs with N (1 or 2)
    ports instead of always using the number of physical ports.

    Signed-off-by: Matan Barak
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Matan Barak
     
  • In event format strings, the array size is reported in two locations.
    One in array subscript and then via the "size:" attribute. The values
    reported there have a mismatch.

    For e.g., in sched:sched_switch the prev_comm and next_comm character
    arrays have subscript values as [32] where as the actual field size is
    16.

    name: sched_switch
    ID: 301
    format:
    field:unsigned short common_type; offset:0; size:2; signed:0;
    field:unsigned char common_flags; offset:2; size:1; signed:0;
    field:unsigned char common_preempt_count; offset:3; size:1;signed:0;
    field:int common_pid; offset:4; size:4; signed:1;

    field:char prev_comm[32]; offset:8; size:16; signed:1;
    field:pid_t prev_pid; offset:24; size:4; signed:1;
    field:int prev_prio; offset:28; size:4; signed:1;
    field:long prev_state; offset:32; size:8; signed:1;
    field:char next_comm[32]; offset:40; size:16; signed:1;
    field:pid_t next_pid; offset:56; size:4; signed:1;
    field:int next_prio; offset:60; size:4; signed:1;

    After bisection, the following commit was blamed:
    92edca0 tracing: Use direct field, type and system names

    This commit removes the duplication of strings for field->name and
    field->type assuming that all the strings passed in
    __trace_define_field() are immutable. This is not true for arrays, where
    the type string is created in event_storage variable and field->type for
    all array fields points to event_storage.

    Use __stringify() to create a string constant for the type string.

    Also, get rid of event_storage and event_storage_mutex that are not
    needed anymore.

    also, an added benefit is that this reduces the overhead of events a bit more:

    text data bss dec hex filename
    8424787 2036472 1302528 11763787 b3804b vmlinux
    8420814 2036408 1302528 11759750 b37086 vmlinux.patched

    Link: http://lkml.kernel.org/r/1392349908-29685-1-git-send-email-vnagarnaik@google.com

    Cc: Laurent Chavey
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Vaibhav Nagarnaik
    Signed-off-by: Steven Rostedt

    Vaibhav Nagarnaik
     

20 Mar, 2014

6 commits

  • …etooth/bluetooth-next

    John W. Linville
     
  • John W. Linville
     
  • Add a bit in rx_status.vht_flags to let the low level driver
    notify mac80211 about a beamformed packet. Propagate this
    to the radiotap header.

    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Emmanuel Grumbach
     
  • On 2.4Ghz band, the channels overlap since the delta
    between different channels is 5Mhz while the width of the
    receiver is 20Mhz (at least).

    This means that we can hear beacons or probe responses from
    adjacent channels. These frames will have a significant
    lower RSSI which will feed all kinds of logic with inaccurate
    data. An obvious example is the roaming algorithm that will
    think our AP is getting weak and will try to move to another
    AP.

    In order to avoid this, update the signal only if the frame
    has been heard on the same channel as the one advertised by
    the AP in its DS / HT IEs.
    We refrain from updating the values only if the AP is
    already in the BSS list so that we will still have a valid
    (but inaccurate) value if the AP was heard on an adjacent
    channel only.

    To achieve this, stop taking the channel from DS / HT IEs
    in mac80211. The DS / HT IEs is taken into account to
    discard the frame if it was received on a disabled channel.
    This can happen due to the same phenomenon: the frame is
    sent on channel 12, but heard on channel 11 while channel
    12 can be disabled on certain devices. Since this check
    is done in cfg80211, stop even checking this in mac80211.

    Signed-off-by: Emmanuel Grumbach
    [remove unused rx_freq variable]
    Signed-off-by: Johannes Berg

    Emmanuel Grumbach
     
  • Drivers might want to have private data in addition
    to all other ieee80211_tx_info.status fields.

    The current ieee80211_tx_info.rate_driver_data overlaps
    with some of the non-rate data (e.g. ampdu_ack_len), so
    it might not be good enough.

    Since we already know how much free bytes remained,
    simply use this size to define (void *) array.

    While on it, change ack_signal type from int to the more
    explicit s32 type.

    Signed-off-by: Eliad Peller
    Signed-off-by: Johannes Berg

    Eliad Peller
     
  • In the 802.11ad, aka DMG (Dynamic Multi-Gigabit), aka 60Ghz
    spec, maximum MSDU size extended to 7920 bytes.
    add #define for this.

    Signed-off-by: Vladimir Kondratiev
    Signed-off-by: Johannes Berg

    Vladimir Kondratiev
     

19 Mar, 2014

3 commits

  • This is a context modified revert of commit 6a9612e2cb22
    ("net: cdc_ncm: remove ncm_parm field") which introduced
    a NCM specification violation, causing setup errors for
    some devices. These errors resulted in the device and
    host disagreeing about shared settings, with complete
    failure to communicate as the end result.

    The NCM specification require that many of the NCM specific
    control reuests are sent only while the NCM Data Interface
    is in alternate setting 0. Reverting the commit ensures that
    we follow this requirement.

    Fixes: 6a9612e2cb22 ("net: cdc_ncm: remove ncm_parm field")
    Reported-and-tested-by: Pasi Kärkkäinen
    Reported-by: Thomas Schäfer
    Signed-off-by: Bjørn Mork
    Signed-off-by: David S. Miller

    Bjørn Mork
     
  • Steffen Klassert says:

    ====================
    One patch to rename a newly introduced struct. The rest is
    the rework of the IPsec virtual tunnel interface for ipv6 to
    support inter address family tunneling and namespace crossing.

    1) Rename the newly introduced struct xfrm_filter to avoid a
    conflict with iproute2. From Nicolas Dichtel.

    2) Introduce xfrm_input_afinfo to access the address family
    dependent tunnel callback functions properly.

    3) Add and use a IPsec protocol multiplexer for ipv6.

    4) Remove dst_entry caching. vti can lookup multiple different
    dst entries, dependent of the configured xfrm states. Therefore
    it does not make to cache a dst_entry.

    5) Remove caching of flow informations. vti6 does not use the the
    tunnel endpoint addresses to do route and xfrm lookups.

    6) Update the vti6 to use its own receive hook.

    7) Remove the now unused xfrm_tunnel_notifier. This was used from vti
    and is replaced by the IPsec protocol multiplexer hooks.

    8) Support inter address family tunneling for vti6.

    9) Check if the tunnel endpoints of the xfrm state and the vti interface
    are matching and return an error otherwise.

    10) Enable namespace crossing for vti devices.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Steffen Klassert says:

    ====================
    1) Fix a sleep in atomic when pfkey_sadb2xfrm_user_sec_ctx()
    is called from pfkey_compile_policy().
    Fix from Nikolay Aleksandrov.

    2) security_xfrm_policy_alloc() can be called in process and atomic
    context. Add an argument to let the callers choose the appropriate
    way. Fix from Nikolay Aleksandrov.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

18 Mar, 2014

7 commits

  • The netpoll packet receive code only becomes active if the netpoll
    rx_skb_hook is implemented, and there is not a single implementation
    of the netpoll rx_skb_hook in the kernel.

    All of the out of tree implementations I have found all call
    netpoll_poll which was removed from the kernel in 2011, so this
    change should not add any additional breakage.

    There are problems with the netpoll packet receive code. __netpoll_rx
    does not call dev_kfree_skb_irq or dev_kfree_skb_any in hard irq
    context. netpoll_neigh_reply leaks every skb it receives. Reception
    of packets does not work successfully on stacked devices (aka bonding,
    team, bridge, and vlans).

    Given that the netpoll packet receive code is buggy, there are no
    out of tree users that will be merged soon, and the code has
    not been used for in tree for a decade let's just remove it.

    Reverting this commit can server as a starting point for anyone
    who wants to resurrect netpoll packet reception support.

    Acked-by: Eric Dumazet
    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • Make rx_skb_hook, and rx in struct netpoll depend on
    CONFIG_NETPOLL_TRAP Make rx_lock, rx_np, and neigh_tx in struct
    netpoll_info depend on CONFIG_NETPOLL_TRAP

    Make the functions netpoll_rx_on, netpoll_rx, and netpoll_receive_skb
    no-ops when CONFIG_NETPOLL_TRAP is not set.

    Only build netpoll_neigh_reply, checksum_udp service_neigh_queue,
    pkt_is_ns, and __netpoll_rx when CONFIG_NETPOLL_TRAP is defined.

    Add helper functions netpoll_trap_setup, netpoll_trap_setup_info,
    netpoll_trap_cleanup, and netpoll_trap_cleanup_info that initialize
    and cleanup the struct netpoll and struct netpoll_info receive
    specific fields when CONFIG_NETPOLL_TRAP is enabled and do nothing
    otherwise.

    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • Now that we no longer need to receive packets to safely drain the
    network drivers receive queue move netpoll_trap and netpoll_set_trap
    under CONFIG_NETPOLL_TRAP

    Making netpoll_trap and netpoll_set_trap noop inline functions
    when CONFIG_NETPOLL_TRAP is not set.

    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • Change the strategy of netpoll from dropping all packets received
    during netpoll_poll_dev to calling napi poll with a budget of 0
    (to avoid processing drivers rx queue), and to ignore packets received
    with netif_rx (those will safely be placed on the backlog queue).

    All of the netpoll supporting drivers have been reviewed to ensure
    either thay use netif_rx or that a budget of 0 is supported by their
    napi poll routine and that a budget of 0 will not process the drivers
    rx queues.

    Not dropping packets makes NETPOLL_RX_DROP unnecesary so it is removed.

    npinfo->rx_flags is removed as rx_flags with just the NETPOLL_RX_ENABLED
    flag becomes just a redundant mirror of list_empty(&npinfo->rx_np).

    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • Add a helper netpoll_rx_processing that reports when netpoll has
    receive side processing to perform.

    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • Pablo Neira Ayuso says:

    ====================
    Netfilter/IPVS updates for net-next

    The following patchset contains Netfilter/IPVS updates for net-next,
    most relevantly they are:

    * cleanup to remove double semicolon from stephen hemminger.

    * calm down sparse warning in xt_ipcomp, from Fan Du.

    * nf_ct_labels support for nf_tables, from Florian Westphal.

    * new macros to simplify rcu dereferences in the scope of nfnetlink
    and nf_tables, from Patrick McHardy.

    * Accept queue and drop (including reason for drop) to verdict
    parsing in nf_tables, also from Patrick.

    * Remove unused random seed initialization in nfnetlink_log, from
    Florian Westphal.

    * Allow to attach user-specific information to nf_tables rules, useful
    to attach user comments to rule, from me.

    * Return errors in ipset according to the manpage documentation, from
    Jozsef Kadlecsik.

    * Fix coccinelle warnings related to incorrect bool type usage for ipset,
    from Fengguang Wu.

    * Add hash:ip,mark set type to ipset, from Vytas Dauksa.

    * Fix message for each spotted by ipset for each netns that is created,
    from Ilia Mirkin.

    * Add forceadd option to ipset, which evicts a random entry from the set
    if it becomes full, from Josh Hunt.

    * Minor IPVS cleanups and fixes from Andi Kleen and Tingwei Liu.

    * Improve conntrack scalability by removing a central spinlock, original
    work from Eric Dumazet. Jesper Dangaard Brouer took them over to address
    remaining issues. Several patches to prepare this change come in first
    place.

    * Rework nft_hash to resolve bugs (leaking chain, missing rcu synchronization
    on element removal, etc. from Patrick McHardy.

    * Restore context in the rule deletion path, as we now release rule objects
    synchronously, from Patrick McHardy. This gets back event notification for
    anonymous sets.

    * Fix NAT family validation in nft_nat, also from Patrick.

    * Improve scalability of xt_connlimit by using an array of spinlocks and
    by introducing a rb-tree of hashtables for faster lookup of accounted
    objects per network. This patch was preceded by several patches and
    refactorizations to accomodate this change including the use of kmem_cache,
    from Florian Westphal.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • BCM4354 is an a/b/g/n/ac 2x2 WiFi chip. This patch adds support for it through
    SDIO interface.

    Reviewed-by: Pieter-Paul Giesberts
    Reviewed-by: Arend Van Spriel
    Signed-off-by: Franky Lin
    Signed-off-by: Arend van Spriel
    Signed-off-by: John W. Linville

    Franky Lin