1. 30 9月, 2021 1 次提交
    • J
      ixgbe: let the xdpdrv work with more than 64 cpus · 4fe81585
      Jason Xing 提交于
      Originally, ixgbe driver doesn't allow the mounting of xdpdrv if the
      server is equipped with more than 64 cpus online. So it turns out that
      the loading of xdpdrv causes the "NOMEM" failure.
      
      Actually, we can adjust the algorithm and then make it work through
      mapping the current cpu to some xdp ring with the protect of @tx_lock.
      
      Here are some numbers before/after applying this patch with xdp-example
      loaded on the eth0X:
      
      As client (tx path):
                           Before    After
      TCP_STREAM send-64   734.14    714.20
      TCP_STREAM send-128  1401.91   1395.05
      TCP_STREAM send-512  5311.67   5292.84
      TCP_STREAM send-1k   9277.40   9356.22 (not stable)
      TCP_RR     send-1    22559.75  21844.22
      TCP_RR     send-128  23169.54  22725.13
      TCP_RR     send-512  21670.91  21412.56
      
      As server (rx path):
                           Before    After
      TCP_STREAM send-64   1416.49   1383.12
      TCP_STREAM send-128  3141.49   3055.50
      TCP_STREAM send-512  9488.73   9487.44
      TCP_STREAM send-1k   9491.17   9356.22 (not stable)
      TCP_RR     send-1    23617.74  23601.60
      ...
      
      Notice: the TCP_RR mode is unstable as the official document explains.
      
      I tested many times with different parameters combined through netperf.
      Though the result is not that accurate, I cannot see much influence on
      this patch. The static key is places on the hot path, but it actually
      shouldn't cause a huge regression theoretically.
      Co-developed-by: NShujin Li <lishujin@kuaishou.com>
      Signed-off-by: NShujin Li <lishujin@kuaishou.com>
      Signed-off-by: NJason Xing <xingwanli@kuaishou.com>
      Tested-by: NSandeep Penigalapati <sandeep.penigalapati@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4fe81585
  2. 29 9月, 2021 7 次提交
  3. 28 9月, 2021 3 次提交
  4. 27 9月, 2021 3 次提交
    • J
      e100: fix buffer overrun in e100_get_regs · 51032e6f
      Jacob Keller 提交于
      The e100_get_regs function is used to implement a simple register dump
      for the e100 device. The data is broken into a couple of MAC control
      registers, and then a series of PHY registers, followed by a memory dump
      buffer.
      
      The total length of the register dump is defined as (1 + E100_PHY_REGS)
      * sizeof(u32) + sizeof(nic->mem->dump_buf).
      
      The logic for filling in the PHY registers uses a convoluted inverted
      count for loop which counts from E100_PHY_REGS (0x1C) down to 0, and
      assigns the slots 1 + E100_PHY_REGS - i. The first loop iteration will
      fill in [1] and the final loop iteration will fill in [1 + 0x1C]. This
      is actually one more than the supposed number of PHY registers.
      
      The memory dump buffer is then filled into the space at
      [2 + E100_PHY_REGS] which will cause that memcpy to assign 4 bytes past
      the total size.
      
      The end result is that we overrun the total buffer size allocated by the
      kernel, which could lead to a panic or other issues due to memory
      corruption.
      
      It is difficult to determine the actual total number of registers
      here. The only 8255x datasheet I could find indicates there are 28 total
      MDI registers. However, we're reading 29 here, and reading them in
      reverse!
      
      In addition, the ethtool e100 register dump interface appears to read
      the first PHY register to determine if the device is in MDI or MDIx
      mode. This doesn't appear to be documented anywhere within the 8255x
      datasheet. I can only assume it must be in register 28 (the extra
      register we're reading here).
      
      Lets not change any of the intended meaning of what we copy here. Just
      extend the space by 4 bytes to account for the extra register and
      continue copying the data out in the same order.
      
      Change the E100_PHY_REGS value to be the correct total (29) so that the
      total register dump size is calculated properly. Fix the offset for
      where we copy the dump buffer so that it doesn't overrun the total size.
      
      Re-write the for loop to use counting up instead of the convoluted
      down-counting. Correct the mdio_read offset to use the 0-based register
      offsets, but maintain the bizarre reverse ordering so that we have the
      ABI expected by applications like ethtool. This requires and additional
      subtraction of 1. It seems a bit odd but it makes the flow of assignment
      into the register buffer easier to follow.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Reported-by: NFelicitas Hetzelt <felicitashetzelt@gmail.com>
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      51032e6f
    • J
      e100: fix length calculation in e100_get_regs_len · 4329c8dc
      Jacob Keller 提交于
      commit abf9b902 ("e100: cleanup unneeded math") tried to simplify
      e100_get_regs_len and remove a double 'divide and then multiply'
      calculation that the e100_reg_regs_len function did.
      
      This change broke the size calculation entirely as it failed to account
      for the fact that the numbered registers are actually 4 bytes wide and
      not 1 byte. This resulted in a significant under allocation of the
      register buffer used by e100_get_regs.
      
      Fix this by properly multiplying the register count by u32 first before
      adding the size of the dump buffer.
      
      Fixes: abf9b902 ("e100: cleanup unneeded math")
      Reported-by: NFelicitas Hetzelt <felicitashetzelt@gmail.com>
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      4329c8dc
    • L
      ice: Open devlink when device is ready · 838cefd5
      Leon Romanovsky 提交于
      Move devlink_registration routine to be the last command, when the
      device is fully initialized.
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      838cefd5
  5. 24 9月, 2021 1 次提交
  6. 22 9月, 2021 1 次提交
  7. 19 9月, 2021 1 次提交
    • R
      igc: fix build errors for PTP · 87758511
      Randy Dunlap 提交于
      When IGC=y and PTP_1588_CLOCK=m, the ptp_*() interface family is
      not available to the igc driver. Make this driver depend on
      PTP_1588_CLOCK_OPTIONAL so that it will build without errors.
      
      Various igc commits have used ptp_*() functions without checking
      that PTP_1588_CLOCK is enabled. Fix all of these here.
      
      Fixes these build errors:
      
      ld: drivers/net/ethernet/intel/igc/igc_main.o: in function `igc_msix_other':
      igc_main.c:(.text+0x6494): undefined reference to `ptp_clock_event'
      ld: igc_main.c:(.text+0x64ef): undefined reference to `ptp_clock_event'
      ld: igc_main.c:(.text+0x6559): undefined reference to `ptp_clock_event'
      ld: drivers/net/ethernet/intel/igc/igc_ethtool.o: in function `igc_ethtool_get_ts_info':
      igc_ethtool.c:(.text+0xc7a): undefined reference to `ptp_clock_index'
      ld: drivers/net/ethernet/intel/igc/igc_ptp.o: in function `igc_ptp_feature_enable_i225':
      igc_ptp.c:(.text+0x330): undefined reference to `ptp_find_pin'
      ld: igc_ptp.c:(.text+0x36f): undefined reference to `ptp_find_pin'
      ld: drivers/net/ethernet/intel/igc/igc_ptp.o: in function `igc_ptp_init':
      igc_ptp.c:(.text+0x11cd): undefined reference to `ptp_clock_register'
      ld: drivers/net/ethernet/intel/igc/igc_ptp.o: in function `igc_ptp_stop':
      igc_ptp.c:(.text+0x12dd): undefined reference to `ptp_clock_unregister'
      ld: drivers/platform/x86/dell/dell-wmi-privacy.o: in function `dell_privacy_wmi_probe':
      
      Fixes: 64433e5b ("igc: Enable internal i225 PPS")
      Fixes: 60dbede0 ("igc: Add support for ethtool GET_TS_INFO command")
      Fixes: 87938851 ("igc: enable auxiliary PHC functions for the i225")
      Fixes: 5f295805 ("igc: Add basic skeleton for PTP")
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Cc: Ederson de Souza <ederson.desouza@intel.com>
      Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
      Cc: Vinicius Costa Gomes <vinicius.gomes@intel.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
      Cc: intel-wired-lan@lists.osuosl.org
      Acked-by: NVinicius Costa Gomes <vinicius.gomes@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      87758511
  8. 17 9月, 2021 1 次提交
  9. 16 9月, 2021 1 次提交
    • P
      igc: fix tunnel offloading · 40ee363c
      Paolo Abeni 提交于
      Checking tunnel offloading, it turns out that offloading doesn't work
      as expected.  The following script allows to reproduce the issue.
      Call it as `testscript DEVICE LOCALIP REMOTEIP NETMASK'
      
      === SNIP ===
      if [ $# -ne 4 ]
      then
        echo "Usage $0 DEVICE LOCALIP REMOTEIP NETMASK"
        exit 1
      fi
      DEVICE="$1"
      LOCAL_ADDRESS="$2"
      REMOTE_ADDRESS="$3"
      NWMASK="$4"
      echo "Driver: $(ethtool -i ${DEVICE} | awk '/^driver:/{print $2}') "
      ethtool -k "${DEVICE}" | grep tx-udp
      echo
      echo "Set up NIC and tunnel..."
      ip addr add "${LOCAL_ADDRESS}/${NWMASK}" dev "${DEVICE}"
      ip link set "${DEVICE}" up
      sleep 2
      ip link add vxlan1 type vxlan id 42 \
      		   remote "${REMOTE_ADDRESS}" \
      		   local "${LOCAL_ADDRESS}" \
      		   dstport 0 \
      		   dev "${DEVICE}"
      ip addr add fc00::1/64 dev vxlan1
      ip link set vxlan1 up
      sleep 2
      rm -f vxlan.pcap
      echo "Running tcpdump and iperf3..."
      ( nohup tcpdump -i any -w vxlan.pcap >/dev/null 2>&1 ) &
      sleep 2
      iperf3 -c fc00::2 >/dev/null
      pkill tcpdump
      echo
      echo -n "Max. Paket Size: "
      tcpdump -r vxlan.pcap -nnle 2>/dev/null \
      | grep "${LOCAL_ADDRESS}.*> ${REMOTE_ADDRESS}.*OTV" \
      | awk '{print $8}' | awk -F ':' '{print $1}' \
      | sort -n | tail -1
      echo
      ip link del vxlan1
      ip addr del ${LOCAL_ADDRESS}/${NWMASK} dev "${DEVICE}"
      === SNAP ===
      
      The expected outcome is
      
        Max. Paket Size: 64904
      
      This is what you see on igb, the code igc has been taken from.
      However, on igc the output is
      
        Max. Paket Size: 1516
      
      so the GSO aggregate packets are segmented by the kernel before calling
      igc_xmit_frame.  Inside the subsequent call to igc_tso, the check for
      skb_is_gso(skb) fails and the function returns prematurely.
      
      It turns out that this occurs because the feature flags aren't set
      entirely correctly in igc_probe.  In contrast to the original code
      from igb_probe, igc_probe neglects to set the flags required to allow
      tunnel offloading.
      
      Setting the same flags as igb fixes the issue on igc.
      
      Fixes: 34428dff ("igc: Add GSO partial support")
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Tested-by: NCorinna Vinschen <vinschen@redhat.com>
      Acked-by: NSasha Neftin <sasha.neftin@intel.com>
      Tested-by: NNechama Kraus <nechamax.kraus@linux.intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      40ee363c
  10. 10 9月, 2021 1 次提交
    • D
      ice: Correctly deal with PFs that do not support RDMA · bfe84435
      Dave Ertman 提交于
      There are two cases where the current PF does not support RDMA
      functionality.  The first is if the NVM loaded on the device is set
      to not support RDMA (common_caps.rdma is false).  The second is if
      the kernel bonding driver has included the current PF in an active
      link aggregate.
      
      When the driver has determined that this PF does not support RDMA, then
      auxiliary devices should not be created on the auxiliary bus.  Without
      a device on the auxiliary bus, even if the irdma driver is present, there
      will be no RDMA activity attempted on this PF.
      
      Currently, in the reset flow, an attempt to create auxiliary devices is
      performed without regard to the ability of the PF.  There needs to be a
      check in ice_aux_plug_dev (as the central point that creates auxiliary
      devices) to see if the PF is in a state to support the functionality.
      
      When disabling and re-enabling RDMA due to the inclusion/removal of the PF
      in a link aggregate, we also need to set/clear the bit which controls
      auxiliary device creation so that a reset recovery in a link aggregate
      situation doesn't try to create auxiliary devices when it shouldn't.
      
      Fixes: f9f5301e ("ice: Register auxiliary device to provide RDMA")
      Reported-by: NYongxin Liu <yongxin.liu@windriver.com>
      Signed-off-by: NDave Ertman <david.m.ertman@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bfe84435
  11. 28 8月, 2021 7 次提交
    • B
      ice: Only lock to update netdev dev_addr · b357d971
      Brett Creeley 提交于
      commit 3ba7f53f ("ice: don't remove netdev->dev_addr from uc sync
      list") introduced calls to netif_addr_lock_bh() and
      netif_addr_unlock_bh() in the driver's ndo_set_mac() callback. This is
      fine since the driver is updated the netdev's dev_addr, but since this
      is a spinlock, the driver cannot sleep when the lock is held.
      Unfortunately the functions to add/delete MAC filters depend on a mutex.
      This was causing a trace with the lock debug kernel config options
      enabled when changing the mac address via iproute.
      
      [  203.273059] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:281
      [  203.273065] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6698, name: ip
      [  203.273068] Preemption disabled at:
      [  203.273068] [<ffffffffc04aaeab>] ice_set_mac_address+0x8b/0x1c0 [ice]
      [  203.273097] CPU: 31 PID: 6698 Comm: ip Tainted: G S      W I       5.14.0-rc4 #2
      [  203.273100] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0010.010620200716 01/06/2020
      [  203.273102] Call Trace:
      [  203.273107]  dump_stack_lvl+0x33/0x42
      [  203.273113]  ? ice_set_mac_address+0x8b/0x1c0 [ice]
      [  203.273124]  ___might_sleep.cold.150+0xda/0xea
      [  203.273131]  mutex_lock+0x1c/0x40
      [  203.273136]  ice_remove_mac+0xe3/0x180 [ice]
      [  203.273155]  ? ice_fltr_add_mac_list+0x20/0x20 [ice]
      [  203.273175]  ice_fltr_prepare_mac+0x43/0xa0 [ice]
      [  203.273194]  ice_set_mac_address+0xab/0x1c0 [ice]
      [  203.273206]  dev_set_mac_address+0xb8/0x120
      [  203.273210]  dev_set_mac_address_user+0x2c/0x50
      [  203.273212]  do_setlink+0x1dd/0x10e0
      [  203.273217]  ? __nla_validate_parse+0x12d/0x1a0
      [  203.273221]  __rtnl_newlink+0x530/0x910
      [  203.273224]  ? __kmalloc_node_track_caller+0x17f/0x380
      [  203.273230]  ? preempt_count_add+0x68/0xa0
      [  203.273236]  ? _raw_spin_lock_irqsave+0x1f/0x30
      [  203.273241]  ? kmem_cache_alloc_trace+0x4d/0x440
      [  203.273244]  rtnl_newlink+0x43/0x60
      [  203.273245]  rtnetlink_rcv_msg+0x13a/0x380
      [  203.273248]  ? rtnl_calcit.isra.40+0x130/0x130
      [  203.273250]  netlink_rcv_skb+0x4e/0x100
      [  203.273256]  netlink_unicast+0x1a2/0x280
      [  203.273258]  netlink_sendmsg+0x242/0x490
      [  203.273260]  sock_sendmsg+0x58/0x60
      [  203.273263]  ____sys_sendmsg+0x1ef/0x260
      [  203.273265]  ? copy_msghdr_from_user+0x5c/0x90
      [  203.273268]  ? ____sys_recvmsg+0xe6/0x170
      [  203.273270]  ___sys_sendmsg+0x7c/0xc0
      [  203.273272]  ? copy_msghdr_from_user+0x5c/0x90
      [  203.273274]  ? ___sys_recvmsg+0x89/0xc0
      [  203.273276]  ? __netlink_sendskb+0x50/0x50
      [  203.273278]  ? mod_objcg_state+0xee/0x310
      [  203.273282]  ? __dentry_kill+0x114/0x170
      [  203.273286]  ? get_max_files+0x10/0x10
      [  203.273288]  __sys_sendmsg+0x57/0xa0
      [  203.273290]  do_syscall_64+0x37/0x80
      [  203.273295]  entry_SYSCALL_64_after_hwframe+0x44/0xae
      [  203.273296] RIP: 0033:0x7f8edf96e278
      [  203.273298] Code: 89 02 48 c7 c0 ff ff ff ff eb b5 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 8d 05 25 63 2c 00 8b 00 85 c0 75 17 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 41 54 41 89 d4 55
      [  203.273300] RSP: 002b:00007ffcb8bdac08 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
      [  203.273303] RAX: ffffffffffffffda RBX: 000000006115e0ae RCX: 00007f8edf96e278
      [  203.273304] RDX: 0000000000000000 RSI: 00007ffcb8bdac70 RDI: 0000000000000003
      [  203.273305] RBP: 0000000000000000 R08: 0000000000000001 R09: 00007ffcb8bda5b0
      [  203.273306] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
      [  203.273306] R13: 0000555e10092020 R14: 0000000000000000 R15: 0000000000000005
      
      Fix this by only locking when changing the netdev->dev_addr. Also, make
      sure to restore the old netdev->dev_addr on any failures.
      
      Fixes: 3ba7f53f ("ice: don't remove netdev->dev_addr from uc sync list")
      Signed-off-by: NBrett Creeley <brett.creeley@intel.com>
      Tested-by: NGurucharan G <gurucharanx.g@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      b357d971
    • J
      ice: restart periodic outputs around time changes · 9ee31343
      Jacob Keller 提交于
      When we enabled auxiliary input/output support for the E810 device, we
      forgot to add logic to restart the output when we change time. This is
      important as the periodic output will be incorrect after a time change
      otherwise.
      
      This unfortunately includes the adjust time function, even though it
      uses an atomic hardware interface. The atomic adjustment can still cause
      the pin output to stall permanently, so we need to stop and restart it.
      
      Introduce wrapper functions to temporarily disable and then re-enable
      the clock outputs.
      
      Fixes: 172db5f9 ("ice: add support for auxiliary input/output pins")
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NSunitha D Mekala <sunithax.d.mekala@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      9ee31343
    • A
      igc: Add support for CBS offloading · 1ab011b0
      Aravindhan Gunasekaran 提交于
      Implement support for Credit-based shaper(CBS) Qdisc hardware
      offload mode in the driver. There are two sets of IEEE802.1Qav
      (CBS) HW logic in i225 controller and this patch supports
      enabling them in the top two priority TX queues.
      
      Driver implemented as recommended by Foxville External
      Architecture Specification v0.993. Idleslope and Hi-credit are
      the CBS tunable parameters for i225 NIC, programmed in TQAVCC
      and TQAVHC registers respectively.
      
      In-order for IEEE802.1Qav (CBS) algorithm to work as intended
      and provide BW reservation CBS should be enabled in highest
      priority queue first. If we enable CBS on any of low priority
      queues, the traffic in high priority queue does not allow low
      priority queue to be selected for transmission and bandwidth
      reservation is not guaranteed.
      Signed-off-by: NAravindhan Gunasekaran <aravindhan.gunasekaran@intel.com>
      Signed-off-by: NMallikarjuna Chilakala <mallikarjuna.chilakala@intel.com>
      Tested-by: NDvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      1ab011b0
    • V
      igc: Simplify TSN flags handling · 61572d5f
      Vinicius Costa Gomes 提交于
      Separates the procedure done during reset from applying a
      configuration, knowing when the code is executing allow us to
      separate the better what changes the hardware state from what
      changes only the driver state.
      
      Introduces a flag for bookkeeping the driver state of TSN
      features. When Qav and frame-preemption is also implemented
      this flag makes it easier to keep track on whether a TSN feature
      driver state is enabled or not though controller state changes,
      say, during a reset.
      Signed-off-by: NVinicius Costa Gomes <vinicius.gomes@intel.com>
      Signed-off-by: NAravindhan Gunasekaran <aravindhan.gunasekaran@intel.com>
      Signed-off-by: NMallikarjuna Chilakala <mallikarjuna.chilakala@intel.com>
      Tested-by: NDvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      61572d5f
    • V
      igc: Use default cycle 'start' and 'end' values for queues · c814a2d2
      Vinicius Costa Gomes 提交于
      Sets default values for each queue cycle start and cycle end.
      This allows some simplification in the handling of these
      configurations as most TSN features in i225 require a cycle
      to be configured.
      
      In i225, cycle start and end time is required to be programmed
      for CBS to work properly.
      Signed-off-by: NVinicius Costa Gomes <vinicius.gomes@intel.com>
      Signed-off-by: NAravindhan Gunasekaran <aravindhan.gunasekaran@intel.com>
      Signed-off-by: NMallikarjuna Chilakala <mallikarjuna.chilakala@intel.com>
      Tested-by: NDvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      c814a2d2
    • J
      ice: add lock around Tx timestamp tracker flush · 4dd0d5c3
      Jacob Keller 提交于
      The driver didn't take the lock while flushing the Tx tracker, which
      could cause a race where one thread is trying to read timestamps out
      while another thread is trying to read the tracker to check the
      timestamps.
      
      Avoid this by ensuring that flushing is locked against read accesses.
      
      Fixes: ea9b847c ("ice: enable transmit timestamps for E810 devices")
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NGurucharan G <gurucharanx.g@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      4dd0d5c3
    • J
      ice: remove dead code for allocating pin_config · 1f0cbb3e
      Jacob Keller 提交于
      We have code in the ice driver which allocates the pin_config structure
      if n_pins is > 0, but we never set n_pins to be greater than zero.
      There's no reason to keep this code until we actually have pin_config
      support. Remove this. We can re-add it properly when we implement
      support for pin_config for E810-T devices.
      
      Fixes: 172db5f9 ("ice: add support for auxiliary input/output pins")
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NGurucharan G <gurucharanx.g@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      1f0cbb3e
  12. 27 8月, 2021 1 次提交
  13. 25 8月, 2021 2 次提交
    • V
      igc: Add support for PTP getcrosststamp() · a90ec848
      Vinicius Costa Gomes 提交于
      i225 supports PCIe Precision Time Measurement (PTM), allowing us to
      support the PTP_SYS_OFFSET_PRECISE ioctl() in the driver via the
      getcrosststamp() function.
      
      The easiest way to expose the PTM registers would be to configure the PTM
      dialogs to run periodically, but the PTP_SYS_OFFSET_PRECISE ioctl()
      semantics are more aligned to using a kind of "one-shot" way of retrieving
      the PTM timestamps. But this causes a bit more code to be written: the
      trigger registers for the PTM dialogs are not cleared automatically.
      
      i225 can be configured to send "fake" packets with the PTM
      information, adding support for handling these types of packets is
      left for the future.
      
      PTM improves the accuracy of time synchronization, for example, using
      phc2sys, while a simple application is sending packets as fast as
      possible. First, without .getcrosststamp():
      
      phc2sys[191.382]: enp4s0 sys offset      -959 s2 freq    -454 delay   4492
      phc2sys[191.482]: enp4s0 sys offset       798 s2 freq   +1015 delay   4069
      phc2sys[191.583]: enp4s0 sys offset       962 s2 freq   +1418 delay   3849
      phc2sys[191.683]: enp4s0 sys offset       924 s2 freq   +1669 delay   3753
      phc2sys[191.783]: enp4s0 sys offset       664 s2 freq   +1686 delay   3349
      phc2sys[191.883]: enp4s0 sys offset       218 s2 freq   +1439 delay   2585
      phc2sys[191.983]: enp4s0 sys offset       761 s2 freq   +2048 delay   3750
      phc2sys[192.083]: enp4s0 sys offset       756 s2 freq   +2271 delay   4061
      phc2sys[192.183]: enp4s0 sys offset       809 s2 freq   +2551 delay   4384
      phc2sys[192.283]: enp4s0 sys offset      -108 s2 freq   +1877 delay   2480
      phc2sys[192.383]: enp4s0 sys offset     -1145 s2 freq    +807 delay   4438
      phc2sys[192.484]: enp4s0 sys offset       571 s2 freq   +2180 delay   3849
      phc2sys[192.584]: enp4s0 sys offset       241 s2 freq   +2021 delay   3389
      phc2sys[192.684]: enp4s0 sys offset       405 s2 freq   +2257 delay   3829
      phc2sys[192.784]: enp4s0 sys offset        17 s2 freq   +1991 delay   3273
      phc2sys[192.884]: enp4s0 sys offset       152 s2 freq   +2131 delay   3948
      phc2sys[192.984]: enp4s0 sys offset      -187 s2 freq   +1837 delay   3162
      phc2sys[193.084]: enp4s0 sys offset     -1595 s2 freq    +373 delay   4557
      phc2sys[193.184]: enp4s0 sys offset       107 s2 freq   +1597 delay   3740
      phc2sys[193.284]: enp4s0 sys offset       199 s2 freq   +1721 delay   4010
      phc2sys[193.385]: enp4s0 sys offset      -169 s2 freq   +1413 delay   3701
      phc2sys[193.485]: enp4s0 sys offset       -47 s2 freq   +1484 delay   3581
      phc2sys[193.585]: enp4s0 sys offset       -65 s2 freq   +1452 delay   3778
      phc2sys[193.685]: enp4s0 sys offset        95 s2 freq   +1592 delay   3888
      phc2sys[193.785]: enp4s0 sys offset       206 s2 freq   +1732 delay   4445
      phc2sys[193.885]: enp4s0 sys offset      -652 s2 freq    +936 delay   2521
      phc2sys[193.985]: enp4s0 sys offset      -203 s2 freq   +1189 delay   3391
      phc2sys[194.085]: enp4s0 sys offset      -376 s2 freq    +955 delay   2951
      phc2sys[194.185]: enp4s0 sys offset      -134 s2 freq   +1084 delay   3330
      phc2sys[194.285]: enp4s0 sys offset       -22 s2 freq   +1156 delay   3479
      phc2sys[194.386]: enp4s0 sys offset        32 s2 freq   +1204 delay   3602
      phc2sys[194.486]: enp4s0 sys offset       122 s2 freq   +1303 delay   3731
      
      Statistics for this run (total of 2179 lines), in nanoseconds:
        average: -1.12
        stdev: 634.80
        max: 1551
        min: -2215
      
      With .getcrosststamp() via PCIe PTM:
      
      phc2sys[367.859]: enp4s0 sys offset         6 s2 freq   +1727 delay      0
      phc2sys[367.959]: enp4s0 sys offset        -2 s2 freq   +1721 delay      0
      phc2sys[368.059]: enp4s0 sys offset         5 s2 freq   +1727 delay      0
      phc2sys[368.160]: enp4s0 sys offset        -1 s2 freq   +1723 delay      0
      phc2sys[368.260]: enp4s0 sys offset        -4 s2 freq   +1719 delay      0
      phc2sys[368.360]: enp4s0 sys offset        -5 s2 freq   +1717 delay      0
      phc2sys[368.460]: enp4s0 sys offset         1 s2 freq   +1722 delay      0
      phc2sys[368.560]: enp4s0 sys offset        -3 s2 freq   +1718 delay      0
      phc2sys[368.660]: enp4s0 sys offset         5 s2 freq   +1725 delay      0
      phc2sys[368.760]: enp4s0 sys offset        -1 s2 freq   +1721 delay      0
      phc2sys[368.860]: enp4s0 sys offset         0 s2 freq   +1721 delay      0
      phc2sys[368.960]: enp4s0 sys offset         0 s2 freq   +1721 delay      0
      phc2sys[369.061]: enp4s0 sys offset         4 s2 freq   +1725 delay      0
      phc2sys[369.161]: enp4s0 sys offset         1 s2 freq   +1724 delay      0
      phc2sys[369.261]: enp4s0 sys offset         4 s2 freq   +1727 delay      0
      phc2sys[369.361]: enp4s0 sys offset         8 s2 freq   +1732 delay      0
      phc2sys[369.461]: enp4s0 sys offset         7 s2 freq   +1733 delay      0
      phc2sys[369.561]: enp4s0 sys offset         4 s2 freq   +1733 delay      0
      phc2sys[369.661]: enp4s0 sys offset         1 s2 freq   +1731 delay      0
      phc2sys[369.761]: enp4s0 sys offset         1 s2 freq   +1731 delay      0
      phc2sys[369.861]: enp4s0 sys offset        -5 s2 freq   +1725 delay      0
      phc2sys[369.961]: enp4s0 sys offset        -4 s2 freq   +1725 delay      0
      phc2sys[370.062]: enp4s0 sys offset         2 s2 freq   +1730 delay      0
      phc2sys[370.162]: enp4s0 sys offset        -7 s2 freq   +1721 delay      0
      phc2sys[370.262]: enp4s0 sys offset        -3 s2 freq   +1723 delay      0
      phc2sys[370.362]: enp4s0 sys offset         1 s2 freq   +1726 delay      0
      phc2sys[370.462]: enp4s0 sys offset        -3 s2 freq   +1723 delay      0
      phc2sys[370.562]: enp4s0 sys offset        -1 s2 freq   +1724 delay      0
      phc2sys[370.662]: enp4s0 sys offset        -4 s2 freq   +1720 delay      0
      phc2sys[370.762]: enp4s0 sys offset        -7 s2 freq   +1716 delay      0
      phc2sys[370.862]: enp4s0 sys offset        -2 s2 freq   +1719 delay      0
      
      Statistics for this run (total of 2179 lines), in nanoseconds:
        average: 0.14
        stdev: 5.03
        max: 48
        min: -27
      
      For reference, the statistics for runs without PCIe congestion show
      that the improvements from enabling PTM are less dramatic. For two
      runs of 16466 entries:
        without PTM: avg -0.04 stdev 10.57 max 39 min -42
        with PTM: avg 0.01 stdev 4.20 max 19 min -16
      
      One possible explanation is that when PTM is not enabled, and there's a lot
      of traffic in the PCIe fabric, some register reads will take more time
      than the others because of congestion on the PCIe fabric.
      
      When PTM is enabled, even if the PTM dialogs take more time to
      complete under heavy traffic, the time measurements do not depend on
      the time to read the registers.
      
      This was implemented following the i225 EAS version 0.993.
      Signed-off-by: NVinicius Costa Gomes <vinicius.gomes@intel.com>
      Tested-by: NDvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      a90ec848
    • V
      igc: Enable PCIe PTM · 1b5d73fb
      Vinicius Costa Gomes 提交于
      Enables PCIe PTM (Precision Time Measurement) support in the igc
      driver. Notifies the PCI devices that PCIe PTM should be enabled.
      
      PCIe PTM is similar protocol to PTP (Precision Time Protocol) running
      in the PCIe fabric, it allows devices to report time measurements from
      their internal clocks and the correlation with the PCIe root clock.
      
      The i225 NIC exposes some registers that expose those time
      measurements, those registers will be used, in later patches, to
      implement the PTP_SYS_OFFSET_PRECISE ioctl().
      Signed-off-by: NVinicius Costa Gomes <vinicius.gomes@intel.com>
      Tested-by: NDvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      1b5d73fb
  14. 24 8月, 2021 1 次提交
  15. 20 8月, 2021 7 次提交
  16. 18 8月, 2021 2 次提交