On 18/04/2023 06.16, Song, Yoong Siang wrote:
On Monday, April 17, 2023 10:57 PM, Jesper Dangaard Brouer<brouer@xxxxxxxxxx> wrote:
[...]
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c
b/drivers/net/ethernet/intel/igc/igc_main.c
index 3a844cf5be3f..862768d5d134 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
[...]
+static int igc_xdp_rx_timestamp(const struct xdp_md *_ctx, u64 *timestamp) {
+ const struct igc_xdp_buff *ctx = (void *)_ctx;
+
+ if (igc_test_staterr(ctx->rx_desc, IGC_RXDADV_STAT_TSIP)) {
+ *timestamp = ctx->rx_ts;
+
+ return 0;
+ }
+
+ return -ENODATA;
+}
+
+const struct xdp_metadata_ops igc_xdp_metadata_ops = {
Since igc_xdp_metadata_ops is used in igc_main.c only, suggest to make it static.
I agree, and I acknowledge that you have already pointed this our
earier, but I forgot when I rebased the patches. Same for 4/5.
--Jesper