1. 24 6月, 2017 1 次提交
    • R
      net: dp83640: Avoid NULL pointer dereference. · db9d8b29
      Richard Cochran 提交于
      The function, skb_complete_tx_timestamp(), used to allow passing in a
      NULL pointer for the time stamps, but that was changed in commit
      62bccb8c ("net-timestamp: Make the
      clone operation stand-alone from phy timestamping"), and the existing
      call sites, all of which are in the dp83640 driver, were fixed up.
      
      Even though the kernel-doc was subsequently updated in commit
      7a76a021 ("net-timestamp: Update
      skb_complete_tx_timestamp comment"), still a bug fix from Manfred
      Rudigier came into the driver using the old semantics.  Probably
      Manfred derived that patch from an older kernel version.
      
      This fix should be applied to the stable trees as well.
      
      Fixes: 81e8f2e9 ("net: dp83640: Fix tx timestamp overflow handling.")
      Signed-off-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db9d8b29
  2. 21 4月, 2017 1 次提交
  3. 10 11月, 2016 1 次提交
  4. 21 1月, 2016 1 次提交
  5. 08 1月, 2016 2 次提交
  6. 04 11月, 2015 4 次提交
  7. 18 7月, 2015 1 次提交
  8. 26 5月, 2015 3 次提交
  9. 01 4月, 2015 1 次提交
  10. 07 3月, 2015 1 次提交
  11. 13 11月, 2014 1 次提交
  12. 09 9月, 2014 1 次提交
  13. 06 9月, 2014 1 次提交
    • A
      net-timestamp: Make the clone operation stand-alone from phy timestamping · 62bccb8c
      Alexander Duyck 提交于
      The phy timestamping takes a different path than the regular timestamping
      does in that it will create a clone first so that the packets needing to be
      timestamped can be placed in a queue, or the context block could be used.
      
      In order to support these use cases I am pulling the core of the code out
      so it can be used in other drivers beyond just phy devices.
      
      In addition I have added a destructor named sock_efree which is meant to
      provide a simple way for dropping the reference to skb exceptions that
      aren't part of either the receive or send windows for the socket, and I
      have removed some duplication in spots where this destructor could be used
      in place of sock_edemux.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      62bccb8c
  14. 23 8月, 2014 1 次提交
  15. 23 7月, 2014 1 次提交
    • S
      dp83640: Fix receive timestamp race condition · 63502b8d
      Stefan Sørensen 提交于
      When timestamping received packets, rx_timestamp_work may be scheduled
      before the timestamps is received from the hardware resulting in the
      packet beeing delivered without the timestamp.
      
      This is fixed by changing the receive timestamp path:
      
      On receiving a packet that need timestamping, the rxts list is
      traversed.  If a match is found, packet+timestamp are delivered,
      otherwise the packet is added to a rx_queue.
      
      When a timestamp arrives rx_queue is traversed and if a matching
      packet is found, it is delivered with the timestamp. Otherwise the
      timestamp is added to the rxts list for matching with packets arriving
      later.
      
      In case the hardware drops a timestamp, a workqueue regularly checks
      the queue for old packets and delivers them without a timestamp.
      Signed-off-by: NStefan Sørensen <stefan.sorensen@spectralink.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      63502b8d
  16. 12 7月, 2014 1 次提交
  17. 10 7月, 2014 1 次提交
  18. 08 7月, 2014 1 次提交
  19. 02 7月, 2014 4 次提交
  20. 02 4月, 2014 1 次提交
    • D
      net: ptp: move PTP classifier in its own file · 408eccce
      Daniel Borkmann 提交于
      This commit fixes a build error reported by Fengguang, that is
      triggered when CONFIG_NETWORK_PHY_TIMESTAMPING is not set:
      
        ERROR: "ptp_classify_raw" [drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.ko] undefined!
      
      The fix is to introduce its own file for the PTP BPF classifier,
      so that PTP_1588_CLOCK and/or NETWORK_PHY_TIMESTAMPING can select
      it independently from each other. IXP4xx driver on ARM needs to
      select it as well since it does not seem to select PTP_1588_CLOCK
      or similar that would pull it in automatically.
      
      This also allows for hiding all of the internals of the BPF PTP
      program inside that file, and only exporting relevant API bits
      to drivers.
      
      This patch also adds a kdoc documentation of ptp_classify_raw()
      API to make it clear that it can return PTP_CLASS_* defines. Also,
      the BPF program has been translated into bpf_asm code, so that it
      can be more easily read and altered (extensively documented in [1]).
      
      In the kernel tree under tools/net/ we have bpf_asm and bpf_dbg
      tools, so the commented program can simply be translated via
      `./bpf_asm -c prog` where prog is a file that contains the
      commented code. This makes it easily readable/verifiable and when
      there's a need to change something, jump offsets etc do not need
      to be replaced manually which can be very error prone. Instead,
      a newly translated version via bpf_asm can simply replace the old
      code. I have checked opcode diffs before/after and it's the very
      same filter.
      
        [1] Documentation/networking/filter.txt
      
      Fixes: 164d8c66 ("net: ptp: do not reimplement PTP/BPF classifier")
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Jiri Benc <jbenc@redhat.com>
      Acked-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      408eccce
  21. 22 3月, 2014 5 次提交
  22. 14 2月, 2014 1 次提交
  23. 05 2月, 2014 3 次提交
  24. 18 12月, 2013 1 次提交
  25. 06 12月, 2012 1 次提交