Skip to content
Permalink
Branch: master
Commits on Jul 12, 2019
  1. net: Add a connection manager preliminary logic

    tbursztyka authored and jukkar committed May 9, 2019
    It currently only listens to relevant events about network interface to
    decide whether raising connected or disconnected event.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commits on Jul 10, 2019
  1. net/lldp: Simplify Kconfig file

    tbursztyka authored and jukkar committed May 28, 2019
    Let's remove depends on NET_LLDP from all the options. It avoids this:
     # CONFIG_NET_LLDP is not set
     # CONFIG_NET_LLDP_LOG_LEVEL_OFF is not set
     # CONFIG_NET_LLDP_LOG_LEVEL_ERR is not set
     # CONFIG_NET_LLDP_LOG_LEVEL_WRN is not set
     # CONFIG_NET_LLDP_LOG_LEVEL_INF is not set
     # CONFIG_NET_LLDP_LOG_LEVEL_DBG is not set
     CONFIG_NET_LLDP_LOG_LEVEL_DEFAULT=y
     CONFIG_NET_LLDP_LOG_LEVEL=3
     CONFIG_NET_LLDP_CHASSIS_ID="CHASSIS_ID_PLACEHOLDER"
     CONFIG_NET_LLDP_PORT_ID="PORT_ID_PLACEHOLDER"
    
    And instead it will generate this:
     # CONFIG_NET_LLDP is not set
    
    Make the menu as an enablement config option as well.
    
    Adapting lldp header file relevantly.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  2. net/ethernet: Cleanup a bit on the usage of ifdefs

    tbursztyka authored and jukkar committed May 28, 2019
    ARP, LLDP and GPTP functions have dummies in case of being disabled so
    let's use IS_ENABLED() accordingly.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  3. net/gptp: net_gptp_recv() dummy function needs to return a verdict

    tbursztyka authored and jukkar committed May 28, 2019
    Since gptp is disabled in this case, let's return NET_DROP.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commits on Jul 9, 2019
  1. net/iface: Add IPv4 route find and add

    tbursztyka authored and jukkar committed May 22, 2019
    Removing an IPv4 router was missing, as well as finding the default
    router for an IPv4 address.
    
    Note howevere that IPv4 router features are not used anywhere yet. But
    at least the API is there and is a 1:1 to IPv6, if that matters.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  2. net/iface: Rework how routers are handled

    tbursztyka authored and jukkar committed May 22, 2019
    - router lifetime is always a u16_t so fixing
    net_if_ipv6_router_update_lifetime() signature.
    - Coalescing router timers into one: this reduces the net_if_router
    structure by 22 bytes
    - refactor IPv6 and IPv4 router code so it's handled in generic
    functions, to avoid duplicating 90% of the code for each family. This
    also fixes the lifetime support for IPv4 which was missing.
    
    Note however that IPv4 routing support seems to be missing as none of
    the relevant functions are used anywhere yet.
    
    Fixes #8728
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  3. net/ipv4: Add a net mgmt event for IPv4 router deletion

    tbursztyka authored and jukkar committed May 22, 2019
    There will probably be at some point a way to remove IPv4 router, and
    thus it will require such event.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  4. net/iface: Coalesce all RS timers through one

    tbursztyka authored and jukkar committed May 21, 2019
    This reduces the size of struct net_if_ipv6 by 24 bytes by moving
    the k_delayed_work attribute into net_if core code.
    Then each net_if_ipv6 can be added to the timer handler via a slist.
    
    This does not make much gain if the system has only 1 network interface
    It starts to be interesting if it has 2+ network interfaces then.
    
    Fixes #8728
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  5. net/iface: Coalesce all DAD timers through one

    tbursztyka authored and jukkar committed May 21, 2019
    This reduces the size of struct net_if_addr by 24 bytes by moving
    the k_delayed_work attribute into net_if core code.
    Then each net_if_addr can be added to the timer handler via a slist.
    
    This does not make much gain if the system has only 1 unicast IPv6
    address. It's a nice memory improvment once it has 2+ unicast IPv6
    address. Note that having IPv4 enabled along with IPv6 will also see
    memory improvements since both IPv6 and IPv4 use the same struct
    net_if_addr.
    
    Fixes #8728
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  6. net/iface: Remove useless attributes in net_if_ipv6 structure

    tbursztyka authored and jukkar committed May 20, 2019
    DAD use dad_count attribute in struct net_if_addr, since DAD is ran on
    each and every ipv6 unicast address.
    
    Fixes #8728
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  7. net/iface: Initialize IPv4/6 address so it removes more ifdef

    tbursztyka authored and jukkar committed May 20, 2019
    Just create init functions for each IP version.
    
    Fixes #8728
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  8. net/iface: Reduce ifdef usage on various options

    tbursztyka authored and jukkar committed May 20, 2019
    Offload, DAD, RS and IPv4 autoconf.
    
    Fixes #8728
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  9. net/iface: Reduce usage of ifdef around CONFIG_NET_IPV4

    tbursztyka authored and jukkar committed May 20, 2019
    Let's regroup all the IPv4 related function into one ifdef. There is no
    need to implement a dummy function for each: if IPv4 is not enabled,
    these functions are unused in the core.
    
    Fixes #8728
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  10. net/iface: Reduce usage of ifdef around CONFIG_NET_IPV6

    tbursztyka authored and jukkar committed May 20, 2019
    Let's regroup all the IPv6 related function into one ifdef. There is no
    need to implement a dummy function for each: if IPv6 is not enabled,
    these functions are unused in the core.
    
    Fixes #8728
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commits on Jul 8, 2019
  1. net/llmnr: Fix LLMNR answer creation

    tbursztyka authored and jukkar committed May 28, 2019
    - answer offset was 1 byte off.
    - request offset, when copied into the answer, was off as well.
    
    Fixes #16142
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commits on Jun 17, 2019
  1. drivers/wdt: Fixing tiny style issues in sam0 driver

    tbursztyka authored and nashif committed Jun 4, 2019
    - Even one-liner statement if () need { }
    - you can coalesce assignment and condition if the later tests the
    earlier only.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  2. include: Removing legacy left-overs in wdt.h API header

    tbursztyka authored and nashif committed Jun 4, 2019
    As title says, struct wdt_config and enum wdt_clock_timeout_cycles are
    not used anymore so they can be removed.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commits on Jun 4, 2019
  1. drivers/wdt: Rename CMSDK driver to follow naming rules

    tbursztyka authored and nashif committed Jun 4, 2019
    Basically, all driver file names should start with the driver type as
    prefix: wdt_ in case of watchdogs here, and not something custom like
    wdog_.
    
    For clarity, wdog_ prefix could be changed to wdt_ in the source code
    also but that's a detail and will not be addressed here.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  2. drivers/wdt: Rename STM32 IWDG files to follow naming rules

    tbursztyka authored and nashif committed Jun 4, 2019
    Basically, all driver file names should start with the driver type as
    prefix: wdt_ in case of watchdogs here.
    
    Maybe 'iwdg' keyword could be removed entirely, and also in function
    names. However that is not the scope of this patch.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commits on May 30, 2019
  1. net/udp: Always drop IPv6 UDP packet if checksum field is 0

    tbursztyka authored and jukkar committed May 29, 2019
    Missing checksum is only valid in IPv4 and only on certain context.
    
    Fixes #16483
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  2. tests/net: Fix IPv6 and UDP test as UDP got stricter on checking header

    tbursztyka authored and jukkar committed May 29, 2019
    Now length of the UDP header is checked, and obviously these test were
    avoiding setting it properly.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  3. net/udp: Check UDP header's length attribute

    tbursztyka authored and jukkar committed May 29, 2019
    Length should be at least of UDP header size but not bigger than actual
    payload size.
    
    Reported-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commits on May 27, 2019
  1. net/udp: Accept UDP packet with missing checksum

    tbursztyka authored and jukkar committed May 27, 2019
    Having a checksum of zeros in UDP means "missing checksum" and is a
    valid case as per RFC 768:
    
    "An all zero transmitted checksum value means that the transmitter
    generated no checksum (for debugging or for higher level protocols
    that don't care)."
    
    Such support is made possible by adding a new Kconfig option named
    CONFIG_NET_UDP_MISSING_CHECKSUM.
    
    However, that is valid only for IPv4. For IPv6, see the RFC 2460
    section 8.1:
    
    "Unlike IPv4, when UDP packets are originated by an IPv6 node, the UDP
    checksum is not optional."
    
    So the UDP checksum will always be verified in IPv6.
    
    Fixes #16375
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  2. net/udp: Computed checksum field should not be 0

    tbursztyka authored and jukkar committed May 24, 2019
    From RFC 768, in "Fields":
    "If the computed  checksum  is zero,  it is transmitted  as all ones"
    
    Fixes #16379
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commits on May 24, 2019
  1. net/pkt: Redefine the necessary fifo attribute

    tbursztyka authored and jukkar committed May 24, 2019
    commit 79672d1 was missing the fact socket layer is putting net_pkt
    into a k_fifo. However, it's on receiving side only: at this point the
    k_fifo_put is using the k_work area which is then useless at this
    point Thus why it did not break anything, as k_fifo only needs 4 bytes
    while the k_work attribute takes 12 bytes.
    
    Thus adding a union on the k_work attribute with another new attribute
    that describes the behavior.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commits on May 23, 2019
  1. net/arp: No need of 64bits timer precision on ARP requests

    tbursztyka authored and jukkar committed May 23, 2019
    The 32bits one can hold up to about 50 days, this is more than enough
    knowing that ARP request timeout is 2 seconds.
    
    So reducing the request start time to 32bits.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  2. net/pkt: Remove useless _reserved attribute

    tbursztyka authored and jukkar committed May 23, 2019
    This attribute was used when net_pkt where queued into a fifo. However,
    since the cove to k_work queues (due to the introduction of TC), such
    attribute has been totally useless.
    
    Removing it gains 4 bytes in net_pkt structure.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commits on May 21, 2019
  1. net/iface: Add a function to get IPv4 global address

    tbursztyka authored and jukkar committed May 14, 2019
    As for IPv6, let's create the same function on IPv4 side.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  2. net/iface: Modify function to get IPv6 global address

    tbursztyka authored and jukkar committed May 14, 2019
    Let's filter out on a state parameter.
    
    There is no impact as this function is not used anywhere yet.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commits on May 7, 2019
  1. net/connection: Final cleanup

    tbursztyka authored and jukkar committed Apr 25, 2019
    - renaming functions to better names
    - reordering functions place (register, then unregister for instance)
    - centralizing logs to relevant place
    
    Fixes #8722
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  2. net/connection: Merge rank bits into flags attribute

    tbursztyka authored and jukkar committed Apr 17, 2019
    Also, there is no need for unspecified address bit. If specified address
    bit is not set, then it will be obvious address is unspecified. Reducing
    the amount of bits from 6 to 4.
    
    This permits to reduce net_conn structure of 4 bytes. Its size is as
    before indroducing node attribute.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  3. net/connection: Use slist to manage used/unused connections

    tbursztyka authored and jukkar committed Apr 17, 2019
    This will optimize path when unused an connection is required or when
    looking up a used one.
    
    That said, at this stage, it bloats up the net_conn structure with 4
    added bytes. More optimization will overcome this drawback.
    
    Fixes #8722
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  4. net/connection: Reduce usage of #ifdef

    tbursztyka authored and jukkar committed Apr 17, 2019
    Most of present #ifdef can be removed via using IS_ENABLED() macro.
    
    Only small part of cache related logic still require #ifdef.
    
    Fixes #8722
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  5. net/connection: Removing cache feature

    tbursztyka authored and jukkar committed Apr 25, 2019
    There were various flaws in it that motivated its removal:
    
    - No hash collision handling mechanism. In case that would happen, the
    behavior of the network connection would be unknown. This is the main
    drawback
    - The lookup is not that much more efficient than the default one. The
    only difference of gain is in connection comparison (a u32t comparison
    vs a full connection compare). But the list handling is the same. It's
    made worse by the presence of a negatives match array which can be
    easily filled in and becomes then fully usless, appart from consuming
    CPU. As well as adding a new connection: it requires the whole cache
    to be cleared which is unefficient.
    - Not memory efficient, even compared to a proper hash table.
    Two arrays instead of one etc...
    
    All of this could be fixed by using a proper hash table, though it
    remains to be seen if such object could fit in Zephyr core.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
  6. net/context: Reordering some ipv4/6 logic to follow all other places

    tbursztyka authored and jukkar committed May 2, 2019
    During net_pkt/net_context API changes, some ip handling blocks were
    ordered ipv4 first, ipv6 second. While it is the contrary everywhere
    else. So reordering to get things consistent.
    
    Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Older
You can’t perform that action at this time.